Skip to content

Development workflow for SymEngine

Isuru Fernando edited this page Mar 25, 2017 · 10 revisions

Getting Started (to be done once)

  • Fork symengine/symengine to user/symengine
  • Clone the repository
git clone git@github.com:user/symengine.git
  • Set upstream remote
git remote add upstream git@github.com:symengine/symengine.git
  • Install clang-format on your system

Linux : sudo apt-get install clang-format-3.7

Mac OS : brew install clang-format

Starting on a new feature/bug-fix (to be done for each PR)

  • Switch branch to master and get the latest master from symengine/symengine
git checkout master
git pull upstream master
  • Create a new branch to add your feature/bug-fix
git checkout -b myfeaturebranch
  • All your work will now be done on this branch.

Committing code (to be done before EACH commit)

  • After making the necessary changes for you feature, make and test
cmake . (with optional parameters)
make
ctest
  • Run the code formatting script to stick to the code format of the repository
./bin/test_format_local.sh
  • Make sure the tests and code is formatted before committing

After committing changes

  • Once all your code has been committed, you need to create a PR
git push origin myfeaturebranch
  • Go to symengine/symengine and create a PR from user/myfeaturebranch to symengine/master

New commits after sending in the PR

  • If you need to make changes to your PR, just commit the changes (while following the above rules) and just push it to the new branch at your own remote. The PR will be automatically updated.
  • If your build fails only due to styling issues, or a trivial mistake, do not add another commit. Instead amend the last commit. You need to send in a force push, if you've changed already existing commits.
git push -f origin myfeaturebranch

Clone this wiki locally