<div dir="ltr"><div><div>Sometimes it is even easier to use the -t switch <br><br></div>python runtests.py -t <filename> <br><br></div>only tests that file. Also if I remember correctly pytest supports different verbosity levels so you can add -v -v -v for more output about the performed tests. <br><br><br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 24, 2018 at 12:37 PM, Andrew Nelson <span dir="ltr"><<a href="mailto:andyfaff@gmail.com" target="_blank">andyfaff@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On 24 January 2018 at 22:09, Lars G. <span dir="ltr"><<a href="mailto:lagru@mailbox.org" target="_blank">lagru@mailbox.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span><br>
</span>I'd find additional hints on how to execute & debug changes to a local<br>
development version of SciPy really useful. I'm still struggling with<br>
this. <br>
I think to try out & debug changes to Python code one needs to compile &<br>
install the full package which is not really feasible for every change. <br>
</blockquote><div><br></div></span><div>`python runtests.py` is the easiest way to do this. If you make small changes it doesn't take long to build, and installation is into a virtual environment so you don't need to worry about it interfering with your production environment. You can use `python runtests.py -s optimize` to just run the unit tests for the optimize module, and you can also select one specific test to run, thereby saving a lot of test time.</div><div>So if there's an issue I start off by writing a unit test that would exercise the problem, then alter code such that it then passes. A single build/test cycle only takes one or two minutes.</div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">My current hack is to overwrite selected files in the site-packages<br>
folder (where SciPy-Dev is installed) with the modified files through a<br>
simple script. That way I don't need to rebuild the binaries.<br></blockquote><div><br></div></span><div>Once you start altering compiled code, then yes, it does take longer. But only a single file would need to be compiled and that module relinked. Sometimes I copy a whole class/function into a jupyter notebook and mess around with it in there until it does what is needed, then I make the relevant changes to the file in the scipy codebase. Once it works locally then you can commit and push to your fork on github.</div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I'm sure there is a better approach and it may be useful to cover these<br>
steps (how to debug or execute selected unit tests in PyCharm or any<br>
other IDE) as well.<br>
<br>
At least on Linux I found the contribution guide quite helpful for the<br>
initial setup. However I think some tips on how to install from source<br>
into a conda or virtualenv environment would improve this further. As it<br>
is, coming from Windows, some backround knowledge about Linux is<br>
definitly required.<br>
<br>
Greetings, Lars<br>
<div class="m_4069835325435824443m_5920486582390648448HOEnZb"><div class="m_4069835325435824443m_5920486582390648448h5"><br>
______________________________<wbr>_________________<br>
SciPy-Dev mailing list<br>
<a href="mailto:SciPy-Dev@python.org" target="_blank">SciPy-Dev@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/scipy-dev" rel="noreferrer" target="_blank">https://mail.python.org/mailma<wbr>n/listinfo/scipy-dev</a><br>
</div></div></blockquote></span></div><br><br clear="all"><span class=""><div><br></div>-- <br><div class="m_4069835325435824443m_5920486582390648448gmail_signature" data-smartmail="gmail_signature">______________________________<wbr>_______<br>Dr. Andrew Nelson<br><br><br>______________________________<wbr>_______</div>
</span></div></div>
<br>______________________________<wbr>_________________<br>
SciPy-Dev mailing list<br>
<a href="mailto:SciPy-Dev@python.org">SciPy-Dev@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/scipy-dev" rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/listinfo/scipy-dev</a><br>
<br></blockquote></div><br></div>