Skip to content

Configure tox #1667

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Sep 19, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
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.
  • Loading branch information
EliahKagan committed Sep 19, 2023
commit e6ec6c87b8ed66e30f7addbd109ab6ec5d74326c
15 changes: 12 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,25 @@ commands = pytest --color=yes {posargs}

[testenv:lint]
description = Lint via pre-commit
basepython = py39
base_python = py39
commands = pre-commit run --all-files

[testenv:mypy]
description = Typecheck with mypy
basepython = py39
base_python = py39
commands = mypy -p git
ignore_outcome = true

[testenv:black]
description = Check style with black
basepython = py39
base_python = py39
commands = black --check --diff git

# Run "tox -e html" for this. It is deliberately excluded from env_list, as
# unlike the other environments, this one writes outside the .tox/ directory.
[testenv:html]
description = Build HTML documentation
base_python = py39
deps = -r doc/requirements.txt
allowlist_externals = make
commands = make -C doc html