Files
taskflow/tox.ini
T
Takashi Kajinami 344b10e5c6 Do not install code to build release notes
... because we require only doc requirements.

Also remove explicit usage of requirements.txt because it is now
automatically detected and installed.

Change-Id: Ib5ed1a6f951ca3b35aec83bc8953a3a44c37379f
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
2026-06-22 21:35:39 +09:00

108 lines
2.7 KiB
INI

[tox]
minversion = 4.28.0
envlist = cover,docs,pep8,py3,pylint,update-states
[testenv]
# We need to install a bit more than just `test' because those drivers have
# custom tests that we always run
constraints =
{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
deps =
-r{toxinidir}/test-requirements.txt
commands =
stestr run {posargs}
[testenv:cover]
deps =
{[testenv]deps}
coverage>=3.6
setenv =
PYTHON=coverage run --source taskflow --parallel-mode
commands =
stestr run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
[testenv:functional]
commands =
find . -type f -name "*.pyc" -delete
{env:SETUP_ENV_SCRIPT} pifpaf -e TAKSFLOW_TEST run {env:PIFPAF_DAEMON} {env:PIFPAF_OPTS} -- stestr run {posargs}
allowlist_externals =
find
./setup-etcd-env.sh
passenv =
ETCD_VERSION
[testenv:update-states]
deps =
{[testenv]deps}
commands = {toxinidir}/tools/update_states.sh
allowlist_externals =
{toxinidir}/tools/update_states.sh
[testenv:venv]
commands = {posargs}
[testenv:docs]
deps =
{[testenv]deps}
-r{toxinidir}/doc/requirements.txt
commands =
sphinx-build -E -W -b html doc/source doc/build/html
doc8 doc/source
[testenv:releasenotes]
skip_install = true
deps =
-r{toxinidir}/doc/requirements.txt
commands =
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:pep8]
skip_install = true
deps =
pre-commit
commands =
pre-commit run -a
[testenv:pylint]
deps =
{[testenv]deps}
pylint==3.2.0 # GPLv2
commands = pylint taskflow
[flake8]
# We only enable the hacking (H) checks
select = H
builtins = _
# H203: Use assertIs(Not)None to check for None
# H204: Use assert(Not)Equal()
# H205: Use assert{Greater,Less}[Equal]
enable-extensions = H203,H204,H205
exclude = .venv,.tox,dist,doc,*egg,.git,build,tools
[hacking]
import_exceptions =
taskflow.test.mock
unittest.mock
[doc8]
# Settings for doc8:
# Ignore doc/source/user/history.rst, it includes generated ChangeLog
# file that fails with "D000 Inline emphasis start-string without
# end-string."
ignore-path = doc/*/target,doc/*/build*
[testenv:bindep]
skip_install = true
# Do not install any requirements. We want this to be fast and work even if
# system dependencies are missing, since it's used to tell you what system
# dependencies are missing! This also means that bindep must be installed
# separately, outside of the requirements files, and develop mode disabled
# explicitly to avoid unnecessarily installing the checked-out repo too (this
# further relies on "tox.skipsdist = True" above).
deps = bindep
commands = bindep test
usedevelop = False