contributing.rst
This file
Path
docs/dev/contributing.rst
155 lines · 5.8 KiB
Last changed by
spKenneth Reitzbefore adoption2cb052a
History of this fileTake it
1.. _contributing:23Contributor's Guide4===================56If you're reading this, you're probably interested in contributing to Requests.7Thank you very much! Open source projects live-and-die based on the support8they receive from others, and the fact that you're even considering9contributing to the Requests project is *very* generous of you.1011This document lays out guidelines and advice for contributing to this project.12If you're thinking of contributing, please start by reading this document and13getting a feel for how contributing to this project works. If you have any14questions, feel free to reach out to either `Ian Cordasco`_ or `Cory Benfield`_,15the primary maintainers.1617.. _Ian Cordasco: http://www.coglib.com/~icordasc/18.. _Cory Benfield: https://lukasa.co.uk/about1920If you have non-technical feedback, philosophical ponderings, crazy ideas, or21other general thoughts about Requests or its position within the Python22ecosystem, the BDFL, `Kenneth Reitz`_, would love to hear from you.2324The guide is split into sections based on the type of contribution you're25thinking of making, with a section that covers general guidelines for all26contributors.2728.. _Kenneth Reitz: mailto:me@kennethreitz.org2930Be Cordial31----------3233 **Be cordial or be on your way**. *—Kenneth Reitz*3435Requests has one very important rule governing all forms of contribution,36including reporting bugs or requesting features. This golden rule is37"`be cordial or be on your way`_".3839**All contributions are welcome**, as long as40everyone involved is treated with respect.4142.. _be cordial or be on your way: http://kennethreitz.org/be-cordial-or-be-on-your-way/4344.. _early-feedback:4546Get Early Feedback47------------------4849If you are contributing, do not feel the need to sit on your contribution until50it is perfectly polished and complete. It helps everyone involved for you to51seek feedback as early as you possibly can. Submitting an early, unfinished52version of your contribution for feedback in no way prejudices your chances of53getting that contribution accepted, and can save you from putting a lot of work54into a contribution that is not suitable for the project.5556Contribution Suitability57------------------------5859The project maintainer has the last word on whether or not a contribution is60suitable for Requests. All contributions will be considered, but from time61to time contributions will be rejected because they do not suit the project.6263If your contribution is rejected, don't despair! So long as you followed these64guidelines, you'll have a much better chance of getting your next contribution65accepted.666768Code Contributions69------------------7071Steps72~~~~~7374When contributing code, you'll want to follow this checklist:75761. Fork the repository on GitHub.772. Run the tests to confirm they all pass on your system. If they don't, you'll78 need to investigate why they fail. If you're unable to diagnose this79 yourself, raise it as a bug report by following the guidelines in this80 document: :ref:`bug-reports`.813. Write tests that demonstrate your bug or feature. Ensure that they fail.824. Make your change.835. Run the entire test suite again, confirming that all tests pass *including84 the ones you just added*.856. Send a GitHub Pull Request to the main repository's ``master`` branch.86 GitHub Pull Requests are the expected method of code collaboration on this87 project.8889The following sub-sections go into more detail on some of the points above.9091Code Review92~~~~~~~~~~~9394Contributions will not be merged until they've been code reviewed. You should95implement any code review feedback unless you strongly object to it. In the96event that you object to the code review feedback, you should make your case97clearly and calmly. If, after doing so, the feedback is judged to still apply,98you must either apply the feedback or withdraw your contribution.99100New Contributors101~~~~~~~~~~~~~~~~102103If you are new or relatively new to Open Source, welcome! Requests aims to104be a gentle introduction to the world of Open Source. If you're concerned about105how best to contribute, please consider mailing a maintainer (listed above) and106asking for help.107108Please also check the :ref:`early-feedback` section.109110Documentation Contributions111---------------------------112113Documentation improvements are always welcome! The documentation files live in114the ``docs/`` directory of the codebase. They're written in115`reStructuredText`_, and use `Sphinx`_ to generate the full suite of116documentation.117118When contributing documentation, please do your best to follow the style of the119documentation files. This means a soft-limit of 79 characters wide in your text120files and a semi-formal, yet friendly and approachable, prose style.121122When presenting Python code, use single-quoted strings (``'hello'`` instead of123``"hello"``).124125.. _reStructuredText: http://docutils.sourceforge.net/rst.html126.. _Sphinx: http://sphinx-doc.org/index.html127128129.. _bug-reports:130131Bug Reports132-----------133134Bug reports are hugely important! Before you raise one, though, please check135through the `GitHub issues`_, **both open and closed**, to confirm that the bug136hasn't been reported before. Duplicate bug reports are a huge drain on the time137of other contributors, and should be avoided as much as possible.138139.. _GitHub issues: https://github.com/kennethreitz/requests/issues140141142Feature Requests143----------------144145Requests is in a perpetual feature freeze, only the BDFL can add or approve of146new features. The maintainers believe that Requests is a feature-complete147peice of software at this time.148149One of the most important skills to have while maintaining a largely-used150open source project is learning the ability to say "no" to suggested changes,151while keeping an open ear and mind.152153If you believe there is a feature missing, feel free to raise a feature154request, but please do be aware that the overwhelming likelihood is that your155feature request will not be accepted.