taskflow/tox.ini
Takashi Kajinami 1a8bab0992 Bump pylint
The current version can no longer run. Bump it to the version
currently used in a few other repos. Note that failures detected are
not yet resolved.

Also move pylintrc to the path which is automatically detected by
pylint to simplify the command line.

Change-Id: I3747b064cec1b19d6de6db3ffe9ae5cf8ca34b02
2024-11-23 21:40:50 +09:00

94 lines
2.4 KiB
INI

[tox]
minversion = 3.18.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
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 {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: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
allowlist_externals =
find
./setup-etcd-env.sh
[testenv:update-states]
deps =
{[testenv]deps}
commands = {toxinidir}/tools/update_states.sh
allowlist_externals =
{toxinidir}/tools/update_states.sh
[testenv:pep8]
commands = pre-commit run -a
[testenv:pylint]
deps =
{[testenv]deps}
pylint==3.2.0 # GPLv2
commands = pylint taskflow
[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:venv]
commands = {posargs}
[flake8]
builtins = _
exclude = .venv,.tox,dist,doc,*egg,.git,build,tools
ignore = E305,E402,E721,E731,E741,W503,W504
[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:releasenotes]
deps = -r{toxinidir}/doc/requirements.txt
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:bindep]
# 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