Contributions are welcomed via pull requests. Contact the WEST developers before starting work to ensure it meshes well with the planned development direction and standards set for the project.
All changes in a pull request should be closely related. Multiple change sets that are loosely coupled should be proposed in separate pull requests. Use a consistent style for writing code.
New features should be applicable to a variety of use-cases. The WEST developers can assist you in designing flexible interfaces.
Add tests for all new functionality.
We use semantic versioning, i.e. version labels have the form v<major>.<minor>.<patch>
- Patch release: v0.0.0 to v0.0.1, only bug fixes
- Minor release: v0.0.0 to v0.1.0, bug fixes and new features that maintain backwards compatibility
- Major release: v0.0.0 to v1.0.0, bug fixes and new features that break backwards compatibility
Comment complex sections of code so that other developers can understand them. Add demonstrations of new functionality, e.g. using Jupyter notebooks.
- Clone the repository to your local machine:
$ git clone <https-or-ssh-git-repo>- Use the following to see all the available branches and which branch you are on:
$ git branch -a- Create a branch for the feature you are going to work on. Internal users should branch from the
developbranch.
$ git checkout -b <myfeature>- Make changes to the repository:
$ touch <file>- Check which files have been changed in your local directory by:
$ git status- Commit your changes and push to the remote repository:
$ git add <file>
$ git commit -m "explain your modification"
$ git push origin <myfeature>- (Optional) Check commit history by:
$ git log-
Then create a pull request on github.com that hosts the remote repository.
-
You can do one of the following after the pull request has been approved or closed:
- Delete the branch
myfeature - Keep the original branch and keep working on it
- Delete the branch
- When you want to add another feature, create a new branch for the new feature, e.g.
another_feature, branching from the latestdevelopbranch.
First switch to the develop branch:
$ git checkout developThen update the local develop branch to include changes to the remote:
$ git pull origin developThen create your new branch:
$ git branch -b <another_feature>Then repeat #4-#9 above.
- Suppose you are working on your feature branch and other people have changed the
developbranch in the remote repository after you created yourmyfeaturebranch, you need to merge thedevelopbranch into yourmyfeaturebranch before submitting a pull request.
To merge the develop branch into your myfeature branch, you need to checkout your myfeature branch:
$ git checkout <myfeature>Then do the following to merge the develop branch into your branch:
$ git pull origin developThen do #6-#9 above.