|
| 1 | + |
| 2 | +Contributing code |
| 3 | +================= |
| 4 | + |
| 5 | +How to contribute |
| 6 | +----------------- |
| 7 | + |
| 8 | +The preferred way to contribute to resampy is to fork the |
| 9 | +[main repository](http://github.com/bmcfee/resampy/) on |
| 10 | +GitHub: |
| 11 | + |
| 12 | +1. Fork the [project repository](http://github.com/bmcfee/resampy): |
| 13 | + click on the 'Fork' button near the top of the page. This creates |
| 14 | + a copy of the code under your account on the GitHub server. |
| 15 | + |
| 16 | +2. Clone this copy to your local disk: |
| 17 | + |
| 18 | + $ git clone [email protected]:YourLogin/resampy.git |
| 19 | + $ cd resampy |
| 20 | + |
| 21 | +3. Create a branch to hold your changes: |
| 22 | + |
| 23 | + $ git checkout -b my-feature |
| 24 | + |
| 25 | + and start making changes. Never work in the ``master`` branch! |
| 26 | + |
| 27 | +4. Work on this copy on your computer using Git to do the version |
| 28 | + control. When you're done editing, do: |
| 29 | + |
| 30 | + $ git add modified_files |
| 31 | + $ git commit |
| 32 | + |
| 33 | + to record your changes in Git, then push them to GitHub with: |
| 34 | + |
| 35 | + $ git push -u origin my-feature |
| 36 | + |
| 37 | +Finally, go to the web page of the your fork of the resampy repo, |
| 38 | +and click 'Pull request' to send your changes to the maintainers for |
| 39 | +review. This will send an email to the committers. |
| 40 | + |
| 41 | +(If any of the above seems like magic to you, then look up the |
| 42 | +[Git documentation](http://git-scm.com/documentation) on the web.) |
| 43 | + |
| 44 | +It is recommended to check that your contribution complies with the |
| 45 | +following rules before submitting a pull request: |
| 46 | + |
| 47 | +- All public methods should have informative docstrings with sample |
| 48 | + usage presented. |
| 49 | + |
| 50 | +You can also check for common programming errors with the following |
| 51 | +tools: |
| 52 | + |
| 53 | +- Code with good unittest coverage (at least 99%), check with: |
| 54 | + |
| 55 | + $ pip install pytest pytest-cov pytest-faulthandler |
| 56 | + $ python setup.py build_ext -i |
| 57 | + $ py.test --cov-report term-missing --cov resampy |
| 58 | + |
| 59 | +Documentation |
| 60 | +------------- |
| 61 | + |
| 62 | +You can edit the documentation using any text editor and then generate |
| 63 | +the HTML output by typing ``make html`` from the docs/ directory. |
| 64 | +The resulting HTML files will be placed in _build/html/ and are viewable |
| 65 | +in a web browser. See the README file in the doc/ directory for more information. |
| 66 | + |
| 67 | +For building the documentation, you will need |
| 68 | +[sphinx](http://sphinx.pocoo.org/), |
| 69 | +[matplotlib](http://matplotlib.sourceforge.net/), and [scikit-learn](http://scikit-learn.org/). |
| 70 | + |
| 71 | + |
| 72 | +Note |
| 73 | +---- |
| 74 | +This document was gleefully borrowed from [scikit-learn](http://scikit-learn.org/). |
0 commit comments