ad32f7a15d
The api documentation is now published on docs.openstack.org instead of developer.openstack.org. Update all links that are changed to the new location. Note that redirects will be set up as well but let's point now to the new location. For details, see: http://lists.openstack.org/pipermail/openstack-discuss/2019-July/007828.html Change-Id: Ibd4ed1a1e282f0088467a6fcafe44b1dad46ed5f
200 lines
6.1 KiB
INI
200 lines
6.1 KiB
INI
[tox]
|
|
minversion = 2.3.2
|
|
envlist = py27,py37,flake8
|
|
skipsdist = True
|
|
|
|
[testenv]
|
|
setenv =
|
|
VIRTUAL_ENV={envdir}
|
|
LANGUAGE=C.UTF-8
|
|
LC_ALL=C.UTF-8
|
|
OS_LOG_CAPTURE={env:OS_LOG_CAPTURE:true}
|
|
OS_STDOUT_CAPTURE={env:OS_STDOUT_CAPTURE:true}
|
|
OS_STDERR_CAPTURE={env:OS_STDERR_CAPTURE:true}
|
|
OS_TEST_TIMEOUT={env:OS_TEST_TIMEOUT:180}
|
|
PYTHONDONTWRITEBYTECODE=1
|
|
PYTHONWARNINGS=default::DeprecationWarning,ignore::DeprecationWarning:distutils,ignore::DeprecationWarning:site
|
|
passenv =
|
|
http_proxy
|
|
HTTP_PROXY
|
|
https_proxy
|
|
HTTPS_PROXY
|
|
no_proxy
|
|
NO_PROXY
|
|
OS_DEBUG
|
|
usedevelop = True
|
|
install_command =
|
|
pip install {opts} {packages}
|
|
commands =
|
|
find . -type f -name "*.py[c|o]" -delete
|
|
rm -f .testrepository/times.dbm
|
|
deps =
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt?h=master}
|
|
-r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
whitelist_externals =
|
|
sh
|
|
find
|
|
rm
|
|
|
|
[testenv:py27]
|
|
commands =
|
|
{[testenv]commands}
|
|
stestr run {posargs}
|
|
stestr slowest
|
|
|
|
[testenv:py36]
|
|
basepython = python3.6
|
|
commands =
|
|
{[testenv]commands}
|
|
stestr run {posargs}
|
|
|
|
[testenv:py37]
|
|
basepython = python3.7
|
|
commands =
|
|
{[testenv]commands}
|
|
stestr run '{posargs}'
|
|
|
|
[testenv:docs]
|
|
basepython = python3
|
|
deps =
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
|
|
-r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/doc/requirements.txt
|
|
commands =
|
|
rm -rf doc/build
|
|
sphinx-build -W -b html doc/source doc/build/html
|
|
|
|
[testenv:cover]
|
|
basepython = python3
|
|
setenv =
|
|
{[testenv]setenv}
|
|
PYTHON=coverage run --source designate --parallel-mode
|
|
commands =
|
|
coverage erase
|
|
find . -type f -name "*.pyc" -delete
|
|
stestr run --no-subunit-trace {posargs}
|
|
coverage combine
|
|
coverage report --skip-covered
|
|
coverage html -d cover
|
|
coverage xml -o cover/coverage.xml
|
|
|
|
[testenv:bandit]
|
|
basepython = python3
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
commands = bandit -r designate -n5 -x 'designate/tests/*' -t \
|
|
B505,B504,B503,B502,B501,B604,B605,B001,B601,B602,B701,B609,B702,\
|
|
B608,B506,B312,B310,B411,B108,B103,B102,B309,B308,B302,B307,B306
|
|
|
|
[testenv:debug]
|
|
basepython = python3
|
|
commands = oslo_debug_helper -t designate/tests {posargs}
|
|
|
|
[testenv:flake8]
|
|
basepython = python3
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
commands = sh tools/pretty_flake8.sh
|
|
{[testenv:bandit]commands}
|
|
|
|
[testenv:pep8]
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
basepython = python3
|
|
commands = sh tools/pretty_flake8.sh
|
|
{[testenv:bandit]commands}
|
|
doc8 {posargs}
|
|
|
|
[testenv:genconfig]
|
|
basepython = python3
|
|
commands = oslo-config-generator --config-file=etc/designate/designate-config-generator.conf
|
|
|
|
[testenv:genpolicy]
|
|
basepython = python3
|
|
commands = oslopolicy-sample-generator --config-file etc/designate/designate-policy-generator.conf
|
|
|
|
[testenv:bashate]
|
|
basepython = python3
|
|
deps = bashate
|
|
whitelist_externals = bash
|
|
commands = bash -c "find {toxinidir}/devstack \
|
|
-not \( -type d -name .?\* -prune \) \
|
|
-not \( -type d -name doc -prune \) \
|
|
-type f \
|
|
-not -name \*~ \
|
|
-not -name \*.md \
|
|
\( \
|
|
-name \*.sh -or \
|
|
-name \*rc -or \
|
|
-name functions\* -or \
|
|
-wholename \*/lib/\* \
|
|
\) \
|
|
-print0 | xargs -0 bashate -v"
|
|
|
|
[testenv:pip-check-reqs]
|
|
basepython = python3
|
|
# do not install test-requirements as that will pollute the virtualenv for
|
|
# determining missing packages
|
|
# this also means that pip-missing-reqs must be installed separately, outside
|
|
# of the requirements.txt files
|
|
deps = pip-check-reqs
|
|
-r{toxinidir}/requirements.txt
|
|
commands=pip-missing-reqs -d --ignore-file=designate/tests/* designate
|
|
|
|
[testenv:api-ref]
|
|
basepython = python3
|
|
# This environment is called from CI scripts to test and publish
|
|
# the API Ref to docs.openstack.org.
|
|
deps =
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
|
|
-r{toxinidir}/doc/requirements.txt
|
|
commands =
|
|
rm -rf api-ref/build
|
|
sphinx-build -E -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
|
|
|
|
[testenv:releasenotes]
|
|
basepython = python3
|
|
deps =
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
|
|
-r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/doc/requirements.txt
|
|
commands =
|
|
rm -rf releasenotes/build
|
|
sphinx-build -a -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
|
|
|
[testenv:venv]
|
|
basepython = python3
|
|
commands = {posargs}
|
|
deps = -r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
-r{toxinidir}/doc/requirements.txt
|
|
|
|
[doc8]
|
|
ignore-path = .venv,.git,.tox,*designate/locale*,*lib/python*,*designate.egg*,api-ref/build,doc/build,doc/source/contributor/api
|
|
|
|
[flake8]
|
|
# ignored flake8 codes:
|
|
# H105 don't use author tags. We use version control instead
|
|
# H302 import only modules
|
|
# H306 imports not in alphabetical order
|
|
# H238 old style class declaration, use new style (inherit from `object`)
|
|
# H402 one line docstring needs punctuation
|
|
# H404 multi line docstring should start with a summary
|
|
# H405 multi line docstring summary not separated with an empty line
|
|
# H501 Do not use locals() or self.__dict__ for string formatting.
|
|
# H904 Wrap long lines in parentheses instead of a backslash
|
|
# E126 continuation line over-indented for hanging indent
|
|
# E128 continuation line under-indented for visual indent
|
|
|
|
ignore = H105,H302,H306,H238,H402,H404,H405,H501,H904,E126,E128
|
|
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,tools,.ropeproject
|
|
|
|
[hacking]
|
|
local-check-factory = designate.hacking.checks.factory
|
|
import_exceptions = designate.i18n
|
|
|
|
[testenv:lower-constraints]
|
|
basepython = python3
|
|
deps =
|
|
-c{toxinidir}/lower-constraints.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
-r{toxinidir}/requirements.txt
|