blazar/tox.ini
Pierre Riteau 06d102c655 Build pdf doc
One of community goals is that each project should produce a single PDF
file. The pdf should be in the output of the openstack-tox-docs job.

TeX packages are required to build PDF locally, the following are
recommended:

* inkscape
* texlive-latex-base
* texlive-latex-extra
* texlive-fonts-recommended

More about the goal:

* https://governance.openstack.org/tc/goals/train/pdf-doc-generation.html
* https://etherpad.openstack.org/p/train-pdf-support-goal
* https://etherpad.openstack.org/p/pdf-goal-train-common-problems

Change-Id: If9850d8275e8c4f46b393b2cdd91c8963b9844a1
Story: 2006073
Task: 34795
2019-09-26 15:30:55 +02:00

107 lines
3.1 KiB
INI

[tox]
envlist = py27,py36,py37,pep8
minversion = 2.0
skipsdist = True
[testenv]
usedevelop = True
whitelist_externals = rm
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} {opts} {packages}
deps = -r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
setenv = VIRTUAL_ENV={envdir}
DISCOVER_DIRECTORY=blazar/tests
PYTHONHASHSEED=0
commands =
lockutils-wrapper python setup.py testr --slowest --testr-args="{posargs}"
sitepackages = False
[testenv:cover]
basepython = python3
setenv = VIRTUAL_ENV={envdir}
commands =
lockutils-wrapper python setup.py testr --coverage --testr-args="{posargs}"
[testenv:pep8]
basepython = python3
commands = flake8 {posargs}
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:docs]
basepython = python3
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands =
rm -rf doc/html doc/build
rm -rf doc/source/apidoc doc/source/api
python setup.py build_sphinx
[testenv:pdf-docs]
basepython = python3
deps = {[testenv:docs]deps}
whitelist_externals = make
commands =
sphinx-build -b latex doc/source doc/build/pdf
make -C doc/build/pdf
[testenv:genconfig]
basepython = python3
commands = oslo-config-generator --config-file=etc/blazar/blazar-config-generator.conf
[flake8]
show-source = true
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,tools,api-ref
# NOTE(tonyb): Ignore a few errors/warnings that are now "on by default".
ignore=H105,H238,E123
# [H904] Delay string interpolations at logging calls.
enable-extensions=H904
[hacking]
local-check-factory = blazar.hacking.checks.factory
[testenv:pylint]
basepython = python3
deps = -r{toxinidir}/requirements.txt
pylint==1.9.1
commands = pylint blazar
[testenv:releasenotes]
basepython = python3
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -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 -WE -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
[testenv:genpolicy]
commands =
oslopolicy-sample-generator --config-file etc/blazar/blazar-policy-generator.conf
[testenv:lower-constraints]
basepython = python3
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
# This environment can be used to quickly validate that all needed system
# packages required to successfully execute test targets are installed
[testenv:bindep]
basepython = python3
# 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.
deps = bindep
commands = bindep test