2013-12-31 17:38:46 +01:00
|
|
|
[tox]
|
|
|
|
minversion = 1.6
|
2016-05-02 09:17:58 +02:00
|
|
|
envlist = checkniceness,checkbuild
|
2014-01-03 10:42:16 +01:00
|
|
|
skipsdist = True
|
2013-12-31 17:38:46 +01:00
|
|
|
|
|
|
|
[testenv]
|
2015-01-06 13:54:07 -08:00
|
|
|
basepython=python2.7
|
2013-12-31 17:38:46 +01:00
|
|
|
setenv =
|
|
|
|
VIRTUAL_ENV={envdir}
|
|
|
|
deps = -r{toxinidir}/test-requirements.txt
|
2014-04-15 15:29:42 +02:00
|
|
|
whitelist_externals =
|
|
|
|
bash
|
|
|
|
cp
|
|
|
|
mkdir
|
2014-04-17 10:24:41 +02:00
|
|
|
rm
|
2014-06-26 15:24:08 +02:00
|
|
|
rsync
|
2013-12-31 17:38:46 +01:00
|
|
|
|
|
|
|
[testenv:venv]
|
|
|
|
commands = {posargs}
|
|
|
|
|
2015-08-24 18:55:16 +02:00
|
|
|
[testenv:linkcheck]
|
|
|
|
commands =
|
|
|
|
{toxinidir}/tools/build-all-rst.sh --linkcheck
|
|
|
|
|
2013-12-31 17:38:46 +01:00
|
|
|
[testenv:checkniceness]
|
2014-08-13 11:41:26 +02:00
|
|
|
commands =
|
2015-02-06 10:57:34 +01:00
|
|
|
flake8
|
2015-04-21 09:13:18 +02:00
|
|
|
doc8 doc
|
2016-05-02 09:17:58 +02:00
|
|
|
bash -c "find doc -type f -regex '.*\.pot?' -print0|xargs -0 -n 1 msgfmt --check-format -o /dev/null"
|
2016-11-14 16:33:49 +01:00
|
|
|
{toxinidir}/tools/glossary-sort.sh
|
2013-12-31 17:38:46 +01:00
|
|
|
|
|
|
|
[testenv:checkbuild]
|
2014-08-06 10:38:26 +02:00
|
|
|
commands =
|
2015-05-10 08:39:34 +02:00
|
|
|
{toxinidir}/tools/publishdocs.sh build
|
2014-02-04 20:53:52 +01:00
|
|
|
|
2015-02-03 15:36:43 -06:00
|
|
|
[testenv:docs]
|
2015-04-08 16:56:49 +02:00
|
|
|
commands =
|
2015-05-29 14:09:00 +02:00
|
|
|
{toxinidir}/tools/build-all-rst.sh
|
2015-02-03 15:36:43 -06:00
|
|
|
|
2017-02-23 16:58:18 -06:00
|
|
|
[testenv:pdfs]
|
|
|
|
commands =
|
|
|
|
{toxinidir}/tools/build-all-rst.sh --pdf
|
|
|
|
|
2015-06-13 19:09:19 +02:00
|
|
|
[testenv:install-guides]
|
|
|
|
commands =
|
2017-02-23 16:58:18 -06:00
|
|
|
{toxinidir}/tools/build-install-guides-rst.sh {posargs}
|
2015-06-13 19:09:19 +02:00
|
|
|
|
2016-05-14 09:40:46 +09:00
|
|
|
[testenv:install-guide-debconf]
|
|
|
|
commands =
|
2017-02-23 16:58:18 -06:00
|
|
|
{toxinidir}/tools/build-install-guides-rst.sh debconf {posargs}
|
2016-05-14 09:40:46 +09:00
|
|
|
|
2015-09-12 21:39:55 +02:00
|
|
|
[testenv:install-guide-debian]
|
|
|
|
commands =
|
2017-02-23 16:58:18 -06:00
|
|
|
{toxinidir}/tools/build-install-guides-rst.sh debian {posargs}
|
2015-09-12 21:39:55 +02:00
|
|
|
|
|
|
|
[testenv:install-guide-obs]
|
|
|
|
commands =
|
2017-02-23 16:58:18 -06:00
|
|
|
{toxinidir}/tools/build-install-guides-rst.sh obs {posargs}
|
2015-09-12 21:39:55 +02:00
|
|
|
|
|
|
|
[testenv:install-guide-rdo]
|
|
|
|
commands =
|
2017-02-23 16:58:18 -06:00
|
|
|
{toxinidir}/tools/build-install-guides-rst.sh rdo {posargs}
|
2015-09-12 21:39:55 +02:00
|
|
|
|
|
|
|
[testenv:install-guide-ubuntu]
|
|
|
|
commands =
|
2017-02-23 16:58:18 -06:00
|
|
|
{toxinidir}/tools/build-install-guides-rst.sh ubuntu {posargs}
|
2015-09-12 21:39:55 +02:00
|
|
|
|
2015-10-08 19:30:11 +02:00
|
|
|
[testenv:build]
|
|
|
|
commands =
|
|
|
|
{toxinidir}/tools/build-rst.sh \
|
|
|
|
doc/{posargs} \
|
|
|
|
--build build \
|
|
|
|
--target {posargs}
|
|
|
|
|
2014-02-14 16:16:22 +01:00
|
|
|
[testenv:publishdocs]
|
|
|
|
# Prepare all documents (except www subdir) so that they can get
|
|
|
|
# published on docs.openstack.org with just copying publish-docs/*
|
|
|
|
# over.
|
2014-10-30 17:05:54 +01:00
|
|
|
commands =
|
2015-05-10 08:39:34 +02:00
|
|
|
{toxinidir}/tools/publishdocs.sh publish
|
2014-02-04 20:53:52 +01:00
|
|
|
|
2014-05-13 20:26:50 -04:00
|
|
|
[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
|
2014-08-15 20:06:44 +02:00
|
|
|
whitelist_externals = doc-tools-check-languages
|
2015-05-13 22:07:38 +02:00
|
|
|
commands =
|
|
|
|
doc-tools-check-languages doc-tools-check-languages.conf test all
|
2014-05-13 20:26:50 -04:00
|
|
|
|
2014-07-03 22:14:58 +02:00
|
|
|
[testenv:buildlang]
|
|
|
|
# Run as "tox -e buildlang -- $LANG"
|
2014-02-07 17:48:15 +01:00
|
|
|
# Generatedocbook needs xml2po which cannot be installed
|
|
|
|
# in the venv. Since it's installed in the system, let's
|
|
|
|
# use sitepackages.
|
|
|
|
sitepackages=True
|
2014-08-15 20:06:44 +02:00
|
|
|
whitelist_externals = doc-tools-check-languages
|
2015-05-13 22:07:38 +02:00
|
|
|
commands =
|
|
|
|
doc-tools-check-languages doc-tools-check-languages.conf test {posargs}
|
2014-06-30 20:51:52 +02:00
|
|
|
|
|
|
|
[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
|
2014-08-15 20:06:44 +02:00
|
|
|
whitelist_externals = doc-tools-check-languages
|
2015-04-18 19:40:43 +02:00
|
|
|
commands =
|
2015-05-13 22:07:38 +02:00
|
|
|
doc-tools-check-languages doc-tools-check-languages.conf publish all
|
2014-08-30 19:59:51 +02:00
|
|
|
|
2015-03-05 18:25:29 +08:00
|
|
|
[testenv:generatepot-rst]
|
|
|
|
# Generate POT files for translation, needs {posargs} like:
|
2015-05-12 08:43:50 +02:00
|
|
|
# tox -e generatepot-rst -- user-guide
|
2015-10-06 20:11:17 +02:00
|
|
|
commands = {toxinidir}/tools/generatepot-rst.sh openstack-manuals 1 {posargs}
|
2015-03-05 18:25:29 +08:00
|
|
|
|
2016-03-18 11:26:09 +01:00
|
|
|
[testenv:releasenotes]
|
|
|
|
commands =
|
|
|
|
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
|
|
|
|
2017-02-24 13:17:49 +00:00
|
|
|
[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
|
|
|
|
usedevelop = False
|
|
|
|
|
2014-08-30 19:59:51 +02:00
|
|
|
[doc8]
|
|
|
|
# Settings for doc8:
|
2017-02-22 09:30:09 -05:00
|
|
|
# Ignore target directories and autogenerated files
|
|
|
|
ignore-path = doc/*/target,doc/*/build*,doc/install-guide/source/swift-controller-include.txt,doc/install-guide-debconf/source/swift-controller-include.txt,doc/networking-guide/source/shared/*.txt,doc/config-reference/source/tables/*.rst
|
2014-08-30 19:59:51 +02:00
|
|
|
# File extensions to use
|
|
|
|
extensions = .rst,.txt
|
2015-06-12 15:24:12 +02:00
|
|
|
# Maximal line length should be 79 but we have some overlong lines.
|
|
|
|
# Let's not get far more in.
|
2015-06-20 20:20:23 +02:00
|
|
|
max-line-length = 79
|
2015-04-21 09:13:18 +02:00
|
|
|
# Disable some doc8 checks:
|
2015-12-31 00:04:32 -08:00
|
|
|
# D000: Check RST validity (cannot handle the "linenos" directive)
|
2015-06-12 15:24:12 +02:00
|
|
|
ignore = D000
|
2015-02-06 10:57:34 +01:00
|
|
|
|
|
|
|
[flake8]
|
|
|
|
show-source = True
|
|
|
|
builtins = _
|
2016-09-25 13:56:37 +08:00
|
|
|
exclude=.venv,.git,.tox,dist,*lib/python*,*egg,build,*/source/conf.py
|