mistral/tox.ini
caoyuan 6e89218125 tox: Keeping going with docs
Sphinx 1.8 introduced [1] the '--keep-going' argument which, as its name
suggests, keeps the build running when it encounters non-fatal errors.
This is exceptionally useful in avoiding a continuous edit-build loop
when undertaking large doc reworks where multiple errors may be
introduced.

[1] https://github.com/sphinx-doc/sphinx/commit/e3483e9b045

Change-Id: Ife98c47af59355540fa30d7ca762f857759c1274
2019-10-24 13:20:19 +00:00

124 lines
3.4 KiB
INI

[tox]
envlist = py27,py37,pep8
minversion = 2.0
skipsdist = True
[testenv]
usedevelop = True
install_command = pip install {opts} {packages}
setenv = VIRTUAL_ENV={envdir}
PYTHONDONTWRITEBYTECODE = 1
PYTHONWARNINGS=default::DeprecationWarning
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
# javascript engine
py_mini_racer
commands =
rm -f .testrepository/times.dbm
find . -type f -name "*.pyc" -delete
stestr run --slowest {posargs}
whitelist_externals =
rm
find
[testenv:unit-postgresql]
basepython = python3
setenv = VIRTUAL_ENV={envdir}
passenv = ZUUL_PROJECT
commands = ./run_tests.sh -N --db-type postgresql
[testenv:unit-mysql]
basepython = python3
setenv = VIRTUAL_ENV={envdir}
passenv = ZUUL_PROJECT
commands = ./run_tests.sh -N --db-type mysql
[testenv:pep8]
basepython = python3
commands =
doc8 doc/source
flake8 {posargs} . {toxinidir}/tools/get_action_list.py {toxinidir}/tools/sync_db.py
[testenv:cover]
basepython = python3
setenv =
{[testenv]setenv}
PYTHON=coverage run --source mistral --parallel-mode
commands =
stestr run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
[testenv:genconfig]
basepython = python3
commands =
oslo-config-generator --config-file tools/config/config-generator.mistral.conf \
--output-file etc/mistral.conf.sample
[testenv:genpolicy]
basepython = python3
commands =
oslopolicy-sample-generator --config-file tools/config/policy-generator.mistral.conf \
--output-file etc/policy.yaml.sample
#set PYTHONHASHSEED=0 to prevent wsmeext.sphinxext from randomly failing.
[testenv:venv]
basepython = python3
setenv = PYTHONHASHSEED=0
commands = {posargs}
#set PYTHONHASHSEED=0 to prevent wsmeext.sphinxext from randomly failing.
[testenv:docs]
basepython = python3
deps = -r{toxinidir}/doc/requirements.txt
setenv = PYTHONHASHSEED=0
commands =
rm -rf doc/build
sphinx-build -E -W --keep-going -b html doc/source doc/build/html
[testenv:releasenotes]
basepython = python3
commands =
rm -rf releasenotes/build
sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html
[testenv:api-ref]
basepython = python3
# This environment is called from CI scripts to test and publish
# the API Ref to docs.openstack.org.
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
whitelist_externals = rm
#Skip PEP257 violation.
[flake8]
ignore = D100,D101,D102,D103,D104,D105,D200,D203,D202,D204,D205,D208,D400,D401,E402,W503,E731
show-source = true
builtins = _
# [H106] Don't put vim configuration in source files.
# [H203] Use assertIs(Not)None to check for None.
# [H904] Delay string interpolations at logging calls.
enable-extensions = H106,H203,H904
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,tools,scripts
[doc8]
extensions = .rst, .yaml, .mistral
# Maximal line length should be 80.
max-line-length = 80
[hacking]
local-check-factory = mistral.hacking.checks.factory
import_exceptions = mistral._i18n
[testenv:lower-constraints]
basepython = python3
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt