Skip to content
Aaron Meurer edited this page Nov 22, 2013 · 15 revisions

If you have been around for some time and actively participating in SymPy's development, you will be granted push access to the main repository. Then you can push in patches that passed review.

How to Push to Master

Once the Pull Request (PR) is reviewed, click the green "Merge" button at the github PR page.

Only use the merge button. Don't try to do stuff from the command line, because it is too easy to mess stuff up, and it's not worth it (and plus, Travis won't run unless there is a pull request).

To make sure that you never accidentally push something to SymPy, run

$ git remote set-url origin git://github.com/sympy/sympy.git

(replace sympy.git with the name of the repo for the other repos). This will set your origin url to git://, which is read only. Note that this may cause issues if you are on a firewall or proxy, so if you have issues pulling, you may need to set it back.

Checklist

There are basically four things that you need to do before pushing anything in:

  1. Make sure all tests pass (if it is part of the main repo; for the webpage, make sure everything looks good and also that the pages are built). Do this for the merged/rebased version to make sure that that didn't introduce any errors. For pull requests to SymPy, make sure Travis passes.

  2. Make sure that all content has been reviewed (for example, make sure that the person didn't push in a new commit to the branch for review that you didn't notice).

  3. Make sure that no one else has any objections to the branch. Everything is based on consensus, so until one is reached, the branch cannot be pushed in.

  4. All new functionality should be tested, and all new methods/functions/classes should have some doctests showing how to use them (the ./bin/coverage_doctest.py script will show you what methods have doctests). You can also use sympy-bot to test this (sympy-bot review <pull-number> --doc-coverage). This will upload a review to the pull request that will say if the documentation coverage has increased or decreased.


There is also a way to push patches from a command line (Pushing-patches-expert), but please do not use it, as it is too easy to screw things up.

Clone this wiki locally