You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
66 lines
1.9 KiB
66 lines
1.9 KiB
[tox]
|
|
minversion = 3.18.0
|
|
envlist = pep8,py3,docs,api-ref
|
|
skipsdist = True
|
|
ignore_basepython_conflict = True
|
|
|
|
[testenv]
|
|
basepython = python3
|
|
usedevelop = True
|
|
setenv =
|
|
PYTHONDONTWRITEBYTECODE=1
|
|
deps =
|
|
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
|
-r{toxinidir}/test-requirements.txt
|
|
commands =
|
|
stestr run {posargs}
|
|
stestr slowest
|
|
|
|
[testenv:pep8]
|
|
commands =
|
|
flake8 {posargs}
|
|
|
|
[testenv:genconfig]
|
|
commands = oslo-config-generator --config-file=etc/ec2api/ec2api-config-generator.conf
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:docs]
|
|
# This environment is called from CI scripts to test and publish
|
|
# the API Ref and Docs to docs.openstack.org.
|
|
allowlist_externals = rm
|
|
deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
|
-r{toxinidir}/doc/requirements.txt
|
|
commands =
|
|
rm -rf doc/build
|
|
sphinx-build -W --keep-going -b html -d doc/build/doctrees doc/source doc/build/html
|
|
|
|
[testenv:api-ref]
|
|
# This environment is called from CI scripts to test and publish
|
|
# the API Ref to docs.openstack.org.
|
|
allowlist_externals = rm
|
|
deps = {[testenv:docs]deps}
|
|
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
|
|
|
|
[flake8]
|
|
# E712 is ignored on purpose, since it is normal to use 'column == true'
|
|
# in sqlalchemy.
|
|
# TODO Hacking 0.6 checks to fix
|
|
# H102 Apache 2.0 license header not found
|
|
# W503 line break before binary operator
|
|
# W504 line break after binary operator
|
|
ignore = E121,E122,E123,E124,E126,E127,E128,E711,E712,H102,H303,H404,F403,F811,F841,W503,W504
|
|
# H106: Don't put vim configuration in source files
|
|
# H203: Use assertIs(Not)None to check for None
|
|
enable-extensions=H106,H203
|
|
exclude = .venv,.git,.tox,dist,envname,*lib/python*,*egg,build,tools
|
|
max-complexity=25
|
|
|
|
[flake8:local-plugins]
|
|
extension =
|
|
N537 = checks:no_translate_logs
|
|
paths = ./ec2api/hacking
|