-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtox.ini
96 lines (88 loc) · 2.18 KB
/
tox.ini
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
[tox]
envlist =
py-test-sphinx8
coverage-report
typing-sphinx8
lint
docs
docs-lint
packaging
isolated_build = True
skip_missing_interpreters = True
[testenv]
description =
Run pytest
sphinx7: with sphinx 7.*
sphinx8: with sphinx 8.*
sphinxdev: with sphinx master branch
deps =
sphinx7: sphinx==7.*
sphinx8: sphinx==8.*
sphinxdev: git+https://github.com/sphinx-doc/sphinx.git#egg=sphinx
extras =
dev
guide
technote
commands=
coverage run -m pytest {posargs}
[testenv:coverage-report]
description = Compile coverage from each test run.
skip_install = true
deps = coverage[toml]>=5.0.2
depends =
py-test-sphinx{7,8}
commands =
coverage combine
coverage report
[testenv:lint]
description = Lint codebase by running pre-commit (Black, isort, Flake8).
skip_install = true
deps =
pre-commit
commands = pre-commit run --all-files
[testenv:typing-sphinx{7,8,dev}]
description = Run mypy.
deps =
mypy
sphinx7: sphinx==7.*
sphinx8: sphinx==8.*
sphinxdev: git+https://github.com/sphinx-doc/sphinx.git#egg=sphinx
commands =
mypy src tests
[testenv:docs]
description = Build Sphinx documentation
allowlist_externals =
make
rm
commands =
rm -rf docs/_build
rm -rf docs/dev/api/contents
make -C docs html
[testenv:docs-lint]
description = Lint the Sphinx documentation
allowlist_externals =
make
commands = make -C docs linkcheck
[testenv:packaging]
description = Check packaging for PyPI with twine
skip_install = true
allowlist_externals =
rm
deps =
build
twine
commands =
rm -rf dist
python -m build
twine check dist/*
[testenv:demo]
description = Build demo projects.
allowlist_externals =
rm
commands =
rm -rf demo/rst-technote/_build
sphinx-build --keep-going -n -W -T -b html -d {envtmpdir}/doctrees demo/rst-technote demo/rst-technote/_build/html
rm -rf demo/md-technote/_build
sphinx-build --keep-going -n -W -T -b html -d {envtmpdir}/doctrees demo/md-technote demo/md-technote/_build/html
rm -rf demo/ipynb-technote/_build
sphinx-build --keep-going -n -W -T -b html -d {envtmpdir}/doctrees demo/ipynb-technote demo/ipynb-technote/_build/html