-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtox.ini
More file actions
72 lines (62 loc) · 2.08 KB
/
tox.ini
File metadata and controls
72 lines (62 loc) · 2.08 KB
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
# To use tox, see https://tox.readthedocs.io
# Simply pip or conda install tox
# then run `tox` or `tox -- {pytest args}`
# To run in parallel using `tox -p`
# To rebuild the tox environment, for example when dependencies change, use
# `tox -r`
[tox]
envlist = py312-sphinx8-needs5
[testenv]
usedevelop = true
[testenv:py{312,313,314}-sphinx{7,8,9}-needs{5,6,7,8}]
deps =
sphinx7: sphinx>=7.4,<8
sphinx8: sphinx>=8,<9
sphinx9: sphinx>=9,<10
needs5: sphinx-needs>=5,<6
needs6: sphinx-needs>=6,<7
needs7: sphinx-needs>=7,<8
needs8: sphinx-needs>=8,<9
dependency_groups = testing
commands = pytest {posargs}
[testenv:docs-{update,clean}]
description = Build documentation with Sphinx
dependency_groups = docs
allowlist_externals = rm
passenv =
BUILDER
TERM
commands =
clean: rm -rf docs/_build/{env:BUILDER:html}
sphinx-build -nW --keep-going -b {env:BUILDER:html} -T -c docs docs/source docs/_build/{env:BUILDER:html} {posargs}
[testenv:docs-live]
description = Build the documentation and launch browser
deps = sphinx-autobuild
dependency_groups = docs
commands =
sphinx-autobuild \
--re-ignore _build/.* \
--port 0 --open-browser \
-n -b {posargs:html} -c docs docs/source docs/_build/{posargs:html}
[testenv:mypy]
dependency_groups = mypy
commands = mypy {posargs:.}
[testenv:ruff-check]
skip_install = true
dependency_groups = ruff
commands = ruff check {posargs:--fix}
[testenv:ruff-fmt]
skip_install = true
dependency_groups = ruff
commands = ruff format {posargs}
[testenv:demo]
description = Run the needextend demo (analyse, write, build)
dependency_groups = docs
allowlist_externals = rm
commands =
rm -rf tests/data/needextend_demo/_build
rm -rf output/marked_content.json
rm -rf tests/data/needextend_demo/needextend.rst
codelinks analyse tests/data/configs/minimum_config.toml
codelinks write rst output/marked_content.json --outpath tests/data/needextend_demo/needextend.rst
sphinx-build -nW --keep-going -b html -T -c tests/data/needextend_demo tests/data/needextend_demo tests/data/needextend_demo/_build/html