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