Skip to content

Checklist for making a pull request

Rachel Mandelbaum edited this page May 10, 2016 · 25 revisions

If you've completed some piece of code that you want to have merged into master, below is a checklist for what you should do on the branch containing the new code before making a pull request (or after making it, if you do any substantial overhaul to the code then you should redo these steps):

Getting ready for a pull request:

  • Get the branch up to date, by merging in any recent changes from the master branch.
  • A final check that you can build the code: "scons", "scons install"
  • Make sure the unit tests still work: "scons tests". Ideally there should be some new unit tests for the new functionality, unless the work is completely covered by existing unit tests.
  • Check the documentation for your code at the C++ and python level to make sure it's complete and up-to-date.
  • Update CHANGELOG.md to mention your change.
  • Make sure that the new code conforms to our code guidelines, for example no tabs (4 spaces), 100 character line width.
  • If the change is sufficiently major, update the quick reference guide in doc/ref/ (the .tex file) and the PDF version in doc/ .
  • Make sure you can still run all demos using python and config. The easiest way is: "cd examples", "./check_yaml", "./check_json".
  • If you updated the tutorial functionality, update the tutorial wiki page.
  • Make sure any new files have BSD license at the top.
  • Depending on the nature of the change, check whether updates to README and INSTALL are needed.
  • If your update has changed the available options in config, then update the Config Documentation page on the wiki. The edit should be made to the page for the next version, not the current release version (which is the default Config Documentation page).

Making the request

  • On the GitHub site, go to "Code". Then click the green "Compare and Review" button. Your branch is probably in the "Example Comparisons" list, so click on it. If not, select it for the "compare" branch.
  • Make sure you are comparing your new branch to master. It probably won't be, since the front page is the latest release branch, rather than master now. So click the base branch and change it to master.
  • Press Create Pull Request button.
  • Give a brief title. (We usually leave the branch number as the start of the title.)
  • Explain the major changes you are asking to be code reviewed. Often it is useful to open a second tab in your browser where you can look through the diff yourself to remind yourself of all the changes you have made.

After code review:

  • Once at least 1 and preferably 2 people have reviewed the code, and you have responded to all of their comments, we generally solicit for "any other comments" and give people a few more days before merging.
  • Click the "Merge pull request" button at the bottom of the PR page.
  • Click the "Delete branch" button.
  • If there are other open pull requests, it is generally good etiquette to merge your changes into those branches.
  • Please do not merge the new changes into other open branches that are not yet in PR. (Unless you are the principal developer on the branch of course.) Developers working on those branches may have unpushed commits, so you should let them do the merge from master when they are ready for it.
Clone this wiki locally