summaryrefslogtreecommitdiff
path: root/CONTRIBUTING.rst
blob: d750f338bbea5e8971f534fa9cfe52e59f1bdbba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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