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]
|
2018-01-05 22:25:34 +09:00
|
|
|
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}.
|
2025-03-20 18:28:11 +00:00
|
|
|
dependency_groups =
|
2018-11-11 09:33:17 -08:00
|
|
|
test
|
2012-05-01 15:21:12 +09:00
|
|
|
setenv =
|
2023-02-01 11:15:05 +00:00
|
|
|
PYTHONWARNINGS = error
|
2020-11-05 01:00:54 +09:00
|
|
|
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.
|
2025-03-20 18:28:11 +00:00
|
|
|
dependency_groups =
|
2024-07-06 19:42:20 +01:00
|
|
|
lint
|
2025-03-20 18:28:11 +00:00
|
|
|
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 =
|
2024-09-27 13:48:19 +01:00
|
|
|
ruff check . --output-format github
|
|
|
|
|
mypy
|
2024-09-28 12:10:23 +01:00
|
|
|
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.
|
2025-03-20 18:28:11 +00:00
|
|
|
dependency_groups =
|
2019-05-04 12:42:17 +09:00
|
|
|
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"
|
2024-08-13 17:12:42 +01:00
|
|
|
sphinx-build -M {env:BUILDER:html} ./doc ./build/sphinx --fail-on-warning {posargs}
|
2019-05-12 17:57:25 +09:00
|
|
|
|
2022-07-18 23:48:28 +02:00
|
|
|
[testenv:docs-live]
|
|
|
|
|
description =
|
|
|
|
|
Build documentation.
|
2025-03-20 18:28:11 +00:00
|
|
|
dependency_groups =
|
2022-07-18 23:48:28 +02:00
|
|
|
docs
|
2022-04-16 21:38:39 +01:00
|
|
|
deps =
|
2022-07-18 23:48:28 +02:00
|
|
|
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.
|
2025-03-20 18:28:11 +00:00
|
|
|
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.
|
2025-03-20 18:28:11 +00:00
|
|
|
dependency_groups =
|
|
|
|
|
types
|
2024-07-06 19:42:20 +01:00
|
|
|
commands =
|
|
|
|
|
mypy {posargs}
|
2025-05-24 02:15:04 +01:00
|
|
|
|
|
|
|
|
[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/**"
|