955cf52863
This patch adds a `pdf-docs` tox target that will build PDF versions of our docs. As per the Train community goal: https://governance.openstack.org/tc/goals/selected/train/pdf-doc-generation.html Add sphinxcontrib-svg2pdfconverter to doc/requirements.txt to convert our SVGs. Story: 2006105 Change-Id: Ia0599ac65cc324e317430495a879f52c76f72484 Signed-off-by: Alexandra Settle <asettle@suse.com>
181 lines
4.3 KiB
INI
181 lines
4.3 KiB
INI
[tox]
|
|
minversion = 2.0
|
|
skipsdist = True
|
|
envlist = linters,docs,releasenotes,inventory,py3-inventory
|
|
|
|
|
|
[testenv]
|
|
usedevelop = True
|
|
basepython = python2.7
|
|
install_command =
|
|
pip install -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/upper-constraints.txt} {opts} {packages}
|
|
deps =
|
|
-r{toxinidir}/global-requirement-pins.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
passenv =
|
|
COMMON_TESTS_PATH
|
|
HOME
|
|
http_proxy
|
|
HTTP_PROXY
|
|
https_proxy
|
|
HTTPS_PROXY
|
|
no_proxy
|
|
NO_PROXY
|
|
TESTING_BRANCH
|
|
TESTING_HOME
|
|
USER
|
|
whitelist_externals =
|
|
bash
|
|
setenv =
|
|
PYTHONUNBUFFERED=1
|
|
PYTHONWARNINGS=default::DeprecationWarning
|
|
VIRTUAL_ENV={envdir}
|
|
WORKING_DIR={toxinidir}
|
|
ANSIBLE_EXTRA_ROLE_DIRS={toxinidir}/playbooks/roles:{homedir}/.ansible/roles/ceph-ansible/roles
|
|
ANSIBLE_ROLE_REQUIREMENTS_PATH={toxinidir}/ansible-role-requirements.yml
|
|
TEST_PLAYBOOK={toxinidir}/tests/bootstrap-aio.yml {toxinidir}/playbooks/setup-everything.yml
|
|
ANSIBLE_LINT_PARAMS=--exclude={homedir}/.ansible/roles
|
|
|
|
|
|
|
|
[testenv:docs]
|
|
basepython = python3
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
|
commands =
|
|
doc8 doc
|
|
docstheme-build-translated.sh
|
|
|
|
|
|
|
|
[testenv:deploy-guide]
|
|
basepython = python3
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
|
commands = sphinx-build -a -E -W -d deploy-guide/build/doctrees -b html deploy-guide/source deploy-guide/build/html
|
|
|
|
[testenv:pdf-docs]
|
|
basepython = python3
|
|
deps = {[testenv:docs]deps}
|
|
whitelist_externals =
|
|
make
|
|
commands =
|
|
sphinx-build -W -b latex doc/source doc/build/pdf
|
|
make -C doc/build/pdf
|
|
|
|
[doc8]
|
|
# Settings for doc8:
|
|
extensions = .rst
|
|
ignore = D001
|
|
|
|
|
|
|
|
[testenv:releasenotes]
|
|
basepython = python3
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
|
commands =
|
|
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
|
|
|
|
|
|
|
# environment used by the -infra templated docs job
|
|
[testenv:venv]
|
|
basepython = python3
|
|
commands =
|
|
{posargs}
|
|
|
|
|
|
|
|
[testenv:pep8]
|
|
basepython = python3
|
|
commands =
|
|
bash -c "{toxinidir}/tests/common/test-pep8.sh"
|
|
|
|
|
|
|
|
[flake8]
|
|
# Ignores the following rules due to how ansible modules work in general
|
|
# F403 'from ansible.module_utils.basic import *' used;
|
|
# unable to detect undefined names
|
|
ignore=F403
|
|
|
|
|
|
|
|
[testenv:bashate]
|
|
basepython = python3
|
|
commands =
|
|
bash -c "{toxinidir}/tests/common/test-bashate.sh"
|
|
|
|
|
|
|
|
# The deps URL should be set to the appropriate git URL.
|
|
# In the tests repo itself, the variable is uniquely set to
|
|
# the toxinidir so that the role is able to test itself, but
|
|
# the tox config is exactly the same as other repositories.
|
|
#
|
|
# The value for other repositories must be:
|
|
# https://opendev.org/openstack/openstack-ansible-tests/raw/test-ansible-deps.txt
|
|
# or for a stable branch:
|
|
# https://opendev.org/openstack/openstack-ansible-tests/raw/stable/stein/test-ansible-deps.txt
|
|
[testenv:ansible]
|
|
basepython = python3
|
|
deps =
|
|
{[testenv]deps}
|
|
-r{toxinidir}/global-requirement-pins.txt
|
|
-rhttps://opendev.org/openstack/openstack-ansible-tests/raw/test-ansible-deps.txt
|
|
|
|
|
|
|
|
[testenv:ansible-syntax]
|
|
basepython = python3
|
|
deps =
|
|
{[testenv:ansible]deps}
|
|
commands =
|
|
bash -c "{toxinidir}/tests/common/test-ansible-syntax.sh"
|
|
|
|
|
|
|
|
[testenv:ansible-lint]
|
|
basepython = python3
|
|
deps =
|
|
{[testenv:ansible]deps}
|
|
commands =
|
|
bash -c "{toxinidir}/tests/common/test-ansible-lint.sh"
|
|
|
|
|
|
|
|
[testenv:inventory]
|
|
basepython = python3
|
|
# Use a fixed seed since some inventory tests rely on specific ordering
|
|
setenv =
|
|
{[testenv]setenv}
|
|
PYTHONHASHSEED = 100
|
|
commands =
|
|
coverage erase
|
|
coverage run -a {toxinidir}/tests/test_inventory.py
|
|
coverage run -a {toxinidir}/tests/test_manage.py
|
|
coverage run -a {toxinidir}/tests/test_dictutils.py
|
|
coverage run -a {toxinidir}/tests/test_ip.py
|
|
coverage run -a {toxinidir}/tests/test_filesystem.py
|
|
coverage report --show-missing --include={toxinidir}/inventory/*,{toxinidir}/osa_toolkit/*
|
|
|
|
|
|
|
|
[testenv:py3-inventory]
|
|
basepython = python3.5
|
|
setenv =
|
|
{[testenv:inventory]setenv}
|
|
commands =
|
|
{[testenv:inventory]commands}
|
|
|
|
|
|
|
|
[testenv:linters]
|
|
basepython = python3
|
|
deps =
|
|
{[testenv:ansible]deps}
|
|
commands =
|
|
{[testenv:pep8]commands}
|
|
{[testenv:bashate]commands}
|
|
{[testenv:ansible-lint]commands}
|
|
{[testenv:ansible-syntax]commands}
|
|
{[testenv:inventory]commands}
|