Debian Codegraph @

docs/development.rst

raw
1 Development
2 ===========
3
4 These instructions are geared towards people who want to help develop this library.
5
6 Preparing for development
7 -------------------------
8 All required tooling and libraries can be installed using the ``requirements-dev.txt`` file:
9
10 .. code-block:: bash
11
12 pip install -r requirements-dev.txt
13
14
15 Running tests
16 -------------
17
18 ``pytest`` is used to run tests. Run all tests with coverage and formatting checks:
19
20 .. code-block:: bash
21
22 py.test test_schedule.py --flake8 schedule -v --cov schedule --cov-report term-missing
23
24 Formatting the code
25 -------------------
26 This project uses `black formatter <https://black.readthedocs.io/en/stable/>`_.
27 To format the code, run:
28
29 .. code-block:: bash
30
31 black .
32
33 Make sure you use version 20.8b1 of black.
34
35 Compiling documentation
36 -----------------------
37
38 The documentation is written in `reStructuredText <https://docutils.sourceforge.io/rst.html>`_.
39 It is processed using `Sphinx <http://www.sphinx-doc.org/en/1.4.8/tutorial.html>`_ using the `alabaster <https://alabaster.readthedocs.io/en/latest/>`_ theme.
40 After installing the development requirements it is just a matter of running:
41
42 .. code-block:: bash
43
44 cd docs
45 make html
46
47 The resulting html can be found in ``docs/_build/html``
48
49 Publish a new version
50 ---------------------
51
52 Update the ``HISTORY.rst`` and ``AUTHORS.rst`` files.
53 Bump the version in ``setup.py`` and ``docs/conf.py``.
54 Merge these changes into master. Finally:
55
56 .. code-block:: bash
57
58 git tag X.Y.Z -m "Release X.Y.Z"
59 git push --tags
60
61 pip install --upgrade setuptools twine wheel
62 python3 -m build --wheel
63 # For https://test.pypi.org/project/schedule/
64 twine upload --repository schedule-test dist/*
65 # For https://pypi.org/project/schedule/
66 twine upload --repository schedule dist/*
67
68 This project follows `semantic versioning <https://semver.org/>`_.`