summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTING.rst51
-rw-r--r--tests/requirements-dev.txt7
-rw-r--r--tests/requirements-tests.txt2
3 files changed, 59 insertions, 1 deletions
diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst
new file mode 100644
index 0000000..734f9b4
--- /dev/null
+++ b/CONTRIBUTING.rst
@@ -0,0 +1,51 @@
+
+.. highlight:: console
+
+How to develop
+--------------
+
+Install the package following README.rst and then install development dependencies::
+
+ pip install -U -r tests/requirements-dev.txt
+
+Unit tests can be run with `pytest <https://pytest.org>`_ with::
+
+ $ pytest -v --flakes --cov=cdsapi --cov-report=html --cache-clear
+
+Coverage can be checked opening in a browser the file ``htmlcov/index.html`` for example with::
+
+ $ open htmlcov/index.html
+
+Code quality control checks can be run with::
+
+ $ pytest -v --pep8 --mccabe
+
+The complete python versions tests are run via `tox <https://tox.readthedocs.io>`_ with::
+
+ $ tox
+
+Please ensure the coverage at least stays the same before you submit a pull request.
+
+
+Dependency management
+---------------------
+
+Update the `requirements-tests.txt` file with versions with::
+
+ pip-compile -U -o tests/requirements-tests.txt setup.py tests/requirements-tests.in # -U is optional
+
+
+Release procedure
+-----------------
+
+Quality check release::
+
+ $ git status
+ $ check-manifest
+ $ tox
+
+Release with zest.releaser::
+
+ $ prerelease
+ $ release
+ $ postrelease
diff --git a/tests/requirements-dev.txt b/tests/requirements-dev.txt
new file mode 100644
index 0000000..049cc41
--- /dev/null
+++ b/tests/requirements-dev.txt
@@ -0,0 +1,7 @@
+check-manifest
+detox
+pip-tools
+pyroma
+tox
+tox-pyenv
+zest.releaser
diff --git a/tests/requirements-tests.txt b/tests/requirements-tests.txt
index 705261a..6394374 100644
--- a/tests/requirements-tests.txt
+++ b/tests/requirements-tests.txt
@@ -2,7 +2,7 @@
# This file is autogenerated by pip-compile
# To update, run:
#
-# pip-compile --output-file requirements-tests.txt setup.py requirements-tests.in
+# pip-compile --output-file tests/requirements-tests.txt setup.py tests/requirements-tests.in
#
apipkg==1.4 # via execnet
attrs==18.1.0 # via pytest