fcf603253a
Change-Id: Ib00059b676a8fce50a8390b13b52ff5aa5805739 Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
102 lines
2.4 KiB
INI
102 lines
2.4 KiB
INI
[tox]
|
|
minversion = 3.18.0
|
|
envlist = py3,pep8
|
|
|
|
[testenv]
|
|
setenv =
|
|
LANG=en_US.UTF-8
|
|
LANGUAGE=en_US:en
|
|
LC_ALL=C
|
|
deps =
|
|
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
|
-r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
usedevelop = True
|
|
commands = stestr run --slowest {posargs}
|
|
distribute = false
|
|
|
|
[testenv:functional{,-py310,-py311,-py312,-py313}]
|
|
setenv =
|
|
{[testenv]setenv}
|
|
OS_TEST_PATH=./osprofiler/tests/functional
|
|
deps =
|
|
{[testenv]deps}
|
|
oslo.messaging
|
|
|
|
[testenv:pep8]
|
|
description =
|
|
Run style checks.
|
|
deps =
|
|
pre-commit
|
|
{[testenv:mypy]deps}
|
|
commands =
|
|
pre-commit run -a
|
|
{[testenv:mypy]commands}
|
|
|
|
[testenv:mypy]
|
|
description =
|
|
Run type checks.
|
|
deps =
|
|
{[testenv]deps}
|
|
mypy
|
|
types-PySocks
|
|
types-WebOb
|
|
types-netaddr
|
|
types-protobuf
|
|
types-psutil
|
|
types-python-dateutil
|
|
types-requests
|
|
types-setuptools
|
|
commands =
|
|
mypy --cache-dir="{envdir}/mypy_cache" {posargs:osprofiler}
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:cover]
|
|
setenv =
|
|
PYTHON=coverage run --source osprofiler --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}/requirements.txt
|
|
-r{toxinidir}/doc/requirements.txt
|
|
allowlist_externals = rm
|
|
commands =
|
|
rm -rf doc/build api-guide/build api-ref/build doc/source/contributor/modules
|
|
sphinx-build -W --keep-going -b html -d doc/build/doctrees doc/source doc/build/html
|
|
usedevelop = false
|
|
|
|
[testenv:releasenotes]
|
|
deps =
|
|
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
|
-r{toxinidir}/doc/requirements.txt
|
|
allowlist_externals = rm
|
|
commands =
|
|
rm -rf releasenotes/build
|
|
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
|
|
|
[flake8]
|
|
show-source = true
|
|
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,__init__.py
|
|
# We only enable the hacking (H) and osprofiler (N) checks
|
|
select = H
|
|
# H301 Black will put commas after imports that can't fit on one line
|
|
# H405 Multi-line docstrings are fine
|
|
ignore = H301,H405
|
|
|
|
[flake8:local-plugins]
|
|
extension =
|
|
N301 = checks:check_assert_methods_from_mock
|
|
N351 = checks:check_no_constructor_data_struct
|
|
N352 = checks:check_dict_formatting_in_string
|
|
N353 = checks:check_using_unicode
|
|
N354 = checks:check_raises
|
|
paths = ./osprofiler/hacking
|