2010-07-23 10:37:44 +01:00
|
|
|
[tox]
|
2018-11-11 09:33:17 -08:00
|
|
|
minversion = 2.4.0
|
2022-06-25 22:15:30 +01:00
|
|
|
envlist = docs,flake8,mypy,twine,py{36,37,38,39,310},du{14,15,16,17,18,19}
|
2022-04-16 21:38:39 +01:00
|
|
|
isolated_build = True
|
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
|
|
|
|
|
EPUBCHECK_PATH
|
|
|
|
|
TERM
|
2017-12-19 15:55:10 +00:00
|
|
|
description =
|
2021-10-07 02:34:44 +09:00
|
|
|
py{36,37,38,39,310}: Run unit tests against {envname}.
|
2022-06-25 22:15:30 +01:00
|
|
|
du{14,15,16,17,18,19}: Run unit tests with the given version of docutils.
|
2017-10-10 14:10:11 +01:00
|
|
|
deps =
|
2021-04-11 01:48:18 +09:00
|
|
|
du14: docutils==0.14.*
|
|
|
|
|
du15: docutils==0.15.*
|
|
|
|
|
du16: docutils==0.16.*
|
|
|
|
|
du17: docutils==0.17.*
|
2022-02-05 14:57:09 +00:00
|
|
|
du18: docutils==0.18.*
|
2022-06-25 22:15:30 +01:00
|
|
|
du19: docutils==0.19.*
|
2018-11-11 09:33:17 -08:00
|
|
|
extras =
|
|
|
|
|
test
|
2012-05-01 15:21:12 +09:00
|
|
|
setenv =
|
2022-01-02 15:03:20 +09:00
|
|
|
PYTHONWARNINGS = all
|
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
|
|
|
|
2021-10-03 18:31:32 +09:00
|
|
|
[testenv:du-latest]
|
|
|
|
|
commands =
|
2022-04-16 21:38:39 +01:00
|
|
|
python -m pip install "git+https://repo.or.cz/docutils.git#subdirectory=docutils" --no-warn-conflicts
|
2021-10-03 18:31:32 +09:00
|
|
|
{[testenv]commands}
|
|
|
|
|
|
2015-03-07 15:45:43 +09:00
|
|
|
[testenv:flake8]
|
2018-06-20 09:53:29 +01:00
|
|
|
basepython = python3
|
2017-12-19 15:55:10 +00:00
|
|
|
description =
|
|
|
|
|
Run style checks.
|
2020-02-10 17:25:54 -05:00
|
|
|
whitelist_externals =
|
|
|
|
|
flake8
|
2020-01-23 00:42:59 +09:00
|
|
|
extras =
|
|
|
|
|
lint
|
2017-12-19 15:55:10 +00:00
|
|
|
commands =
|
2020-02-10 17:25:54 -05:00
|
|
|
flake8 {posargs}
|
2015-11-10 03:40:48 +01:00
|
|
|
|
2020-11-11 12:00:27 +01:00
|
|
|
[testenv:isort]
|
|
|
|
|
basepython = python3
|
|
|
|
|
description =
|
|
|
|
|
Run import sorting checks.
|
|
|
|
|
whitelist_externals =
|
|
|
|
|
isort
|
|
|
|
|
extras =
|
|
|
|
|
lint
|
|
|
|
|
commands =
|
|
|
|
|
isort --check-only --diff .
|
|
|
|
|
|
2017-02-28 17:31:31 +00:00
|
|
|
[testenv:mypy]
|
2018-06-20 09:53:29 +01:00
|
|
|
basepython = python3
|
2017-12-19 15:55:10 +00:00
|
|
|
description =
|
|
|
|
|
Run type checks.
|
2020-01-23 00:42:59 +09:00
|
|
|
extras =
|
|
|
|
|
lint
|
2017-02-28 17:31:31 +00:00
|
|
|
commands=
|
|
|
|
|
mypy sphinx/
|
|
|
|
|
|
2017-02-24 13:25:51 -05:00
|
|
|
[testenv:docs]
|
2018-06-20 09:53:29 +01:00
|
|
|
basepython = python3
|
2017-12-19 15:55:10 +00:00
|
|
|
description =
|
|
|
|
|
Build documentation.
|
2019-05-04 12:42:17 +09:00
|
|
|
extras =
|
|
|
|
|
docs
|
2017-12-19 15:55:10 +00:00
|
|
|
commands =
|
2022-07-10 22:48:15 +01:00
|
|
|
python -X dev -X warn_default_encoding -m sphinx -M html ./doc ./build/sphinx -W --keep-going
|
2018-01-19 13:55:17 +00:00
|
|
|
|
2019-05-12 17:57:25 +09:00
|
|
|
[testenv:docslint]
|
|
|
|
|
basepython = python3
|
|
|
|
|
description =
|
|
|
|
|
Lint documentation.
|
|
|
|
|
extras =
|
2022-06-16 20:32:09 +02:00
|
|
|
lint
|
2019-05-12 17:57:25 +09:00
|
|
|
commands =
|
2022-06-20 00:29:00 +02:00
|
|
|
sphinx-lint --enable line-too-long --max-line-length 85 CHANGES CONTRIBUTING.rst README.rst doc/
|
2019-05-12 17:57:25 +09:00
|
|
|
|
2022-07-18 23:48:28 +02:00
|
|
|
[testenv:docs-live]
|
|
|
|
|
basepython = python3
|
|
|
|
|
description =
|
|
|
|
|
Build documentation.
|
|
|
|
|
extras =
|
|
|
|
|
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/
|
|
|
|
|
|
2020-06-14 13:38:55 +09:00
|
|
|
[testenv:twine]
|
|
|
|
|
basepython = python3
|
|
|
|
|
description =
|
|
|
|
|
Lint package.
|
|
|
|
|
deps =
|
|
|
|
|
twine
|
2022-04-16 21:38:39 +01:00
|
|
|
build
|
2020-06-14 13:38:55 +09:00
|
|
|
commands =
|
2022-04-16 21:38:39 +01:00
|
|
|
python -m build .
|
2020-06-14 13:38:55 +09:00
|
|
|
twine check dist/*
|
|
|
|
|
|
2018-01-19 13:55:17 +00:00
|
|
|
[testenv:bindep]
|
|
|
|
|
description =
|
|
|
|
|
Install binary dependencies.
|
|
|
|
|
deps =
|
|
|
|
|
bindep
|
|
|
|
|
commands =
|
|
|
|
|
bindep test
|