Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

Latest commit

 

History

History
115 lines (84 loc) · 3.99 KB

CONTRIBUTING.rst

File metadata and controls

115 lines (84 loc) · 3.99 KB

Contribution Process

  1. File an issue:
  2. Clone and/or update your checked out copy of neon to ensure you have the most recent commits from the master branch:
git clone https://github.com/NervanaSystems/neon.git
cd neon
git fetch origin
git checkout master
git pull
  1. Create a new feature branch for your work and switch to it. Give it a meaningful name related to the task(s) at hand:
git checkout -b my_new_feature_branch
  1. Locally build neon
make
  1. Ideally you'd start by creating one or more unit tests with the functionality you expect your new feature to perform. These should reside under the appropriate tests subdirectory of whatever you are changing. Then hack away at the code until you feel your feature is complete. Once satisfied, run the code through the following checks:
make check   # ensure this is clean or your patch won't be accepted
make test   # ensure all are OK
make style  # ensure there are no style related issues
make lint   # (optional).  We still have a fair bit to clean up currently!
  1. If necessary you may want to update and/or rebuild the documentation. This all exists under doc/source and is in Sphinx reStructuredText format:
make html  # builds docs locally, starts a webserver so you can view
  1. Commit your changes and push your feature branch to your github fork. Be sure to add a descriptive message and reference the github issue associated with your task (ex. #1). You will also want to rebase your commits down to a single sensible commit to make things clean for the merge process:
git add my_updated_file.txt
git commit -m "Added new awesome functionality.  Closes issue #1"
git push origin my_new_feature_branch
  1. Create a new pull request to get your feature branch merged into master for others to use. You'll first need to ensure your feature branch contains the latest changes from master. Furthermore, internal devs will need to assign the request to someone else for a code review. You must also ensure there are no errors when run through the items defined in step 5.
# (external contribs): make a new pull request:
https://github.com/NervanaSystems/neon/pulls

# merge latest master changes into your feature branch
git fetch origin
git checkout master
git pull origin master
git checkout my_new_feature_branch
git merge master  # you may need to manually resolve any merge conflicts
  1. If there are issues you can continue to push commits to your feature branch by following step 7. They will automatically be added to this same merge request.
  2. Once your change has been successfully merged, you can remove the source
branch and ensure your local copy is up to date:
git fetch origin
git checkout master
git pull
git branch -d my_new_feature_branch
git branch -d -r origin/my_new_feature_branch
  1. Give yourself a high five for a job well done!