[SciPy-Dev] What we do struggle with is lack of progress on big-ticket items

Andrew Nelson andyfaff at gmail.com
Wed Jan 24 06:37:24 EST 2018


On 24 January 2018 at 22:09, Lars G. <lagru at mailbox.org> wrote:

>
> I'd find additional hints on how to execute & debug changes to a local
> development version of SciPy really useful. I'm still struggling with
> this.
> I think to try out & debug changes to Python code one needs to compile &
> install the full package which is not really feasible for every change.
>

`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.
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.


> My current hack is to overwrite selected files in the site-packages
> folder (where SciPy-Dev is installed) with the modified files through a
> simple script. That way I don't need to rebuild the binaries.
>

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.


> I'm sure there is a better approach and it may be useful to cover these
> steps (how to debug or execute selected unit tests in PyCharm or any
> other IDE) as well.
>
> At least on Linux I found the contribution guide quite helpful for the
> initial setup. However I think some tips on how to install from source
> into a conda or virtualenv environment would improve this further. As it
> is, coming from Windows, some backround knowledge about Linux is
> definitly required.
>
> Greetings, Lars
>
> _______________________________________________
> SciPy-Dev mailing list
> SciPy-Dev at python.org
> https://mail.python.org/mailman/listinfo/scipy-dev
>



-- 
_____________________________________
Dr. Andrew Nelson


_____________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20180124/633f2506/attachment-0001.html>


More information about the SciPy-Dev mailing list