-
Notifications
You must be signed in to change notification settings - Fork 3
Adding Features,Fixing Bugs
This document describes the process for adding a new feature, or fixing a bug.
When adding or fixing a bug, one should create a branch off master, in order to separate your changes from the current version of the code. If you are unfamiliar with this concept, please follow this guide.
When making changes to the montblanc python code, its important to realise that montblanc is a python package that is designed to be installed in specific location. Thus, in order for your changes to "work", you need to build the package. This is accomplished by:
# cd /home/bob/montblanc
# python setup.py build
# export PYTHONPATH=/home/bob/montblanc/build/lib.linux-x86_64-2.7
Then you should be able to run a python console and run
import montblanc
Every time you make a change, you must run
# python setup.py build
for the change to work.
- Run the Test Suite.
- Record API changes in CHANGELOG.md.
Once you think your code is ready, you should run all the test cases in the tests
directory:
# cd tests
# python test_biro_v1.py
# python test_...
Also check that the MS_example.py
script works
# cd examples
# python MS_example.py -np 10 -ng 10 -c 10 ~/data/WSRT.MS
The above should run without any errors.
If you have made any API changes, record them in the CHANGELOG.md file.
Once you're happy that you've made the change, you can push the feature/bug branch to github
# git push origin <branchname>
Then, go to the web page on github, click the green button in the top left corner to create a pull request. Your code will then go through a review process before being merged into the master branch.
Switch back to the master branch and pull down your newly merged changes.
# git checkout master
# git pull origin master
# python setup.py build
You can now delete the branch on your machine.
# git branch -D <branchname>
# git branch -Dr origin/<branchname>