2012-11-01 04:43:02 +01:00
|
|
|
[tox]
|
2021-07-09 10:40:15 +08:00
|
|
|
minversion = 3.18.0
|
2020-12-10 14:40:26 +08:00
|
|
|
envlist = py3,pep8
|
2013-09-05 14:58:16 +02:00
|
|
|
skipsdist = True
|
2020-12-10 14:40:26 +08:00
|
|
|
# this allows tox to infer the base python from the environment name
|
|
|
|
# and override any basepython configured in this file
|
|
|
|
ignore_basepython_conflict=true
|
2012-11-01 04:43:02 +01:00
|
|
|
|
|
|
|
[testenv]
|
2019-10-30 02:49:25 +00:00
|
|
|
basepython = python3
|
2013-09-05 14:58:16 +02:00
|
|
|
usedevelop = True
|
2018-09-12 16:29:29 +08:00
|
|
|
install_command = pip install {opts} {packages}
|
2013-02-25 15:47:39 +01:00
|
|
|
setenv = VIRTUAL_ENV={envdir}
|
2015-06-19 09:55:07 +02:00
|
|
|
ZAQAR_TESTS_CONFIGS_DIR={toxinidir}/zaqar/tests/etc/
|
2015-10-21 18:54:59 +03:00
|
|
|
ZAQAR_TEST_MONGODB=1
|
|
|
|
ZAQAR_TEST_SLOW=1
|
2018-12-19 10:32:28 +08:00
|
|
|
OS_STDOUT_CAPTURE=1
|
|
|
|
OS_STDERR_CAPTURE=1
|
|
|
|
OS_TEST_TIMEOUT=60
|
2022-09-15 15:59:06 +00:00
|
|
|
deps =
|
2024-04-07 00:08:48 +09:00
|
|
|
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
2022-09-15 15:59:06 +00:00
|
|
|
-r{toxinidir}/test-requirements.txt
|
|
|
|
-r{toxinidir}/requirements.txt
|
2015-12-02 13:48:21 +09:00
|
|
|
commands =
|
2019-05-25 14:46:53 -05:00
|
|
|
stestr run --serial --slowest {posargs}
|
2012-11-01 04:43:02 +01:00
|
|
|
|
2015-09-14 10:18:20 +02:00
|
|
|
[testenv:integration]
|
2015-10-21 18:54:59 +03:00
|
|
|
setenv = {[testenv]setenv}
|
2015-09-14 10:18:20 +02:00
|
|
|
ZAQAR_TEST_INTEGRATION=1
|
2016-02-18 17:03:41 -05:00
|
|
|
OS_TEST_PATH=./zaqar/tests/functional
|
2019-05-25 14:46:53 -05:00
|
|
|
commands = stestr run --serial --slowest {posargs}
|
2015-09-14 10:18:20 +02:00
|
|
|
|
2012-11-01 04:43:02 +01:00
|
|
|
[testenv:pep8]
|
2018-08-24 06:41:33 +00:00
|
|
|
commands =
|
|
|
|
doc8 doc/source
|
|
|
|
flake8
|
2013-02-25 15:47:39 +01:00
|
|
|
|
2014-09-17 23:49:38 +08:00
|
|
|
[testenv:genconfig]
|
|
|
|
commands =
|
2014-11-17 17:56:23 +01:00
|
|
|
oslo-config-generator --config-file etc/oslo-config-generator/zaqar.conf
|
2014-09-17 23:49:38 +08:00
|
|
|
|
2017-10-02 16:55:36 +00:00
|
|
|
[testenv:genpolicy]
|
|
|
|
commands =
|
2018-04-28 15:36:38 +08:00
|
|
|
oslopolicy-sample-generator --config-file etc/zaqar-policy-generator.conf
|
2017-10-02 16:55:36 +00:00
|
|
|
|
2013-02-25 15:47:39 +01:00
|
|
|
[testenv:cover]
|
2018-12-19 10:32:28 +08:00
|
|
|
setenv =
|
|
|
|
{[testenv]setenv}
|
|
|
|
PYTHON=coverage run --source zaqar --parallel-mode
|
2014-01-09 14:14:17 +01:00
|
|
|
commands =
|
2019-05-25 14:46:53 -05:00
|
|
|
{[testenv]commands}
|
2018-12-19 10:32:28 +08:00
|
|
|
coverage combine
|
|
|
|
coverage html -d cover
|
|
|
|
coverage xml -o cover/coverage.xml
|
2013-02-25 15:47:39 +01:00
|
|
|
|
|
|
|
[testenv:venv]
|
|
|
|
commands = {posargs}
|
2013-05-06 09:51:56 -04:00
|
|
|
|
2014-04-02 16:21:37 -07:00
|
|
|
[testenv:docs]
|
2018-04-20 10:03:48 +08:00
|
|
|
deps =
|
2024-04-07 00:08:48 +09:00
|
|
|
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
2022-09-15 15:59:06 +00:00
|
|
|
-r{toxinidir}/requirements.txt
|
2019-05-28 09:30:09 -05:00
|
|
|
-r{toxinidir}/doc/requirements.txt
|
2016-04-18 13:15:38 +12:00
|
|
|
commands =
|
2019-05-28 09:30:09 -05:00
|
|
|
sphinx-build -W -b html doc/source doc/build/html
|
2016-04-18 13:15:38 +12:00
|
|
|
|
|
|
|
[testenv:api-ref]
|
|
|
|
# This environment is called from CI scripts to test and publish
|
2019-07-22 18:49:39 +02:00
|
|
|
# the API Ref to docs.openstack.org.
|
2016-04-18 13:15:38 +12:00
|
|
|
#
|
2021-07-09 10:40:15 +08:00
|
|
|
allowlist_externals = bash
|
2016-04-18 13:15:38 +12:00
|
|
|
rm
|
2019-05-28 09:30:09 -05:00
|
|
|
deps =
|
2020-12-24 14:03:55 +08:00
|
|
|
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
2019-05-28 09:30:09 -05:00
|
|
|
-r{toxinidir}/doc/requirements.txt
|
2016-04-18 13:15:38 +12:00
|
|
|
commands =
|
2019-05-28 09:30:09 -05:00
|
|
|
rm -rf api-ref/build
|
|
|
|
sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
|
2014-04-02 16:21:37 -07:00
|
|
|
|
2015-07-09 14:32:56 +12:00
|
|
|
[testenv:debug]
|
|
|
|
commands = oslo_debug_helper {posargs}
|
|
|
|
|
2015-11-04 14:19:12 +13:00
|
|
|
[testenv:releasenotes]
|
2019-05-28 09:30:09 -05:00
|
|
|
deps =
|
2020-12-24 14:03:55 +08:00
|
|
|
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
2019-05-28 09:30:09 -05:00
|
|
|
-r{toxinidir}/doc/requirements.txt
|
2017-08-09 18:43:33 +08:00
|
|
|
commands =
|
2019-05-28 09:30:09 -05:00
|
|
|
doc8 releasenotes/source releasenotes/notes
|
|
|
|
sphinx-build -a -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
2015-11-04 14:19:12 +13:00
|
|
|
|
2013-05-06 09:51:56 -04:00
|
|
|
[flake8]
|
2016-05-11 13:40:42 +08:00
|
|
|
exclude = .venv*,.git,.tox,dist,doc,*lib/python*,*.egg,.update-venv
|
2017-12-25 19:00:10 -08:00
|
|
|
# NOTE(flaper87): Our currently max-complexity is 20. Not sure what the ideal complexity
|
2014-10-17 15:55:10 +02:00
|
|
|
# for Zaqar should be but lets keep it to the minimum possible.
|
2017-12-25 19:00:10 -08:00
|
|
|
max-complexity = 20
|
2017-07-04 06:02:13 -04:00
|
|
|
# [H904] Delay string interpolations at logging calls.
|
|
|
|
enable-extensions=H904
|
2020-04-02 10:01:27 +02:00
|
|
|
# Ignored extensions, might be enabled again after review:
|
|
|
|
# E123 closing bracket does not match indentation of opening bracket's line
|
|
|
|
# E226 missing whitespace around arithmetic operator
|
|
|
|
# E241 multiple spaces after ','
|
|
|
|
# E402 module level import not at top of file
|
|
|
|
# E731 do not assign a lambda expression, use a def
|
|
|
|
# W503 line break before binary operator
|
|
|
|
# W504 line break after binary operator
|
|
|
|
ignore = E123,E226,E241,E402,E731,W503,W504
|
2013-12-05 00:45:54 +01:00
|
|
|
|
2017-08-09 18:43:33 +08:00
|
|
|
[doc8]
|
|
|
|
# File extensions to check
|
|
|
|
extensions = .rst, .yaml
|
|
|
|
# Maximal line length should be 80 but we have some overlong lines.
|
|
|
|
# Let's not get far more in.
|
|
|
|
max-line-length = 80
|
|
|
|
|
2020-04-02 10:01:27 +02:00
|
|
|
[flake8:local-plugins]
|
|
|
|
extension =
|
|
|
|
N537 = checks:no_translate_logs
|
|
|
|
paths = ./zaqar/hacking
|