Files
sphinx/tox.ini
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

92 lines
1.9 KiB
INI
Raw Normal View History

2010-07-23 10:37:44 +01:00
[tox]
2024-07-06 19:42:20 +01:00
minversion = 4.2.0
2025-12-05 22:12:06 +00:00
envlist = py{312,313,314,315}
2010-07-23 10:37:44 +01:00
[testenv]
usedevelop = True
2017-12-19 15:55:10 +00:00
passenv =
2020-03-03 23:09:13 +01:00
https_proxy
http_proxy
no_proxy
2021-08-26 19:35:16 +02:00
COLORTERM
2020-03-03 23:09:13 +01:00
PERL
PERL5LIB
PYTEST_ADDOPTS
2022-10-12 23:01:55 +01:00
DO_EPUBCHECK
2020-03-03 23:09:13 +01:00
EPUBCHECK_PATH
TERM
2024-06-17 11:52:52 +02:00
CLEAN
BUILDER
2024-06-19 15:15:31 +02:00
READTHEDOCS
2017-12-19 15:55:10 +00:00
description =
2025-12-05 22:12:06 +00:00
py{312,313,314,315}: Run unit tests against {envname}.
dependency_groups =
test
2012-05-01 15:21:12 +09:00
setenv =
PYTHONWARNINGS = error
PYTEST_ADDOPTS = {env:PYTEST_ADDOPTS:} --color yes
2010-07-23 11:16:17 +01:00
commands=
2022-04-16 19:13:34 +01:00
python -X dev -X warn_default_encoding -m pytest --durations 25 {posargs}
2010-07-23 11:16:17 +01:00
2024-07-06 19:42:20 +01:00
[testenv:lint]
description =
Run linters.
dependency_groups =
2024-07-06 19:42:20 +01:00
lint
types
2024-07-06 19:42:20 +01:00
# If you update any of these commands, don't forget to update the equivalent
# GitHub Workflow step
commands =
ruff check . --output-format github
mypy
pyright
2024-07-06 19:42:20 +01:00
2017-02-24 13:25:51 -05:00
[testenv:docs]
2017-12-19 15:55:10 +00:00
description =
Build documentation.
dependency_groups =
docs
2017-12-19 15:55:10 +00:00
commands =
2024-06-17 11:52:52 +02:00
python -c "import shutil; shutil.rmtree('./build/sphinx', ignore_errors=True) if '{env:CLEAN:}' else None"
sphinx-build -M {env:BUILDER:html} ./doc ./build/sphinx --fail-on-warning {posargs}
[testenv:docs-live]
description =
Build documentation.
dependency_groups =
docs
2022-04-16 21:38:39 +01:00
deps =
sphinx-autobuild
commands =
sphinx-autobuild ./doc ./build/sphinx/
2018-01-19 13:55:17 +00:00
[testenv:bindep]
description =
Install binary dependencies.
deps =
bindep
commands =
bindep test
2024-05-15 07:00:55 +02:00
[testenv:ruff]
description =
Run ruff formatting and linting.
dependency_groups =
2024-05-15 07:00:55 +02:00
lint
commands =
ruff format .
ruff check --fix .
2024-05-15 07:18:31 +02:00
[testenv:mypy]
description =
Run mypy type checking.
dependency_groups =
types
2024-07-06 19:42:20 +01:00
commands =
mypy {posargs}
[testenv:prettier]
description =
Run the Prettier JavaScript formatter.
commands =
npx prettier@3.5 --write "sphinx/themes/**/*.js" "!sphinx/themes/bizstyle/static/css3-mediaqueries*.js" "tests/js/**/*.{js,mjs}" "!tests/js/fixtures/**"