2012-05-08 17:39:08 -04:00
|
|
|
[tox]
|
2019-10-29 15:48:28 -04:00
|
|
|
envlist = py36,py37,pep8
|
2020-02-06 18:52:50 +01:00
|
|
|
ignore_basepython_conflict = True
|
|
|
|
minversion = 3.1.0
|
2013-12-09 13:53:45 +01:00
|
|
|
skipsdist = True
|
2012-05-08 17:39:08 -04:00
|
|
|
|
|
|
|
[testenv]
|
2020-02-06 18:52:50 +01:00
|
|
|
basepython = python3
|
2012-05-08 17:39:08 -04:00
|
|
|
setenv = VIRTUAL_ENV={envdir}
|
2016-11-22 15:59:17 +08:00
|
|
|
PYTHONWARNINGS=default::DeprecationWarning
|
2016-07-28 22:00:29 +00:00
|
|
|
OS_TEST_PATH=heat/tests
|
2013-12-09 13:53:45 +01:00
|
|
|
usedevelop = True
|
2020-02-06 18:52:50 +01:00
|
|
|
deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
|
|
|
-r{toxinidir}/requirements.txt
|
2013-05-15 21:48:36 -07:00
|
|
|
-r{toxinidir}/test-requirements.txt
|
2013-04-24 20:07:37 -07:00
|
|
|
commands =
|
2018-10-09 10:06:57 +07:00
|
|
|
stestr run {posargs}
|
2017-12-15 12:08:54 +05:30
|
|
|
stestr slowest
|
2013-09-09 18:02:49 -05:00
|
|
|
|
2016-01-13 18:06:07 +08:00
|
|
|
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
|
2014-03-31 21:39:28 +02:00
|
|
|
|
2012-05-08 17:39:08 -04:00
|
|
|
[testenv:pep8]
|
2013-07-10 16:01:00 +02:00
|
|
|
commands =
|
2017-10-27 12:57:24 +05:30
|
|
|
flake8 heat bin/heat-api bin/heat-api-cfn bin/heat-engine bin/heat-manage contrib heat_integrationtests doc/source
|
2016-02-18 12:50:29 +03:00
|
|
|
python tools/custom_guidelines.py --exclude heat/engine/resources/aws
|
2017-03-10 15:32:31 -08:00
|
|
|
# The following bandit tests are being skipped:
|
|
|
|
# B101: Test for use of assert
|
|
|
|
# B104: Test for binding to all interfaces
|
|
|
|
# B107: Test for use of hard-coded password argument defaults
|
|
|
|
# B110: Try, Except, Pass detected.
|
|
|
|
# B310: Audit url open for permitted schemes
|
|
|
|
# B311: Standard pseudo-random generators are not suitable for security/cryptographic purposes
|
2019-11-20 19:28:06 +01:00
|
|
|
# B322: The input method is safe in Python 3.
|
2017-03-10 15:32:31 -08:00
|
|
|
# B404: Import of subprocess module
|
|
|
|
# B410: Import of lxml module
|
|
|
|
# B504: Test for SSL use with no version specified
|
|
|
|
# B506: Test for use of yaml load
|
|
|
|
# B603: Test for use of subprocess with shell equals true
|
|
|
|
# B607: Test for starting a process with a partial path
|
2019-11-20 19:28:06 +01:00
|
|
|
bandit -r heat -x tests --skip B101,B104,B107,B110,B310,B311,B322,B404,B410,B504,B506,B603,B607
|
2018-07-12 15:16:10 +07:00
|
|
|
doc8 {posargs}
|
2012-05-08 17:39:08 -04:00
|
|
|
|
|
|
|
[testenv:venv]
|
|
|
|
commands = {posargs}
|
|
|
|
|
2012-05-17 16:02:04 -04:00
|
|
|
[testenv:cover]
|
2018-01-31 17:38:24 +05:30
|
|
|
setenv =
|
|
|
|
PYTHON=coverage run --source heat --parallel-mode
|
2013-04-24 20:07:37 -07:00
|
|
|
commands =
|
2018-01-31 17:38:24 +05:30
|
|
|
coverage erase
|
2018-10-09 10:06:57 +07:00
|
|
|
stestr run {posargs}
|
2018-01-31 17:38:24 +05:30
|
|
|
coverage combine
|
|
|
|
coverage html -d cover
|
|
|
|
coverage xml -o cover/coverage.xml
|
2016-12-30 16:56:00 +08:00
|
|
|
coverage report
|
2013-05-11 14:26:42 -04:00
|
|
|
|
2013-08-23 12:09:58 +10:00
|
|
|
[testenv:docs]
|
2019-10-24 19:31:18 +08:00
|
|
|
whitelist_externals =
|
|
|
|
rm
|
2017-12-19 15:16:32 +08:00
|
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
|
|
|
commands =
|
|
|
|
rm -rf doc/build
|
2019-10-24 19:31:18 +08:00
|
|
|
sphinx-build -W --keep-going -b html doc/source doc/build/html
|
2013-08-23 12:09:58 +10:00
|
|
|
|
2019-09-23 14:09:01 -07:00
|
|
|
[testenv:pdf-docs]
|
|
|
|
deps = {[testenv:docs]deps}
|
|
|
|
whitelist_externals =
|
|
|
|
make
|
|
|
|
commands =
|
|
|
|
sphinx-build -W -b latex doc/source doc/build/pdf
|
|
|
|
make -C doc/build/pdf
|
|
|
|
|
2016-05-04 15:23:15 -04:00
|
|
|
[testenv:api-ref]
|
|
|
|
# This environment is called from CI scripts to test and publish
|
2019-07-22 18:55:34 +02:00
|
|
|
# the API Ref to docs.openstack.org.
|
2017-12-19 15:16:32 +08:00
|
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
2019-10-29 15:48:28 -04:00
|
|
|
whitelist_externals = rm
|
2016-05-04 15:23:15 -04:00
|
|
|
commands =
|
|
|
|
rm -rf api-ref/build
|
2019-10-24 19:31:18 +08:00
|
|
|
sphinx-build -W --keep-going -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
|
2016-05-04 15:23:15 -04:00
|
|
|
|
2014-10-14 21:17:52 +01:00
|
|
|
[testenv:genconfig]
|
2015-02-04 00:01:26 +05:30
|
|
|
commands =
|
|
|
|
oslo-config-generator --config-file=config-generator.conf
|
2014-10-14 21:17:52 +01:00
|
|
|
|
2017-10-06 13:01:40 +08:00
|
|
|
[testenv:genpolicy]
|
|
|
|
commands =
|
|
|
|
oslopolicy-sample-generator --config-file etc/heat/heat-policy-generator.conf
|
|
|
|
|
2015-07-07 18:14:15 -04:00
|
|
|
[testenv:bandit]
|
2020-02-06 18:52:50 +01:00
|
|
|
deps =
|
|
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
|
|
|
-r{toxinidir}/test-requirements.txt
|
2017-03-10 15:32:31 -08:00
|
|
|
# The following bandit tests are being skipped:
|
|
|
|
# B101: Test for use of assert
|
|
|
|
# B104: Test for binding to all interfaces
|
|
|
|
# B107: Test for use of hard-coded password argument defaults
|
|
|
|
# B110: Try, Except, Pass detected.
|
|
|
|
# B310: Audit url open for permitted schemes
|
|
|
|
# B311: Standard pseudo-random generators are not suitable for security/cryptographic purposes
|
|
|
|
# B404: Import of subprocess module
|
|
|
|
# B410: Import of lxml module
|
|
|
|
# B504: Test for SSL use with no version specified
|
|
|
|
# B506: Test for use of yaml load
|
|
|
|
# B603: Test for use of subprocess with shell equals true
|
|
|
|
# B607: Test for starting a process with a partial path
|
|
|
|
commands = bandit -r heat -x tests --skip B101,B104,B107,B110,B310,B311,B404,B410,B504,B506,B603,B607
|
2015-04-23 14:57:28 +05:30
|
|
|
|
2013-05-11 14:26:42 -04:00
|
|
|
[flake8]
|
|
|
|
show-source = true
|
2020-04-09 12:29:09 +02:00
|
|
|
# E123 closing bracket does not match indentation of opening bracket's line
|
|
|
|
# W503 line break before binary operator
|
|
|
|
# W504 line break after binary operator
|
2020-04-30 16:42:53 +02:00
|
|
|
ignore = E123,W503,W504
|
2016-10-09 03:27:07 +05:30
|
|
|
exclude=.*,dist,*lib/python*,*egg,build,*convergence/scenarios/*
|
2020-04-09 12:29:09 +02:00
|
|
|
max-complexity=23
|
2014-10-21 16:11:34 +08:00
|
|
|
|
2018-07-12 15:16:10 +07:00
|
|
|
[doc8]
|
|
|
|
ignore = D001
|
2018-09-28 14:22:24 -04:00
|
|
|
ignore-path = .venv,.git,.tox,.tmp,*heat/locale*,*lib/python*,openstack_heat.egg*,doc/build,releasenotes/*
|
2018-07-12 15:16:10 +07:00
|
|
|
|
2014-10-21 16:11:34 +08:00
|
|
|
[hacking]
|
|
|
|
import_exceptions = heat.common.i18n
|
2020-04-09 12:29:09 +02:00
|
|
|
|
|
|
|
[flake8:local-plugins]
|
|
|
|
extension =
|
|
|
|
Heat301 = checks:no_log_warn
|
|
|
|
Heat302 = checks:check_python3_no_iteritems
|
|
|
|
Heat303 = checks:check_python3_no_iterkeys
|
|
|
|
Heat304 = checks:check_python3_no_itervalues
|
|
|
|
paths = ./heat/hacking
|
2015-08-19 11:20:54 -04:00
|
|
|
|
|
|
|
[testenv:debug]
|
|
|
|
commands = oslo_debug_helper {posargs}
|
2015-11-25 20:43:50 +08:00
|
|
|
|
|
|
|
[testenv:releasenotes]
|
2019-10-24 19:31:18 +08:00
|
|
|
whitelist_externals =
|
|
|
|
rm
|
2017-12-19 15:16:32 +08:00
|
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
2019-10-24 19:31:18 +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-03-22 12:40:31 -04:00
|
|
|
|
2019-06-25 17:42:11 +02:00
|
|
|
[testenv:bindep]
|
|
|
|
# Do not install any requirements. We want this to be fast and work even if
|
|
|
|
# system dependencies are missing, since it's used to tell you what system
|
|
|
|
# dependencies are missing! This also means that bindep must be installed
|
|
|
|
# separately, outside of the requirements files, and develop mode disabled
|
|
|
|
# explicitly to avoid unnecessarily installing the checked-out repo too (this
|
|
|
|
# further relies on "tox.skipsdist = True" above).
|
|
|
|
deps = bindep
|
|
|
|
commands = bindep test
|
|
|
|
usedevelop = False
|
|
|
|
|
2018-03-22 12:40:31 -04:00
|
|
|
[testenv:lower-constraints]
|
2019-04-09 09:16:46 +05:30
|
|
|
install_command = pip install {opts} {packages}
|
2018-03-22 12:40:31 -04:00
|
|
|
deps =
|
|
|
|
-c{toxinidir}/lower-constraints.txt
|
|
|
|
-r{toxinidir}/test-requirements.txt
|
|
|
|
-r{toxinidir}/requirements.txt
|