Files
oslo-cookiecutter/oslo.{{cookiecutter.module_name}}/tox.ini
Takashi Kajinami 3bbd464510 Replace UPPER_CONSTRAINTS_FILE
It was deprecated in favor of TOX_CONSTRAINTS_FILE.

Change-Id: I4529ee423704fbdedfce5ba963c16102b3607c97
2025-04-16 22:32:10 +09:00

62 lines
1.5 KiB
INI

[tox]
minversion = 3.18.0
envlist = py39,pep8
ignore_basepython_conflict = True
skipsdist = True
[testenv]
basepython = python3
usedevelop = True
deps =
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/test-requirements.txt
commands = stestr run --slowest {posargs}
[testenv:pep8]
commands = flake8 {posargs}
[testenv:venv]
commands = {posargs}
[testenv:cover]
deps = {[testenv]deps}
coverage
setenv =
PYTHON=coverage run --source oslo_{{cookiecutter.module_name}} --parallel-mode
commands =
stestr run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
[testenv:docs]
allowlist_externals =
rm
deps =
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/doc/requirements.txt
commands =
rm -rf doc/build doc/source/reference/api
sphinx-build -W --keep-going -b html doc/source doc/build/html {posargs}
[testenv:releasenotes]
allowlist_externals = rm
deps = {[testenv:docs]deps}
commands =
rm -rf releasenotes/build
sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html
[testenv:mypy]
commands =
mypy oslo_{{ cookiecutter.module_name }}
[testenv:debug]
commands = oslo_debug_helper {posargs}
[flake8]
# E123, E125 skipped as they are invalid PEP-8.
show-source = True
ignore = E123,E125
builtins = _
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build