Skip to content

Commit e6ec6c8

Browse files
committed
Add tox environment to build HTML documentation
The main use of this, similar to the step at the end of pythonpackage.yml, is to find errors produced by building. However, actual documentation *is* built, and unlike other tox environments, running this one actually writes outside the .tox/ directory, creating the documentation in the usual target location. For that reason, this environment is omitted from the env_list, so that it does not run by default and unexpectedly overwrite documentation that may recently have been built before changes are made that could cause generated documentation to be different.
1 parent 4bea7cf commit e6ec6c8

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

tox.ini

+12-3
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,25 @@ commands = pytest --color=yes {posargs}
1111

1212
[testenv:lint]
1313
description = Lint via pre-commit
14-
basepython = py39
14+
base_python = py39
1515
commands = pre-commit run --all-files
1616

1717
[testenv:mypy]
1818
description = Typecheck with mypy
19-
basepython = py39
19+
base_python = py39
2020
commands = mypy -p git
2121
ignore_outcome = true
2222

2323
[testenv:black]
2424
description = Check style with black
25-
basepython = py39
25+
base_python = py39
2626
commands = black --check --diff git
27+
28+
# Run "tox -e html" for this. It is deliberately excluded from env_list, as
29+
# unlike the other environments, this one writes outside the .tox/ directory.
30+
[testenv:html]
31+
description = Build HTML documentation
32+
base_python = py39
33+
deps = -r doc/requirements.txt
34+
allowlist_externals = make
35+
commands = make -C doc html

0 commit comments

Comments
 (0)