Working on Scipy
Anne Archibald's workflow
This is on Linux.
The first time
Check out the current SVN version
svn co to some local directory
Set things up so compilation doesn't break anything
write compile.sh to do a setuptools install to some arcane local directory; write develop.sh to source when you want that directory on your PYTHONPATH
Compile the current version
Run the tests
python -c "import scipy; scipy.test()"
Unfortunately, there are often some failing tests before you even start. Usually I just check that nothing looks too suspicious and remember that these ones are still going to fail when I'm done.
Second and later times
Compile and test
. develop.sh ./compile.sh python -c "import scipy; scipy.test()"
Write some tests
How to test the module you're working on, say scipy.interpolate:
./compile.sh && python -c "import scipy.interpolate; scipy.interpolate.test()"
How to write a test:
How to make sure it's getting run: I usually just add "assert False" and make sure it fails.
How to run just one test and bring up a debugger if it fails:
Fix the bug/implement the feature
This is usually surprisingly easy by this point.
Run all scipy tests
./compile.sh python -c "import scipy; scipy.test()"
Document the change
Just write some docstrings. I usually just format them like other docstrings in similar functions, but there's a prescribed format somewhere.
Force an autobuild: