Wiki
Clone wikibnpy-dev / How To Contribute Code
Public development to bnpy happens on a bitbucket repository using git version control.
This repository is https://bitbucket.org/michaelchughes/bnpy-dev/.
We use a shared-repository model for contributing code. All users push and pull code from the shared bnpy-dev repo, and (when approved) certain code will be merged into the "main" codebase, on branch master.
Workflow for starting out some new code
1) Create an issue on the bitbucket web interface.
bnpy-dev ISSUE TRACKER: https://bitbucket.org/michaelchughes/bnpy-dev/issues/
Clearly describe what the issue is (bug? new feature?) and what a solution will need to do.
2) Wait for a senior developer (usually Mike) to approve the issue.
Be ready to respond to comments. Use the web interface.
3) Write the code! Do this on a local branch of master, named intelligently for your current feature.
git checkout master # start on master git checkout -b myfeature # create a new feature ... write code and tests and demos ... git commit -m "<CODE> my informative commit message"
4) When ready for other people to take a look, push your branch to the bnpy-dev repo
https://confluence.atlassian.com/display/BITBUCKET/Branching+a+Repository
git push origin BRANCH_NAME
Workflow for submitting finished code for final review
We use Pull Requests to integrate code to the master branch.
To see an example: https://bitbucket.org/michaelchughes/bnpy-dev/pull-request/1/
1) Check all relevant code into your branch on the remote repo.
git checkout myfeature git commit -m "ENH My awesome changes that fix Issue #33" git push origin myfeature
2) Open a pull request on bnpy-dev via the web interface.
https://confluence.atlassian.com/display/BITBUCKET/Work+with+pull+requests
Make sure you clearly describe in the pull-request text which Issue this fixes. You can just include "Fixes Issue #42", and bitbucket will auto-reference and create a link to the issue tracker.
3) Wait for other contributers to approve this request.
Usually this will just take a day or two.
Updated