contributing.rst
This file
Path
docs/dev/contributing.rst
145 lines · 5.2 KiB
Last changed by
Merge remote-tracking branch 'origin/master'Kenneth Reitzbefore adoption8686255
History of this fileTake it
Merge remote-tracking branch 'origin/master'Kenneth Reitzbefore adoption8686255
lines 1–145why, one step back1.. _contributing:23Contributor's Guide4===================56If you're reading this you're probably interested in contributing to7Requests. First, We'd like to say: thank you! Open source projects8live-and-die based on the support they receive from others, and the fact that9you're even considering supporting Requests is very generous of10you.1112This document lays out guidelines and advice for contributing to Requests.13If you're thinking of contributing, start by reading this thoroughly and14getting a feel for how contributing to the project works. If you have any15questions, feel free to reach out to either `Ian Cordasco`_ or `Cory Benfield`_,16the primary maintainers.1718The guide is split into sections based on the type of contribution you're19thinking of making, with a section that covers general guidelines for all20contributors.2122.. _Ian Cordasco: http://www.coglib.com/~icordasc/23.. _Cory Benfield: https://lukasa.co.uk/about242526All Contributions27-----------------2829Be Cordial30~~~~~~~~~~3132**Be cordial or be on your way.**3334Requests has one very important rule governing all forms of contribution,35including reporting bugs or requesting features. This golden rule is36`be cordial or be on your way`_. **All contributions are welcome**, as long as37everyone involved is treated with respect.3839.. _be cordial or be on your way: http://kennethreitz.org/be-cordial-or-be-on-your-way/4041.. _early-feedback:4243Get Early Feedback44~~~~~~~~~~~~~~~~~~4546If you are contributing, do not feel the need to sit on your contribution until47it is perfectly polished and complete. It helps everyone involved for you to48seek feedback as early as you possibly can. Submitting an early, unfinished49version of your contribution for feedback in no way prejudices your chances of50getting that contribution accepted, and can save you from putting a lot of work51into a contribution that is not suitable for the project.5253Contribution Suitability54~~~~~~~~~~~~~~~~~~~~~~~~5556The project maintainer has the last word on whether or not a contribution is57suitable for Requests. All contributions will be considered, but from time58to time contributions will be rejected because they do not suit the project.5960If your contribution is rejected, don't despair! So long as you followed these61guidelines, you'll have a much better chance of getting your next contribution62accepted.636465Code Contributions66------------------6768Steps69~~~~~7071When contributing code, you'll want to follow this checklist:72731. Fork the repository on GitHub.742. Run the tests to confirm they all pass on your system. If they don't, you'll75 need to investigate why they fail. If you're unable to diagnose this76 yourself, raise it as a bug report by following the guidelines in this77 document: :ref:`bug-reports`.783. Write tests that demonstrate your bug or feature. Ensure that they fail.794. Make your change.805. Run the entire test suite again, confirming that all tests pass *including81 the ones you just added*.826. Send a GitHub Pull Request to the main repository's ``master`` branch.83 GitHub Pull Requests are the expected method of code collaboration on this84 project.8586The following sub-sections go into more detail on some of the points above.8788Code Review89~~~~~~~~~~~9091Contributions will not be merged until they've been code reviewed. You should92implement any code review feedback unless you strongly object to it. In the93event that you object to the code review feedback, you should make your case94clearly and calmly. If, after doing so, the feedback is judged to still apply,95you must either apply the feedback or withdraw your contribution.9697New Contributors98~~~~~~~~~~~~~~~~99100If you are new or relatively new to Open Source, welcome! Requests aims to101be a gentle introduction to the world of Open Source. If you're concerned about102how best to contribute, please consider mailing a maintainer (listed above) and103asking for help.104105Please also check the :ref:`early-feedback` section.106107Documentation Contributions108---------------------------109110Documentation improvements are always welcome! The documentation files live in111the ``docs/`` directory of the codebase. They're written in112`reStructuredText`_, and use `Sphinx`_ to generate the full suite of113documentation.114115When contributing documentation, please attempt to follow the style of the116documentation files. This means a soft-limit of 79 characters wide in your text117files and a semi-formal prose style.118119.. _reStructuredText: http://docutils.sourceforge.net/rst.html120.. _Sphinx: http://sphinx-doc.org/index.html121122123.. _bug-reports:124125Bug Reports126-----------127128Bug reports are hugely important! Before you raise one, though, please check129through the `GitHub issues`_, **both open and closed**, to confirm that the bug130hasn't been reported before. Duplicate bug reports are a huge drain on the time131of other contributors, and should be avoided as much as possible.132133.. _GitHub issues: https://github.com/kennethreitz/requests/issues134135136Feature Requests137----------------138139Requests is in a perpeptual feature freeze. The maintainers believe that140requests contains every major feature currently required by the vast majority141of users.142143If you believe there is a feature missing, feel free to raise a feature144request, but please do be aware that the overwhelming likelihood is that your145feature request will not be accepted.