97db901658
OpenStack is dropping the py2.7 support in ussuri cycle. Complete discussion & schedule can be found in - http://lists.openstack.org/pipermail/openstack-discuss/2019-October/010142.html - https://etherpad.openstack.org/p/drop-python2-support Ussuri Communtiy-wide goal: https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html This change cleans up: * remove old requirements * remove universal wheel building, we don't need this for py3 * cleanup setup.py * tox.ini: move basepython around; remove install_command since the default is fine and constraints should be in deps; add ignore_basepython_conflict Change-Id: Ife0a696ca62be21d3d93c5d8279a412578f62697
150 lines
4.9 KiB
INI
150 lines
4.9 KiB
INI
[tox]
|
|
envlist = py36,py37,pep8
|
|
ignore_basepython_conflict = True
|
|
minversion = 3.1.0
|
|
skipsdist = True
|
|
|
|
[testenv]
|
|
basepython = python3
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
PYTHONWARNINGS=default::DeprecationWarning
|
|
OS_TEST_PATH=heat/tests
|
|
usedevelop = True
|
|
deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
|
-r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
commands =
|
|
stestr run {posargs}
|
|
stestr slowest
|
|
|
|
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
|
|
|
|
[testenv:pep8]
|
|
commands =
|
|
flake8 heat bin/heat-api bin/heat-api-cfn bin/heat-engine bin/heat-manage contrib heat_integrationtests doc/source
|
|
python tools/custom_guidelines.py --exclude heat/engine/resources/aws
|
|
# 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
|
|
bandit -r heat -x tests --skip B101,B104,B107,B110,B310,B311,B404,B410,B504,B506,B603,B607
|
|
doc8 {posargs}
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:cover]
|
|
setenv =
|
|
PYTHON=coverage run --source heat --parallel-mode
|
|
commands =
|
|
coverage erase
|
|
stestr run {posargs}
|
|
coverage combine
|
|
coverage html -d cover
|
|
coverage xml -o cover/coverage.xml
|
|
coverage report
|
|
|
|
[testenv:docs]
|
|
whitelist_externals =
|
|
rm
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
|
commands =
|
|
rm -rf doc/build
|
|
sphinx-build -W --keep-going -b html doc/source doc/build/html
|
|
|
|
[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
|
|
|
|
[testenv:api-ref]
|
|
# This environment is called from CI scripts to test and publish
|
|
# the API Ref to docs.openstack.org.
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
|
whitelist_externals = rm
|
|
commands =
|
|
rm -rf api-ref/build
|
|
sphinx-build -W --keep-going -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
|
|
|
|
[testenv:genconfig]
|
|
commands =
|
|
oslo-config-generator --config-file=config-generator.conf
|
|
oslo-config-generator --config-file=heat_integrationtests/config-generator.conf
|
|
|
|
[testenv:genpolicy]
|
|
commands =
|
|
oslopolicy-sample-generator --config-file etc/heat/heat-policy-generator.conf
|
|
|
|
[testenv:bandit]
|
|
deps =
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
|
-r{toxinidir}/test-requirements.txt
|
|
# 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
|
|
|
|
[flake8]
|
|
show-source = true
|
|
exclude=.*,dist,*lib/python*,*egg,build,*convergence/scenarios/*
|
|
max-complexity=20
|
|
|
|
[doc8]
|
|
ignore = D001
|
|
ignore-path = .venv,.git,.tox,.tmp,*heat/locale*,*lib/python*,openstack_heat.egg*,doc/build,releasenotes/*
|
|
|
|
[hacking]
|
|
import_exceptions = heat.common.i18n
|
|
local-check-factory = heat.hacking.checks.factory
|
|
|
|
[testenv:debug]
|
|
commands = oslo_debug_helper {posargs}
|
|
|
|
[testenv:releasenotes]
|
|
whitelist_externals =
|
|
rm
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
|
commands =
|
|
rm -rf releasenotes/build
|
|
sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html
|
|
|
|
[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
|
|
|
|
[testenv:lower-constraints]
|
|
install_command = pip install {opts} {packages}
|
|
deps =
|
|
-c{toxinidir}/lower-constraints.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
-r{toxinidir}/requirements.txt
|