contributing.rst
This file
Path
docs/dev/contributing.rst
165 lines · 6.4 KiB
Last changed by
Merge pull request #6951 from tswast/patch-1Nate Prewittbefore adoption7341690
History of this fileTake it
The walk stopped after 200 commits: lines older than fc106ab point at it.
fix minor typos (#5934)Kevin Kirschebefore adoptionfc106ab
lines 1–24why, one step back1.. _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 `Nate Prewitt`_, `Ian Cordasco`_,15or `Seth Michael Larson`_, the primary maintainers.1617.. _Ian Cordasco: http://www.coglib.com/~icordasc/18.. _Nate Prewitt: https://www.nateprewitt.com/19.. _Seth Michael Larson: https://sethmlarson.dev/2021The guide is split into sections based on the type of contribution you're22thinking of making, with a section that covers general guidelines for all23contributors.24Merge pull request #6951 from tswast/patch-1Nate Prewittbefore adoption7341690
lines 25–26why, one step back25Code of Conduct26---------------fix minor typos (#5934)Kevin Kirschebefore adoptionfc106ab
line 27why, one step back27Merge pull request #6951 from tswast/patch-1Nate Prewittbefore adoption7341690
lines 28–33why, one step back28The Python community is made up of members from around the globe with a diverse29set of skills, personalities, and experiences. It is through these differences30that our community experiences great successes and continued growth. When you're31working with members of the community, follow the32`Python Software Foundation Code of Conduct`_ to help steer your interactions33and keep Python a positive, successful, and growing community.fix minor typos (#5934)Kevin Kirschebefore adoptionfc106ab
line 34why, one step back34Merge pull request #6951 from tswast/patch-1Nate Prewittbefore adoption7341690
line 35why, one step back35.. _Python Software Foundation Code of Conduct: https://policies.python.org/python.org/code-of-conduct/fix minor typos (#5934)Kevin Kirschebefore adoptionfc106ab
lines 36–93why, one step back3637.. _early-feedback:3839Get Early Feedback40------------------4142If you are contributing, do not feel the need to sit on your contribution until43it is perfectly polished and complete. It helps everyone involved for you to44seek feedback as early as you possibly can. Submitting an early, unfinished45version of your contribution for feedback in no way prejudices your chances of46getting that contribution accepted, and can save you from putting a lot of work47into a contribution that is not suitable for the project.4849Contribution Suitability50------------------------5152Our project maintainers have the last word on whether or not a contribution is53suitable for Requests. All contributions will be considered carefully, but from54time to time, contributions will be rejected because they do not suit the55current goals or needs of the project.5657If your contribution is rejected, don't despair! As long as you followed these58guidelines, you will have a much better chance of getting your next59contribution accepted.606162Code Contributions63------------------6465Steps for Submitting Code66~~~~~~~~~~~~~~~~~~~~~~~~~6768When contributing code, you'll want to follow this checklist:69701. Fork the repository on GitHub.712. Run the tests to confirm they all pass on your system. If they don't, you'll72 need to investigate why they fail. If you're unable to diagnose this73 yourself, raise it as a bug report by following the guidelines in this74 document: :ref:`bug-reports`.753. Write tests that demonstrate your bug or feature. Ensure that they fail.764. Make your change.775. Run the entire test suite again, confirming that all tests pass *including78 the ones you just added*.796. Send a GitHub Pull Request to the main repository's ``main`` branch.80 GitHub Pull Requests are the expected method of code collaboration on this81 project.8283The following sub-sections go into more detail on some of the points above.8485Code Review86~~~~~~~~~~~8788Contributions will not be merged until they've been code reviewed. You should89implement any code review feedback unless you strongly object to it. In the90event that you object to the code review feedback, you should make your case91clearly and calmly. If, after doing so, the feedback is judged to still apply,92you must either apply the feedback or withdraw your contribution.93Add automatic code formatting to Requests (#6095)Nate Prewittbefore adoption2a6f290
lines 94–108why, one step back94Code Style95~~~~~~~~~~9697Requests uses a collection of tools to ensure the code base has a consistent98style as it grows. We have these orchestrated using a tool called99`pre-commit`_. This can be installed locally and run over your changes prior100to opening a PR, and will also be run as part of the CI approval process101before a change is merged.102103You can find the full list of formatting requirements specified in the104`.pre-commit-config.yaml`_ at the top level directory of Requests.105106.. _pre-commit: https://pre-commit.com/107.. _.pre-commit-config.yaml: https://github.com/psf/requests/blob/main/.pre-commit-config.yaml108fix minor typos (#5934)Kevin Kirschebefore adoptionfc106ab
lines 109–165why, one step back109New Contributors110~~~~~~~~~~~~~~~~111112If you are new or relatively new to Open Source, welcome! Requests aims to113be a gentle introduction to the world of Open Source. If you're concerned about114how best to contribute, please consider mailing a maintainer (listed above) and115asking for help.116117Please also check the :ref:`early-feedback` section.118119120Documentation Contributions121---------------------------122123Documentation improvements are always welcome! The documentation files live in124the ``docs/`` directory of the codebase. They're written in125`reStructuredText`_, and use `Sphinx`_ to generate the full suite of126documentation.127128When contributing documentation, please do your best to follow the style of the129documentation files. This means a soft-limit of 79 characters wide in your text130files and a semi-formal, yet friendly and approachable, prose style.131132When presenting Python code, use single-quoted strings (``'hello'`` instead of133``"hello"``).134135.. _reStructuredText: http://docutils.sourceforge.net/rst.html136.. _Sphinx: http://sphinx-doc.org/index.html137138139.. _bug-reports:140141Bug Reports142-----------143144Bug reports are hugely important! Before you raise one, though, please check145through the `GitHub issues`_, **both open and closed**, to confirm that the bug146hasn't been reported before. Duplicate bug reports are a huge drain on the time147of other contributors, and should be avoided as much as possible.148149.. _GitHub issues: https://github.com/psf/requests/issues150151152Feature Requests153----------------154155Requests is in a perpetual feature freeze, only the BDFL can add or approve of156new features. The maintainers believe that Requests is a feature-complete157piece of software at this time.158159One of the most important skills to have while maintaining a largely-used160open source project is learning the ability to say "no" to suggested changes,161while keeping an open ear and mind.162163If you believe there is a feature missing, feel free to raise a feature164request, but please do be aware that the overwhelming likelihood is that your165feature request will not be accepted.