From 968223448a9b1bf3bb1234519f7c6fa0692033cd Mon Sep 17 00:00:00 2001 From: Nate Prewitt Date: Wed, 16 May 2018 08:44:52 -0700 Subject: [PATCH] adding contribution docs and guidelines to Pipenv --- CONTRIBUTING.md | 57 ++++++++++++++++++ CONTRIBUTING.rst | 20 ------- docs/dev/contributing.rst | 122 ++++++++++++++++++++++++++++++++++++++ docs/dev/philosophy.rst | 23 +++++++ 4 files changed, 202 insertions(+), 20 deletions(-) create mode 100644 CONTRIBUTING.md delete mode 100644 CONTRIBUTING.rst create mode 100644 docs/dev/contributing.rst create mode 100644 docs/dev/philosophy.rst diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000000..af7ab55b06 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,57 @@ +# Contribution Guidelines + +Before opening any issues or proposing any pull requests, please do the +following: + +1. Read our [Contributor's Guide](http://docs.pipenv.org/en/latest/dev/contributing/). +2. Understand our [development philosophy](http://docs.pipenv.org/en/latest/dev/philosophy/). + +To get the greatest chance of helpful responses, please also observe the +following additional notes. + +## Questions + +The GitHub issue tracker is for *bug reports* and *feature requests*. Please do +not use it to ask questions about how to use Pipenv. These questions should +instead be directed to [Stack Overflow](https://stackoverflow.com/). Make sure +that your question is tagged with the `pipenv` tag when asking it on +Stack Overflow, to ensure that it is answered promptly and accurately. + +## Good Bug Reports + +Please be aware of the following things when filing bug reports: + +1. Avoid raising duplicate issues. *Please* use the GitHub issue search feature + to check whether your bug report or feature request has been mentioned in + the past. Duplicate bug reports and feature requests are a huge maintenance + burden on the limited resources of the project. If it is clear from your + report that you would have struggled to find the original, that's ok, but + if searching for a selection of words in your issue title would have found + the duplicate then the issue will likely be closed extremely abruptly. +2. When filing bug reports about exceptions or tracebacks, please include the + *complete* traceback. Partial tracebacks, or just the exception text, are + not helpful. Issues that do not contain complete tracebacks may be closed + without warning. +3. Make sure you provide a suitable amount of information to work with. This + means you should provide: + + - Guidance on **how to reproduce the issue**. Ideally, this should be a + *small* code sample that can be run immediately by the maintainers. + Failing that, let us know what you're doing, how often it happens, what + environment you're using, etc. Be thorough: it prevents us needing to ask + further questions. + - Tell us **what you expected to happen**. When we run your example code, + what are we expecting to happen? What does "success" look like for your + code? + - Tell us **what actually happens**. It's not helpful for you to say "it + doesn't work" or "it fails". Tell us *how* it fails: do you get an + exception? A hang? The packages installed seem incorrect? + How was the actual result different from your expected result? + - Tell us **what version of Pipenv you're using**, and + **how you installed it**. Different versions of Pipenv behave + differently and have different bugs, and some distributors of Pipenv + ship patches on top of the code we supply. + + If you do not provide all of these things, it will take us much longer to + fix your problem. If we ask you to clarify these and you never respond, we + will close your issue without fixing it. diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst deleted file mode 100644 index b23fee4d89..0000000000 --- a/CONTRIBUTING.rst +++ /dev/null @@ -1,20 +0,0 @@ -Contributing to pipenv -====================== - -To work on pipenv itself, fork the repository and clone your fork to your local -system. - -Now, install the development requirements:: - - cd pipenv - virtualenv ~/pipenv-venv # You can use a different path if you like. - source ~/pipenv-venv/bin/activate - python setup.py develop - pipenv install --dev - - -To run the test suite locally:: - - pipenv run pytest tests - - diff --git a/docs/dev/contributing.rst b/docs/dev/contributing.rst new file mode 100644 index 0000000000..b2785c298b --- /dev/null +++ b/docs/dev/contributing.rst @@ -0,0 +1,122 @@ +Contributing to Pipenv +====================== + +If you're reading this, you're probably interested in contributing to Pipenv. +Thank you very much! Open source projects live-and-die based on the support +they receive from others, and the fact that you're even considering +contributing to the Pipenv project is *very* generous of you. + +This document lays out guidelines and advice for contributing to this project. +If you're thinking of contributing, please start by reading this document and +getting a feel for how contributing to this project works. If you have any +questions, feel free to reach out to either `Dan Ryan`_, `Tzu-ping Chung`_, +or `Nate Prewitt`_, the primary maintainers. + +.. _Dan Ryan: https://github.com/techalchemy +.. _Tzu-ping Chung: https://github.com/uranusjr +.. _Nate Prewitt: https://github.com/nateprewitt + +The guide is split into sections based on the type of contribution you're +thinking of making, with a section that covers general guidelines for all +contributors. + +Be Cordial +---------- + + **Be cordial or be on your way**. *—Kenneth Reitz* + +Pipenv has one very important rule governing all forms of contribution, +including reporting bugs or requesting features. This golden rule is +"`be cordial or be on your way`_". + +**All contributions are welcome**, as long as +everyone involved is treated with respect. + +.. _be cordial or be on your way: http://kennethreitz.org/be-cordial-or-be-on-your-way/ + +.. _early-feedback: + +Get Early Feedback +------------------ + +If you are contributing, do not feel the need to sit on your contribution until +it is perfectly polished and complete. It helps everyone involved for you to +seek feedback as early as you possibly can. Submitting an early, unfinished +version of your contribution for feedback in no way prejudices your chances of +getting that contribution accepted, and can save you from putting a lot of work +into a contribution that is not suitable for the project. + +Contribution Suitability +------------------------ + +Our project maintainers have the last word on whether or not a contribution is +suitable for Pipenv. All contributions will be considered carefully, but from +time to time, contributions will be rejected because they do not suit the +current goals or needs of the project. + +If your contribution is rejected, don't despair! As long as you followed these +guidelines, you will have a much better chance of getting your next +contribution accepted. + +Code Contributions +------------------ + +Steps for Submitting Code +~~~~~~~~~~~~~~~~~~~~~~~~~ + +When contributing code, you'll want to follow this checklist: + +1. Fork the repository on GitHub. +2. Run the tests to confirm they all pass on your system. If they don't, you'll + need to investigate why they fail. If you're unable to diagnose this + yourself, raise it as a bug report by following the guidelines in this + document: :ref:`bug-reports`. +3. Write tests that demonstrate your bug or feature. Ensure that they fail. +4. Make your change. +5. Run the entire test suite again, confirming that all tests pass *including + the ones you just added*. +6. Send a GitHub Pull Request to the main repository's ``master`` branch. + GitHub Pull Pipenv are the expected method of code collaboration on this + project. + +The following sub-sections go into more detail on some of the points above. + +Code Review +~~~~~~~~~~~ + +Contributions will not be merged until they've been code reviewed. You should +implement any code review feedback unless you strongly object to it. In the +event that you object to the code review feedback, you should make your case +clearly and calmly. If, after doing so, the feedback is judged to still apply, +you must either apply the feedback or withdraw your contribution. + +Documentation Contributions +--------------------------- + +Documentation improvements are always welcome! The documentation files live in +the ``docs/`` directory of the codebase. They're written in +`reStructuredText`_, and use `Sphinx`_ to generate the full suite of +documentation. + +When contributing documentation, please do your best to follow the style of the +documentation files. This means a soft-limit of 79 characters wide in your text +files and a semi-formal, yet friendly and approachable, prose style. + +When presenting Python code, use single-quoted strings (``'hello'`` instead of +``"hello"``). + +.. _reStructuredText: http://docutils.sourceforge.net/rst.html +.. _Sphinx: http://sphinx-doc.org/index.html + + +.. _bug-reports: + +Bug Reports +----------- + +Bug reports are hugely important! Before you raise one, though, please check +through the `GitHub issues`_, **both open and closed**, to confirm that the bug +hasn't been reported before. Duplicate bug reports are a huge drain on the time +of other contributors, and should be avoided as much as possible. + +.. _GitHub issues: https://github.com/pypa/pipenv/issues diff --git a/docs/dev/philosophy.rst b/docs/dev/philosophy.rst new file mode 100644 index 0000000000..bf7146a4d2 --- /dev/null +++ b/docs/dev/philosophy.rst @@ -0,0 +1,23 @@ +Development Philosophy +====================== + +Pipenv is an open but opinionated tool, created by an open but opinionated developer. + + +Management Style +~~~~~~~~~~~~~~~~ + +`Kenneth Reitz `_ is the BDFL. He has final say in any decision related to the Pipenv project. Kenneth is responsible for the direction and form of the library, as well as its presentation. In addition to making decisions based on technical merit, he is responsible for making decisions based on the development philosophy of Pipenv. + +`Dan Ryan`_, `Tzu-ping Chung`_, and `Nate Prewitt`_ are the core contributors. +They are responsible for triaging bug reports, reviewing pull requests and ensuring that Kenneth is kept up to speed with developments around the library. +The day-to-day managing of the project is done by the core contributors. They are responsible for making judgements about whether or not a feature request is +likely to be accepted by Kenneth. + +Values +~~~~~~ + +- Simplicity is always better than functionality. +- Listen to everyone, then disregard it. +- The API is all that matters. Everything else is secondary. +- Fit the 90% use-case. Ignore the nay-sayers.