<div dir="ltr"><div dir="ltr"><div class="gmail_quote"><div dir="ltr"><div class="gmail_quote"><div dir="ltr"><span class=""><div>Hi All,<br></div><div><br></div><div>I have recently become involved in OpenStack development. After installing a few devstacks (and buying some H/W for my own physical cloud) I settled into learning, reviewing and debugging the Python OpenStack Client (seemed an easy access point). I even published a blog post just 7 days ago on my experiences of Python Virtual Environments (something I was not yet familiar with. Python being about 10+ on my list of known languages) at <a href="http://ronaldbradford.com/blog/inconsistent-messaging-for-openstackclient-2015-04-20/" target="_blank">http://ronaldbradford.com/blog/inconsistent-messaging-for-openstackclient-2015-04-20/</a>. Since then I've been debugging the code and preparing to write some test cases for what I consider is a small bug, and understand how to work on making a contribution to that.</div><div><br></div></span><div>Specifically, the following two code snippets have become SOP (Standard Operating Procedure) jumping around VMs and projects and I suspect if you are a developer of this project, something you are very familiar with.</div><div><br></div><div><span class=""><pre style="overflow:auto;font-family:Menlo,Monaco,Consolas,'Courier New',monospace;font-size:11px;padding:9.5px 15px;margin-top:10px;margin-bottom:10px;line-height:15px;color:rgb(0,0,0);word-break:break-all;word-wrap:break-word;border:1px solid rgb(204,204,204);border-radius:4px;width:741px;max-height:300px;background-color:rgb(238,238,238)">git clone git://<a href="http://git.openstack.org/openstack/python-openstackclient" target="_blank">git.openstack.org/openstack/python-openstackclient</a>
cd python-openstackclient
python tools/install_venv.py
source .venv/bin/activate</pre></span><pre style="overflow:auto;font-family:Menlo,Monaco,Consolas,'Courier New',monospace;font-size:11px;padding:9.5px 15px;margin-top:10px;margin-bottom:10px;line-height:15px;color:rgb(0,0,0);word-break:break-all;word-wrap:break-word;border:1px solid rgb(204,204,204);border-radius:4px;width:741px;max-height:300px;background-color:rgb(238,238,238)">./run_tests.sh
</pre></div><div><br></div><div><br></div><div>Today I went to pickup where I left off last week and I find with an updated code base and run_tests.sh didn't work. Infact it not longer exists in this project. See <a href="https://review.openstack.org/#/c/177066/" target="_blank">https://review.openstack.org/#/c/177066/</a></div><span class=""><div><br></div><div>I also found that tools/install_venv.py also gone, see <a href="https://review.openstack.org/#/c/177086/" target="_blank">https://review.openstack.org/#/c/177086/</a></div><div><br></div><div>So, I'm back to knowing almost nil about running tests and debugging my own code in under a week.</div><div><br></div></span><div>While I appreciate the OpenStack codebase is a growing and evolving project and I'm still a relative newbie, I'm a little lost in the traceability and the audibility of a structural change (in other words, how you run unit tests and setup virtual environments). I suspect I'm missing something in the information flow.</div><div><br></div><div>I'm on a few mailing lists, in a few IRC rooms, but I found this out by looking at commit messages at <a href="https://git.openstack.org/cgit/openstack/python-openstackclient/" target="_blank">https://git.openstack.org/cgit/openstack/python-openstackclient/</a>. I am unfamiliar with what is the best place for looking at information to remain informed.</div><div><br></div><div>run_tests.sh is a great example where there was no deprecation message and there is indeed no backward compatibility. i.e. a run_test.sh that states: "Run tox instead". This would at least not catch newbies off guard as much when reading various documentation.</div><span class=""><div><br></div><div>I also am lead to believe each project is self-governed (which is great as it doesn't hobble projects by decision making) but that also leads to different approaches on different projects. You don't want each project to become siloed and difficult to navigate between them. There was a choice many years ago to standardize on Python. There are choices on coding standards. Does this exist for testing too? </div><div><br></div></span><span class=""><div>As somebody new to OpenStack code base and willing to contribute, even the "How to Contribute" (<a href="https://wiki.openstack.org/wiki/How_To_Contribute" target="_blank">https://wiki.openstack.org/wiki/How_To_Contribute</a> </div><div>) while helpful is a lot to tackle. This next step to getting to know the code, and I've not found a great source for this. I found it better to just get stuck in downloading, reading and running it. I looked back and came across this link I did read some time ago -- <a href="http://docs.openstack.org/developer/cinder/devref/development.environment.html" target="_blank">http://docs.openstack.org/developer/cinder/devref/development.environment.html</a> </div><div><br></div><div>Anybody able to provide recommendations for the new developer in the OS space I would greatly appreciate it.</div><div><br></div></span><div>Having written this email draft I have delved into reading more about testing. I started with the projects HACKING.rst which lead to <a href="https://wiki.openstack.org/wiki/Testr" target="_blank">https://wiki.openstack.org/wiki/Testr</a> and now <a href="https://wiki.openstack.org/wiki/Testing" target="_blank">https://wiki.openstack.org/wiki/Testing</a>. I should point out the last link specifically states.</div><div><br></div><div><h4 style="margin:10px 0px;font-family:'PT Sans',sans-serif;line-height:20px;color:rgb(51,51,51);font-size:17.5px"><span>run_tests.sh</span></h4><p style="margin:0px 0px 10px;color:rgb(51,51,51);font-family:'Arial Unicode MS',Arial,sans-serif;font-size:14px;line-height:20px">There is an older convention, as follows. Most projects have a shell script, named "run_tests.sh", that runs the unit tests of that project. ...</p></div><div><br></div><div>So I've solved how to run tests the new way, took longer to write this email. Still none the wiser how to run my code in a developer virtual environment.</div><div><br></div><div>Regards</div><span class="HOEnZb"><font color="#888888"><span><font color="#888888"><div><br></div><div>Ronald</div></font></span></font></span></div>
</div><br></div>
</div><br></div></div>