Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.
You can contribute in many ways:
Report bugs at https://github.com/nanograv/pint/issues.
If you are reporting a bug, please include:
- Your operating system name and version.
- The output of
pint.__version__
andpint.__file__
- Any details about your local setup that might be helpful in troubleshooting, such as the command used to install PINT and whether you are using a virtualenv.
- Detailed steps to reproduce the bug, as simply as possible.
The best way to send feedback is to file an issue at https://github.com/nanograv/pint/issues.
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 this is a volunteer-driven project, and that contributions are welcome :)
Look through the GitHub issues for bugs. Anything tagged with good first issue, help wanted, or bug is open to whoever wants to implement it. If you want to fix a bug or add any other code, please use GitHub and suggest your changes in the form of a Pull Request (see below); this makes it easy for everyone to examine your changes, discuss them with you, and update them as needed.
Look through the GitHub issues for features. Anything tagged with "enhancement" and "help wanted" is open to whoever wants to implement it. If your idea is for a new feature or an important change, you may want to open an issue where the idea can be discussed before you write too much code.
PINT could always use more documentation, whether as part of the official pint docs, in docstrings, or even on the web in blog posts, articles, and such.
Writing documentation is a great way to get started: everyone wants there to be documentation, but no one wants to stop writing code long enough to write it, so we are all very grateful when you do. And as a result of figuring out enough to write good documentation, you come to understand the code very well.
Ready to contribute? Here's how to set up PINT for local development.
Fork the
pint
repo on GitHub.Clone your fork locally:
$ git clone [email protected]:your_name_here/pint.git
Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development:
$ mkvirtualenv pint $ cd PINT/ $ pip install -r requirements_dev.txt $ pip install -r requirements.txt $ pip install -e .
Create a branch for local development:
$ git checkout -b name-of-your-bugfix-or-feature
Now you can make your changes locally.
When you're done making changes, check that your changes pass the tests. Also check that any new docs are formatted correctly:
$ make test $ tox $ make docs
Commit your changes and push your branch to GitHub:
$ git add . $ git commit -m "Your detailed description of your changes." $ git push origin name-of-your-bugfix-or-feature
Submit a pull request through the GitHub website.
Check that our automatic testing "Travis CI" passes your code. If problems crop up, fix them, commit the changes, and push a new version, which will automatically update the pull request:
$ git add pint/file-i-just-fixed.py $ git commit -m "Fixed bug where..." $ git push
The maintainers will review and comment on the PR. They may ask why you made certain design decisions or ask you to make some stylistic or functional changes. If accepted, it will be merged into the master branch.
Before you submit a pull request, check that it meets these guidelines:
- Try to write clear :ref:`pythonic` code, follow our :ref:`CodingStyle`, and think about how others might use your new code.
- The pull request should include tests that cover both the expected behaviour and sensible error reporting when given bad input.
- If the pull request adds or changes functionality, the docs should
be updated. Put your new functionality into a function with a
docstring. Check the HTML documentation produced by
make docs
to make sure your new documentation appears and looks reasonable. - The pull request should work for Python 2.7 and 3.6+. Check https://travis-ci.org/nanograv/pint/pull_requests and make sure that the tests pass for all supported Python versions.