2018-03-27 12:00:00 +08:00
|
|
|
[tox]
|
2021-08-12 11:11:31 +08:00
|
|
|
minversion = 3.18.0
|
2020-11-03 14:31:13 +01:00
|
|
|
envlist = py3,pep8,docs
|
2020-02-04 16:28:03 +01:00
|
|
|
ignore_basepython_conflict = true
|
2018-03-27 12:00:00 +08:00
|
|
|
|
|
|
|
[testenv]
|
2019-12-22 23:26:46 +08:00
|
|
|
basepython = python3
|
2018-03-27 12:00:00 +08:00
|
|
|
deps =
|
2020-11-04 10:48:20 +01:00
|
|
|
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
2018-03-27 12:00:00 +08:00
|
|
|
-r{toxinidir}/test-requirements.txt
|
|
|
|
-r{toxinidir}/requirements.txt
|
2018-07-28 16:20:00 +08:00
|
|
|
commands =
|
|
|
|
stestr run {posargs}
|
|
|
|
stestr slowest
|
2018-03-27 12:00:00 +08:00
|
|
|
|
|
|
|
[testenv:pep8]
|
|
|
|
deps =
|
|
|
|
-r{toxinidir}/test-requirements.txt
|
|
|
|
commands =
|
2020-07-21 13:31:47 +02:00
|
|
|
pre-commit run -a
|
2018-03-27 12:00:00 +08:00
|
|
|
# Run security linter
|
|
|
|
bandit -r oslo_limit tests -n5
|
|
|
|
|
|
|
|
[testenv:venv]
|
|
|
|
commands = {posargs}
|
|
|
|
|
|
|
|
[testenv:docs]
|
2018-07-28 16:20:00 +08:00
|
|
|
deps =
|
2020-09-23 14:50:49 +08:00
|
|
|
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
2018-07-28 16:20:00 +08:00
|
|
|
-r{toxinidir}/doc/requirements.txt
|
2021-08-12 11:11:31 +08:00
|
|
|
allowlist_externals = rm
|
2019-10-24 14:09:59 +08:00
|
|
|
commands =
|
|
|
|
rm -fr doc/build
|
|
|
|
sphinx-build -W --keep-going -b html doc/source doc/build/html
|
2018-03-27 12:00:00 +08:00
|
|
|
|
|
|
|
[testenv:cover]
|
2023-05-02 14:30:48 +01:00
|
|
|
setenv =
|
|
|
|
PYTHON=coverage run --source oslo_limit --parallel-mode
|
|
|
|
commands =
|
|
|
|
stestr run --slowest {posargs}
|
|
|
|
coverage combine
|
|
|
|
coverage html -d cover
|
|
|
|
coverage report
|
2018-03-27 12:00:00 +08:00
|
|
|
|
2018-07-28 16:20:00 +08:00
|
|
|
[testenv:releasenotes]
|
2021-08-12 11:11:31 +08:00
|
|
|
allowlist_externals = rm
|
2018-07-28 16:20:00 +08:00
|
|
|
deps =
|
|
|
|
-r{toxinidir}/doc/requirements.txt
|
2019-10-24 14:09:59 +08:00
|
|
|
commands =
|
|
|
|
rm -rf releasenotes/build
|
|
|
|
sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html
|
2018-07-28 16:20:00 +08:00
|
|
|
|
2018-03-27 12:00:00 +08:00
|
|
|
[flake8]
|
|
|
|
show-source = True
|
2020-03-27 19:13:57 +01:00
|
|
|
ignore = W504
|
2018-03-27 12:00:00 +08:00
|
|
|
builtins = _
|
|
|
|
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
|
|
|
|
|
|
|
|
[hacking]
|
|
|
|
import_exceptions = oslo_limit._i18n
|
|
|
|
|
2020-06-01 14:40:20 -07:00
|
|
|
[testenv:debug]
|
|
|
|
commands = oslo_debug_helper -t oslo_limit/tests {posargs}
|