From 2944df6de5872aa12974dda541f156efeaff37e1 Mon Sep 17 00:00:00 2001 From: Jonathan Huot Date: Mon, 6 Dec 2021 21:23:43 +0100 Subject: [PATCH] Initial version of contributing guide --- docs/contributing.rst | 54 +++++++++++++++++++++++++++++++++++++++++++ docs/index.rst | 1 + 2 files changed, 55 insertions(+) create mode 100644 docs/contributing.rst diff --git a/docs/contributing.rst b/docs/contributing.rst new file mode 100644 index 00000000..ba61c157 --- /dev/null +++ b/docs/contributing.rst @@ -0,0 +1,54 @@ +============ +Contributing +============ + +Test simple changes +=================== + +Requests-OAuthlib is using `tox`_ as main test tool. +It helps creating the required virtualenv for your python version. +For example, if you have installed Python3.7: + +.. sourcecode:: bash + + $ tox -e py37 + + +Validate documentation changes +============================== + +Tox contains also a build method to generate documentation locally. + +.. sourcecode:: bash + + $ tox -e docs,readme + +Then open the HTML page in `_build/html/index.html` + + +Verify all pythons versions +=========================== + +Requests-OAuthlib supports multiple versions of Python. +You can test all Python versions conveniently using `tox`_. + +.. sourcecode:: bash + + $ tox + +In order to run successfully, you will need all versions of Python installed. We recommend using `pyenv`_ to install those Python versions. + +.. sourcecode:: bash + + $ pyenv install 2.7.18 + $ pyenv install 3.4.10 + $ pyenv install 3.5.10 + $ pyenv install 3.6.14 + $ pyenv install 3.7.11 + $ pyenv install pypy2.7-7.1.1 + $ pyenv install pypy3.6-7.1.1 + +.. _`tox`: https://tox.readthedocs.io/en/latest/install.html +.. _`virtualenv`: https://virtualenv.pypa.io/en/latest/installation/ +.. _`pyenv`: https://github.com/pyenv/pyenv + diff --git a/docs/index.rst b/docs/index.rst index e933eb39..ad5138d3 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -72,6 +72,7 @@ Getting Started: examples/examples api + contributing