
Add slides tox environment for building RST based slides. This tox environment needs to be enhanced moving forward. For now it includes the doc8 test to test RST and txt files. Also setup doc8 testing. Change-Id: I76e0d235b9ee89c8de8033a7119e34cbcf1f0ddd
95 lines
2.7 KiB
INI
95 lines
2.7 KiB
INI
[tox]
|
|
minversion = 1.6
|
|
envlist = checkniceness,checksyntax,checkdeletions,checkbuild,checklinks
|
|
skipsdist = True
|
|
|
|
[testenv]
|
|
basepython = python2
|
|
setenv =
|
|
VIRTUAL_ENV={envdir}
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
whitelist_externals =
|
|
bash
|
|
cp
|
|
mkdir
|
|
rm
|
|
sed
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:checklinks]
|
|
commands = openstack-doc-test --check-links {posargs}
|
|
|
|
[testenv:checkniceness]
|
|
commands = openstack-doc-test --check-niceness {posargs}
|
|
|
|
[testenv:checksyntax]
|
|
commands =
|
|
openstack-doc-test --check-syntax {posargs}
|
|
# Check that .po and .pot files are valid:
|
|
bash -c "find doc -type f -regex '.*\.pot?' -print0|xargs -0 -n 1 msgfmt --check-format -o /dev/null"
|
|
|
|
[testenv:checkdeletions]
|
|
commands = openstack-doc-test --check-deletions {posargs}
|
|
|
|
[testenv:checkbuild]
|
|
commands =
|
|
mkdir -p publish-docs/trunk/training-guides
|
|
openstack-doc-test --check-build {posargs}
|
|
# Build labs scripts
|
|
bash {toxinidir}/tools/generatelabs
|
|
|
|
[testenv:publishdocs]
|
|
# Prepare all documents (except www subdir) so that they can get
|
|
# published on docs.openstack.org with just copying publish-docs/*
|
|
# over.
|
|
commands =
|
|
# Create directory, it might not be here if openstack-doc-test does
|
|
# not publish anything.
|
|
mkdir -p publish-docs/trunk/training-guides
|
|
# We only publish changed manuals.
|
|
openstack-doc-test --check-build --publish
|
|
# Build and publish training labs scripts
|
|
bash {toxinidir}/tools/generatelabs
|
|
|
|
[testenv:checklang]
|
|
# Generatedocbook needs xml2po which cannot be installed
|
|
# in the venv. Since it's installed in the system, let's
|
|
# use sitepackages.
|
|
sitepackages=True
|
|
whitelist_externals = doc-tools-check-languages
|
|
commands = doc-tools-check-languages doc-tools-check-languages.conf test all
|
|
|
|
[testenv:buildlang]
|
|
# Run as "tox -e buildlang -- $LANG"
|
|
# Generatedocbook needs xml2po which cannot be installed
|
|
# in the venv. Since it's installed in the system, let's
|
|
# use sitepackages.
|
|
sitepackages=True
|
|
whitelist_externals = doc-tools-check-languages
|
|
commands = doc-tools-check-languages doc-tools-check-languages.conf test {posargs}
|
|
|
|
[testenv:publishlang]
|
|
# Generatedocbook needs xml2po which cannot be installed
|
|
# in the venv. Since it's installed in the system, let's
|
|
# use sitepackages.
|
|
sitepackages=True
|
|
whitelist_externals = doc-tools-check-languages
|
|
commands = doc-tools-check-languages doc-tools-check-languages.conf test all
|
|
|
|
[testenv:slides]
|
|
# New RST based environment for building slides
|
|
# Note: Resulting files will not be made available anywhere.
|
|
commands=
|
|
# Niceness test for doc directory
|
|
doc8 doc
|
|
mkdir -p publish-docs/trunk/training-guides
|
|
# Build labs scripts
|
|
bash {toxinidir}/tools/generatelabs
|
|
|
|
[doc8]
|
|
# Settings for doc8:
|
|
# File extensions to use
|
|
extensions = .rst,.txt
|