debtcollector/tox.ini
Takashi Kajinami 60922c8a28 Use pre-commit hook to run doc8
Also create a separate doc requirements to install only required
packages during doc build or doc build check.

Change-Id: Ic0377868fdc3057314ae1dec0a0db0b1cc0c0b7b
2024-10-21 22:46:35 +09:00

56 lines
1.3 KiB
INI

[tox]
minversion = 3.2.0
envlist = py3,pep8
ignore_basepython_conflict = True
[testenv]
basepython = python3
setenv =
VIRTUAL_ENV={envdir}
deps =
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
commands =
stestr run --slowest {posargs}
[testenv:debug]
commands = oslo_debug_helper {posargs}
[testenv:pep8]
deps =
pre-commit>=2.6.0 # MIT
{[testenv:docs]deps}
commands =
pre-commit run -a
sphinx-build -b doctest doc/source doc/build
[testenv:venv]
commands = {posargs}
[testenv:cover]
setenv =
PYTHON=coverage run --source $project --parallel-mode
commands =
stestr run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
[testenv:docs]
deps =
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/doc/requirements.txt
commands = sphinx-build -W --keep-going -b html -d doc/build/doctrees doc/source doc/build/html
[flake8]
# E123, E125 skipped as they are invalid PEP-8.
show-source = True
ignore = E123,E125
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
[testenv:releasenotes]
deps = {[testenv:docs]deps}
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html