File tree Expand file tree Collapse file tree 4 files changed +26
-7
lines changed Expand file tree Collapse file tree 4 files changed +26
-7
lines changed Original file line number Diff line number Diff line change
1
+ [doc8]
2
+
3
+ ignore-path =docs/_build,docs/tutorials
4
+ max-line-length =88
Original file line number Diff line number Diff line change @@ -45,24 +45,32 @@ More details on using ``unittest`` are `here
45
45
Code quality checks
46
46
^^^^^^^^^^^^^^^^^^^
47
47
48
- PySTAC uses `flake8 <http://flake8.pycqa.org/en/latest/ >`_ and ` yapf
49
- <https://github.com/google/yapf > `_ for code formatting and style checks.
48
+ PySTAC uses `flake8 <http://flake8.pycqa.org/en/latest/ >`_ and`black
49
+ <https://github.com/psf/black >`_ for code formatting and style checks.
50
50
51
51
To run the flake8 style checks:
52
52
53
53
.. code-block :: bash
54
54
55
- > flake8 pystac
56
- > flake8 tests
55
+ > flake8 pystac tests
57
56
58
57
To format code:
59
58
60
59
.. code-block :: bash
61
60
62
- > yapf -ipr pystac
63
- > yapf -ipr tests
61
+ > ./scripts/format
64
62
65
- You can also run the ``./scripts/test `` script to check flake8 and yapf.
63
+ We also use `doc8 <https://github.com/pycqa/doc8 >`__ for style checking on RST files in
64
+ the docs.
65
+
66
+ To check doc formatting:
67
+
68
+ .. code-block :: bash
69
+
70
+ > doc8 docs
71
+
72
+ You can also run the ``./scripts/test `` script to run unit tests, check code style with
73
+ ``flake8 `` and ``black ``, and check type annotations using ``mypy `` and ``pyright ``.
66
74
67
75
CHANGELOG
68
76
^^^^^^^^^
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ sphinx-autobuild==0.7.1
11
11
sphinxcontrib-fulltoc == 1.2.0
12
12
nbsphinx == 0.7.1
13
13
coverage == 5.2.*
14
+ doc8 == 0.8.1
14
15
15
16
# https://github.com/pydata/xarray/issues/5299#issuecomment-840730954
16
17
jinja2 < 3.0
Original file line number Diff line number Diff line change @@ -35,6 +35,12 @@ if [ "${BASH_SOURCE[0]}" = "${0}" ]; then
35
35
36
36
flake8 pystac tests
37
37
38
+ echo
39
+ echo " -- LINTING RST FILES WITH DOC8 --"
40
+ echo
41
+
42
+ doc8 docs -q
43
+
38
44
echo
39
45
echo " -- CHECKING FORMAT WITH BLACK --"
40
46
echo
You can’t perform that action at this time.
0 commit comments