2013-10-31 21:14:00 +07:00
|
|
|
[tox]
|
2020-04-24 10:25:43 -05:00
|
|
|
envlist = py38,pep8
|
2018-11-02 11:28:39 +05:30
|
|
|
minversion = 2.0
|
2013-10-31 21:14:00 +07:00
|
|
|
skipsdist = True
|
2020-01-02 16:06:50 +02:00
|
|
|
ignore_basepython_conflict = True
|
2013-10-31 21:14:00 +07:00
|
|
|
|
|
|
|
[testenv]
|
2019-11-15 14:44:36 +00:00
|
|
|
basepython = python3
|
2013-10-31 21:14:00 +07:00
|
|
|
usedevelop = True
|
2017-12-02 07:23:54 +01:00
|
|
|
install_command = pip install {opts} {packages}
|
2014-06-02 17:17:04 +04:00
|
|
|
setenv = VIRTUAL_ENV={envdir}
|
2015-01-09 18:36:59 -08:00
|
|
|
PYTHONDONTWRITEBYTECODE = 1
|
2016-10-26 13:09:18 +05:30
|
|
|
PYTHONWARNINGS=default::DeprecationWarning
|
2015-12-08 10:51:37 +09:00
|
|
|
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
|
2017-12-02 07:23:54 +01:00
|
|
|
deps =
|
2019-06-11 11:09:26 +08:00
|
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
2017-12-02 07:23:54 +01:00
|
|
|
-r{toxinidir}/test-requirements.txt
|
|
|
|
-r{toxinidir}/requirements.txt
|
2018-04-22 13:48:13 +04:00
|
|
|
# javascript engine
|
|
|
|
py_mini_racer
|
2014-06-02 17:17:04 +04:00
|
|
|
commands =
|
2017-07-09 16:42:24 +03:00
|
|
|
rm -f .testrepository/times.dbm
|
2015-12-07 17:59:45 +09:00
|
|
|
find . -type f -name "*.pyc" -delete
|
2018-05-21 18:24:50 -04:00
|
|
|
stestr run --slowest {posargs}
|
2015-12-07 17:59:45 +09:00
|
|
|
whitelist_externals =
|
|
|
|
rm
|
|
|
|
find
|
2013-10-31 21:14:00 +07:00
|
|
|
|
2015-07-23 12:13:52 +03:00
|
|
|
[testenv:unit-postgresql]
|
|
|
|
setenv = VIRTUAL_ENV={envdir}
|
2015-08-06 16:22:33 +03:00
|
|
|
passenv = ZUUL_PROJECT
|
2017-02-02 17:01:48 +01:00
|
|
|
commands = ./run_tests.sh -N --db-type postgresql
|
2015-07-23 12:13:52 +03:00
|
|
|
|
2016-11-25 18:46:13 +05:30
|
|
|
[testenv:unit-mysql]
|
|
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
|
|
passenv = ZUUL_PROJECT
|
2017-02-02 17:01:48 +01:00
|
|
|
commands = ./run_tests.sh -N --db-type mysql
|
2016-11-25 18:46:13 +05:30
|
|
|
|
2013-10-31 21:14:00 +07:00
|
|
|
[testenv:pep8]
|
2017-04-01 17:08:38 +08:00
|
|
|
commands =
|
2017-12-02 07:23:54 +01:00
|
|
|
doc8 doc/source
|
2020-05-05 15:55:12 -04:00
|
|
|
flake8 {posargs} . {toxinidir}/tools/sync_db.py
|
2013-10-31 21:14:00 +07:00
|
|
|
|
2014-06-02 17:17:04 +04:00
|
|
|
[testenv:cover]
|
2018-05-21 18:24:50 -04:00
|
|
|
setenv =
|
2018-07-19 10:50:54 +07:00
|
|
|
{[testenv]setenv}
|
|
|
|
PYTHON=coverage run --source mistral --parallel-mode
|
2014-06-02 17:17:04 +04:00
|
|
|
commands =
|
2018-10-09 10:14:40 +07:00
|
|
|
stestr run {posargs}
|
2018-05-21 18:24:50 -04:00
|
|
|
coverage combine
|
|
|
|
coverage html -d cover
|
|
|
|
coverage xml -o cover/coverage.xml
|
2014-06-02 17:17:04 +04:00
|
|
|
|
2015-05-26 12:53:32 +03:00
|
|
|
[testenv:genconfig]
|
|
|
|
commands =
|
|
|
|
oslo-config-generator --config-file tools/config/config-generator.mistral.conf \
|
2016-12-18 21:40:54 -05:00
|
|
|
--output-file etc/mistral.conf.sample
|
2015-05-26 12:53:32 +03:00
|
|
|
|
2017-10-04 09:06:35 +07:00
|
|
|
[testenv:genpolicy]
|
|
|
|
commands =
|
|
|
|
oslopolicy-sample-generator --config-file tools/config/policy-generator.mistral.conf \
|
|
|
|
--output-file etc/policy.yaml.sample
|
|
|
|
|
2016-03-23 13:03:16 +06:00
|
|
|
#set PYTHONHASHSEED=0 to prevent wsmeext.sphinxext from randomly failing.
|
2013-10-31 21:14:00 +07:00
|
|
|
[testenv:venv]
|
2016-03-23 13:03:16 +06:00
|
|
|
setenv = PYTHONHASHSEED=0
|
2013-10-31 21:14:00 +07:00
|
|
|
commands = {posargs}
|
|
|
|
|
2016-03-17 12:12:01 -05:00
|
|
|
#set PYTHONHASHSEED=0 to prevent wsmeext.sphinxext from randomly failing.
|
2013-10-31 21:14:00 +07:00
|
|
|
[testenv:docs]
|
2020-04-08 07:31:45 -05:00
|
|
|
deps =
|
|
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
|
|
|
-r{toxinidir}/doc/requirements.txt
|
2016-03-17 12:12:01 -05:00
|
|
|
setenv = PYTHONHASHSEED=0
|
2017-08-09 16:48:14 +08:00
|
|
|
commands =
|
2017-08-22 16:13:13 +08:00
|
|
|
rm -rf doc/build
|
2019-10-24 21:10:11 +08:00
|
|
|
sphinx-build -E -W --keep-going -b html doc/source doc/build/html
|
2013-10-31 21:14:00 +07:00
|
|
|
|
2019-09-05 08:42:02 +00:00
|
|
|
[testenv:pdf-docs]
|
2020-04-08 07:31:45 -05:00
|
|
|
deps =
|
|
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
|
|
|
-r{toxinidir}/doc/requirements.txt
|
2019-09-05 08:42:02 +00:00
|
|
|
whitelist_externals =
|
|
|
|
make
|
|
|
|
commands =
|
|
|
|
sphinx-build -W -b latex doc/source doc/build/pdf
|
|
|
|
make -C doc/build/pdf
|
|
|
|
|
2015-11-09 21:47:38 +08:00
|
|
|
[testenv:releasenotes]
|
2017-08-22 16:13:13 +08:00
|
|
|
commands =
|
|
|
|
rm -rf releasenotes/build
|
2019-10-24 21:10:11 +08:00
|
|
|
sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html
|
2015-11-09 21:47:38 +08:00
|
|
|
|
2017-01-11 18:19:39 +05:30
|
|
|
[testenv:api-ref]
|
|
|
|
# This environment is called from CI scripts to test and publish
|
2019-07-30 19:50:34 +02:00
|
|
|
# the API Ref to docs.openstack.org.
|
2017-01-11 18:19:39 +05:30
|
|
|
commands =
|
|
|
|
rm -rf api-ref/build
|
2019-10-24 21:10:11 +08:00
|
|
|
sphinx-build -W --keep-going -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
|
2017-01-11 18:19:39 +05:30
|
|
|
whitelist_externals = rm
|
|
|
|
|
2015-12-09 15:32:26 +09:00
|
|
|
#Skip PEP257 violation.
|
2013-10-31 21:14:00 +07:00
|
|
|
[flake8]
|
2020-01-02 16:06:50 +02:00
|
|
|
ignore = D100,D101,D102,D103,D104,D105,D200,D203,D202,D204,D205,D208,D400,D401,E402,W503,E731,W504
|
2013-10-31 21:14:00 +07:00
|
|
|
show-source = true
|
|
|
|
builtins = _
|
2017-07-15 12:50:29 +08:00
|
|
|
# [H106] Don't put vim configuration in source files.
|
|
|
|
# [H203] Use assertIs(Not)None to check for None.
|
2017-07-27 22:15:12 +08:00
|
|
|
# [H904] Delay string interpolations at logging calls.
|
|
|
|
enable-extensions = H106,H203,H904
|
2016-10-09 03:11:46 +05:30
|
|
|
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,tools,scripts
|
2015-07-11 20:39:59 +00:00
|
|
|
|
2017-08-09 16:48:14 +08:00
|
|
|
[doc8]
|
2017-06-22 14:25:41 +02:00
|
|
|
extensions = .rst, .yaml, .mistral
|
2017-08-09 16:48:14 +08:00
|
|
|
# Maximal line length should be 80.
|
|
|
|
max-line-length = 80
|
|
|
|
|
2015-07-11 20:39:59 +00:00
|
|
|
[hacking]
|
2016-11-28 17:09:19 +05:30
|
|
|
import_exceptions = mistral._i18n
|
2018-03-22 15:45:03 -04:00
|
|
|
|
2020-04-01 19:56:00 +02:00
|
|
|
[flake8:local-plugins]
|
|
|
|
extension =
|
|
|
|
M001 = checks:CheckForLoggingIssues
|
|
|
|
M319 = checks:no_assert_equal_true_false
|
|
|
|
M320 = checks:no_assert_true_false_is_not
|
|
|
|
M327 = checks:check_python3_xrange
|
|
|
|
M328 = checks:check_python3_no_iteritems
|
|
|
|
M329 = checks:check_python3_no_iterkeys
|
|
|
|
M330 = checks:check_python3_no_itervalues
|
|
|
|
O323 = checks:check_oslo_namespace_imports
|
|
|
|
paths = ./mistral/hacking
|
|
|
|
|
2018-03-22 15:45:03 -04:00
|
|
|
[testenv:lower-constraints]
|
|
|
|
deps =
|
|
|
|
-c{toxinidir}/lower-constraints.txt
|
|
|
|
-r{toxinidir}/test-requirements.txt
|
|
|
|
-r{toxinidir}/requirements.txt
|