|
| 1 | +.. highlight:: shell |
| 2 | + |
| 3 | +============ |
| 4 | +Contributing |
| 5 | +============ |
| 6 | + |
| 7 | +Contributions are welcome, and they are greatly appreciated! Every |
| 8 | +little bit helps, and credit will always be given. |
| 9 | + |
| 10 | +You can contribute in many ways: |
| 11 | + |
| 12 | +Types of Contributions |
| 13 | +---------------------- |
| 14 | + |
| 15 | +Report Bugs |
| 16 | +~~~~~~~~~~~ |
| 17 | + |
| 18 | +Report bugs at https://github.com/michaelaye/planets/issues. |
| 19 | + |
| 20 | +If you are reporting a bug, please include: |
| 21 | + |
| 22 | +* Your operating system name and version. |
| 23 | +* Any details about your local setup that might be helpful in troubleshooting. |
| 24 | +* Detailed steps to reproduce the bug. |
| 25 | + |
| 26 | +Fix Bugs |
| 27 | +~~~~~~~~ |
| 28 | + |
| 29 | +Look through the GitHub issues for bugs. Anything tagged with "bug" |
| 30 | +and "help wanted" is open to whoever wants to implement it. |
| 31 | + |
| 32 | +Implement Features |
| 33 | +~~~~~~~~~~~~~~~~~~ |
| 34 | + |
| 35 | +Look through the GitHub issues for features. Anything tagged with "enhancement" |
| 36 | +and "help wanted" is open to whoever wants to implement it. |
| 37 | + |
| 38 | +Write Documentation |
| 39 | +~~~~~~~~~~~~~~~~~~~ |
| 40 | + |
| 41 | +planets could always use more documentation, whether as part of the |
| 42 | +official planets docs, in docstrings, or even on the web in blog posts, |
| 43 | +articles, and such. |
| 44 | + |
| 45 | +Submit Feedback |
| 46 | +~~~~~~~~~~~~~~~ |
| 47 | + |
| 48 | +The best way to send feedback is to file an issue at https://github.com/michaelaye/planets/issues. |
| 49 | + |
| 50 | +If you are proposing a feature: |
| 51 | + |
| 52 | +* Explain in detail how it would work. |
| 53 | +* Keep the scope as narrow as possible, to make it easier to implement. |
| 54 | +* Remember that this is a volunteer-driven project, and that contributions |
| 55 | + are welcome :) |
| 56 | + |
| 57 | +Get Started! |
| 58 | +------------ |
| 59 | + |
| 60 | +Ready to contribute? Here's how to set up `planets` for local development. |
| 61 | + |
| 62 | +1. Fork the `planets` repo on GitHub. |
| 63 | +2. Clone your fork locally:: |
| 64 | + |
| 65 | + $ git clone [email protected]:your_name_here/planets.git |
| 66 | + |
| 67 | +3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development:: |
| 68 | + |
| 69 | + $ mkvirtualenv planets |
| 70 | + $ cd planets/ |
| 71 | + $ python setup.py develop |
| 72 | + |
| 73 | +4. Create a branch for local development:: |
| 74 | + |
| 75 | + $ git checkout -b name-of-your-bugfix-or-feature |
| 76 | + |
| 77 | + Now you can make your changes locally. |
| 78 | + |
| 79 | +5. When you're done making changes, check that your changes pass flake8 and the tests:: |
| 80 | + |
| 81 | + $ flake8 planets tests |
| 82 | + $ python setup.py test or py.test |
| 83 | + |
| 84 | + To get flake8, just pip install them into your conda env. |
| 85 | + |
| 86 | +6. Commit your changes and push your branch to GitHub:: |
| 87 | + |
| 88 | + $ git add . |
| 89 | + $ git commit -m "Your detailed description of your changes." |
| 90 | + $ git push origin name-of-your-bugfix-or-feature |
| 91 | + |
| 92 | +7. Submit a pull request through the GitHub website. |
| 93 | + |
| 94 | +Pull Request Guidelines |
| 95 | +----------------------- |
| 96 | + |
| 97 | +Before you submit a pull request, check that it meets these guidelines: |
| 98 | + |
| 99 | +1. The pull request should include tests. |
| 100 | +2. If the pull request adds functionality, the docs should be updated. Put |
| 101 | + your new functionality into a function with a docstring, and add the |
| 102 | + feature to the list in README.rst. |
| 103 | +3. The pull request should work for Python 3.7. Check |
| 104 | + https://travis-ci.org/michaelaye/planets/pull_requests |
| 105 | + and make sure that the tests pass for all supported Python versions. |
| 106 | + |
| 107 | +Tips |
| 108 | +---- |
| 109 | + |
| 110 | +To run a subset of tests:: |
| 111 | + |
| 112 | +$ py.test tests.test_planets |
| 113 | + |
0 commit comments