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.
97 lines
3.0 KiB
97 lines
3.0 KiB
[tox] |
|
minversion = 3.1.1 |
|
envlist = py{37,36},pep8,pip-check-reqs |
|
skipsdist = True |
|
ignore_basepython_conflict = True |
|
|
|
[testenv] |
|
basepython = python3 |
|
usedevelop = True |
|
setenv = VIRTUAL_ENV={envdir} |
|
whitelist_externals = find |
|
deps = -r{toxinidir}/requirements.txt |
|
-r{toxinidir}/test-requirements.txt |
|
commands = |
|
find . -type f -name "*.pyc" -delete |
|
stestr run {posargs} |
|
|
|
[testenv:pep8] |
|
sitepackages = False |
|
commands = |
|
flake8 {posargs} |
|
|
|
[testenv:venv] |
|
commands = {posargs} |
|
|
|
[testenv:cover] |
|
setenv = |
|
{[testenv]setenv} |
|
PYTHON=coverage run --source coverage2sql --parallel-mode |
|
commands = |
|
coverage erase |
|
find . -type f -name "*.pyc" -delete |
|
stestr --test-path ./coverage2sql/tests run {posargs} |
|
coverage combine |
|
coverage html -d cover |
|
coverage xml -o cover/coverage.xml |
|
coverage report |
|
|
|
|
|
[testenv:docs] |
|
deps = |
|
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} |
|
-r{toxinidir}/requirements.txt |
|
-r{toxinidir}/doc/requirements.txt |
|
commands = sphinx-build -W -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:debug] |
|
commands = oslo_debug_helper {posargs} |
|
|
|
[testenv:releasenotes] |
|
deps = |
|
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} |
|
-r{toxinidir}/requirements.txt |
|
-r{toxinidir}/doc/requirements.txt |
|
commands = sphinx-build -a -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html |
|
|
|
[flake8] |
|
# E123 skipped because it is ignored by default in the default pep8 |
|
# E125 is deliberately excluded. See https://github.com/jcrocholl/pep8/issues/126 |
|
# E129 skipped because it is too limiting when combined with other rules |
|
# E711 skipped because sqlalchemy filter() requires using == instead of is |
|
# W503 line break before binary operator |
|
# W504 line break after binary operator |
|
show-source = True |
|
ignore = E123,E125,E129,E711,W503,W504 |
|
builtins = _ |
|
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,releasenotes |
|
|
|
|
|
[testenv:pip-check-reqs] |
|
# Do not install test-requirements as that will pollute the virtualenv for |
|
# determining missing packages. |
|
# This also means that pip-check-reqs must be installed separately, outside |
|
# of the requirements.txt files |
|
deps = pip_check_reqs |
|
-r{toxinidir}/requirements.txt |
|
commands= |
|
pip-extra-reqs -d --ignore-file=coverage2sql/tests/* coverage2sql |
|
pip-missing-reqs -d --ignore-file=coverage2sql/tests/* coverage2sql |
|
|
|
[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
|
|
|