First off, thanks for taking the time to contribute!
Contributions are welcome by anybody and everybody. We are not kidding! Looking for help ? Join us on Slack by requesting an invite.
The rest of this document will be guidelines to contributing to a project. Remember that these are just guidelines, not rules. Use common sense as much as possible.
Before you submit a pull request, check that it meets these guidelines:
- The pull request should include tests (if necessary). If you have any questions about how to write tests then ask the community.
- If the pull request adds functionality update the docs where appropriate.
- Use a good commit message.
The best way to report a bug is to file an issue via the target project's issue tracker.
Please include:
- Your operating system name and version.
- Any details about your local setup that might be helpful in troubleshooting.
- Detailed steps to reproduce the bug.
Look through the github issues for bugs or features request. Anything tagged with "help-wanted" is open to whoever wants to implement it.
Our projects could always use more documentation and examples, whether as part of the official documentation, in docstrings, or even on the web in blog posts, articles, and such.
The best way to submit feedback is to file an issue via the target project's issue tracker.
If you are proposing a feature:
- Explain in detail how it would work.
- Keep the scope as narrow as possible, to make it easier to implement.
- Remember that these are volunteer-driven projects, and that contributions are welcome :)
Ready to contribute? Here is our preferred approach to forking our projects:
Fork the target project's repo on github.
Clone your fork locally and add the upstream repository:
$ git clone [email protected]:<your-username>/<project-name>.git <project-name> $ cd <project-name>/ $ git remote add upstream https://github.com/pyslackers/<project-name>.git
Refer to the target project's CONTRIBUTING file. It contains the steps required to set up and run its preferred dev environment.
Create a branch for local development:
$ git checkout -b <name-of-your-bugfix-or-feature>
Now you can make your changes locally.
Refer to the target project's CONTRIBUTING file. It contains the steps required for testing.
Commit your changes and push your branch to github:
$ git add . $ git commit -m '<your commit message>' $ git push origin <name-of-your-bugfix-or-feature>
Submit a pull request through the github website.
Occasionally a Pull Request will have Merge Conflicts. Do not merge master into your branch. Instead, make sure your master
branch is up to date:
$ git checkout master
$ git pull upstream master
$ git push origin master
Then rebase your branch on master
:
$ git checkout <name-of-your-bugfix-or-feature>
$ git rebase master
If there are any conflicts you need to resolve, it will suspend the rebase for you to fix them. Then do:
$ git add .
$ git rebase --continue
It will do one round of conflict-checking for each commit in your branch, so keeping your history clean will make rebasing much easier. When the rebase is done, your branch will be up to date with master and ready to issue a PR if you are.