Skip to content

Commit a8319e4

Browse files
committed
Updated docs.
1 parent 54744a2 commit a8319e4

File tree

4 files changed

+90
-63
lines changed

4 files changed

+90
-63
lines changed

doc-source/Building.rst

Lines changed: 0 additions & 59 deletions
This file was deleted.

doc-source/Source.rst

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
*******************************
1+
=========================
22
Downloading source code
3-
*******************************
3+
=========================
44

5-
The ``coverage_pyver_pragma`` source code resides on publicly accessible GitHub servers,
5+
The ``coverage_pyver_pragma`` source code is available on GitHub,
66
and can be accessed from the following URL: https://github.com/domdfcoding/coverage_pyver_pragma"
77

88
If you have ``git`` installed, you can clone the repository with the following command:
@@ -25,3 +25,17 @@ If you have ``git`` installed, you can clone the repository with the following c
2525
:alt: Downloading a 'zip' file of the source code.
2626
2727
Downloading a 'zip' file of the source code
28+
29+
30+
Building from source
31+
-----------------------
32+
33+
The recommended way to build ``coverage_pyver_pragma`` is to use `tox <https://tox.readthedocs.io/en/latest/>`_:
34+
35+
.. prompt:: bash
36+
37+
tox -e build
38+
39+
The source and wheel distributions will be in the directory ``dist``.
40+
41+
If you wish, you may also use `pep517.build <https://pypi.org/project/pep517/>`_ or another :pep:`517`-compatible build tool.

doc-source/contributing.rst

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
.. This file based on https://github.com/PyGithub/PyGithub/blob/master/CONTRIBUTING.md
2+
3+
==============
4+
Contributing
5+
==============
6+
7+
``coverage_pyver_pragma`` uses `tox <https://tox.readthedocs.io>`_ to automate testing and packaging, and `pre-commit <https://pre-commit.com>`_ to maintain code quality.
8+
9+
Install ``pre-commit`` with ``pip`` and install the git hook:
10+
11+
.. prompt:: bash
12+
13+
python -m pip install pre-commit
14+
pre-commit install
15+
16+
17+
Coding style
18+
--------------
19+
20+
`Yapf <https://github.com/google/yapf>`_ is used for code formatting, and `isort <https://timothycrosley.github.io/isort/>`_ is used to sort imports.
21+
22+
``yapf`` and ``isort`` can be run manually via ``pre-commit``:
23+
24+
.. prompt:: bash
25+
26+
pre-commit run yapf -a
27+
pre-commit run isort -a
28+
29+
30+
The complete autoformatting suite can be run with ``pre-commit``:
31+
32+
.. prompt:: bash
33+
34+
pre-commit run -a
35+
36+
37+
Automated tests
38+
-------------------
39+
40+
Tests are run with ``tox`` and ``pytest``. To run tests for a specific Python version, such as Python 3.6, run:
41+
42+
.. prompt:: bash
43+
44+
tox -e py36
45+
46+
47+
To run tests for all Python versions, simply run:
48+
49+
.. prompt:: bash
50+
51+
tox
52+
53+
54+
Type Annotations
55+
-------------------
56+
57+
Type annotations are checked using ``mypy``. Run ``mypy`` using ``tox``:
58+
59+
.. prompt:: bash
60+
61+
tox -e mypy
62+
63+
64+
65+
Build documentation locally
66+
------------------------------
67+
68+
The documentation is powered by Sphinx. A local copy of the documentation can be built with ``tox``:
69+
70+
.. prompt:: bash
71+
72+
tox -e docs

doc-source/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,8 @@ Installation
154154

155155
usage
156156
API Reference<docs>
157+
contributing
157158
Source
158-
Building
159159

160160
.. start links
161161

0 commit comments

Comments
 (0)