Skip to content
Dominique edited this page Oct 19, 2013 · 2 revisions

Thank you for considering contributing to PyKrylov! This is how code gets better.

Contributing to PyKrylov with git and pull requests is easy! Head to the main PyKrylov page and fork the repository to your account. Follow the instructions to clone your fork to your local machine and to define the upstream remote.

Ask yourself whether your pull request will apply to the master branch or to another branch. Typically, pull requests will apply to the develop branch, so the first thing to do is to make sure you have the latest of the develop branch:

git fetch upstream
git checkout develop
git merge upstream/develop

Replace develop above with the appropriate branch if your feature applies to another branch. Here's more information on keeping a fork in sync.

You're ready to create a new branch and start working on your feature:

git checkout -b my-feature

In your new branch you can make the changes that implement your feature. Please see the guidelines on Python and on commits below before you commit your work. When you're satisfied, you can push your changes to a branch on your account:

git push my-feature

At this point, your changes exist in the my-feature remote branch on your account. Head to your PyKrylov repository on Github, select the branch my-feature and hit the pull request button. Here's more information on pull requests. Make sure you submit the pull request to the appropriate PyKrylov branch.

Guidelines on Python

There's no point in being too strict about style because some situations defeat style guidelines. However, generally speaking and as much as is reasonably possible, I ask that you adhere to rough PEP8 guidelines. Fortunately, you don't have to memorize all this stuff or even keep referring to it, there exist PEP8 extensions for many text editors: Vim, Sublime Text, Emacs, TextMate, etc.

Guidelines on Commits

Please keep the following in mind when submitting pull requests:

  • one pull request per feature: don't group multiple features in the same pull request
  • ideally, one commit per pull request: this makes it easier for me to review your code. It's ok for you to make multiple commits while working on your feature but before you push to your remote branch, please squash your commits into a single commit.
  • commit messages should conform to the standard git form:
    • the first line is a descriptive commit summary of 50 characters or less. Use "Implement feature X" instead of "Add a cool new feature".
    • two (2) newlines, then
    • explain the commit throughly.

Will my Pull Request be Merged?

Probably. But keep in mind that I'll review your code and discuss it with you before merging anything. In your pull request, you also have the chance to comment your request, explain your motivation, your use case, or the source of the bug you're fixing.

Clone this wiki locally