-
Notifications
You must be signed in to change notification settings - Fork 255
/
tox.ini
102 lines (87 loc) · 2.69 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
[tox]
minversion = 2.0
envlist = linters,publishdocs
skipsdist = True
[testenv]
setenv =
VIRTUAL_ENV={envdir}
deps = -r{toxinidir}/test-requirements.txt
passenv = ZUUL_*
allowlist_externals =
bash
cp
mkdir
rm
rsync
[testenv:venv]
commands = {posargs}
[testenv:linkcheck]
commands =
{toxinidir}/tools/build-all-rst.sh --linkcheck
[testenv:linters]
commands =
flake8
doc8 doc
bash {toxinidir}/tools/glossary-sort.sh
[testenv:docs]
commands =
bash {toxinidir}/tools/build-all-rst.sh
[testenv:pdfs]
commands =
bash {toxinidir}/tools/build-all-rst.sh --pdf
[testenv:build]
commands =
bash {toxinidir}/tools/build-rst.sh \
doc/{posargs} \
--build build \
--target {posargs}
[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 =
bash {toxinidir}/tools/publishdocs.sh
whereto publish-docs/html/.htaccess publish-docs/html/redirect-tests.txt
rm publish-docs/html/redirect-tests.txt
[testenv:buildlang]
# Run as "tox -e buildlang -- $LANG"
allowlist_externals = doc-tools-check-languages
commands =
doc-tools-check-languages doc-tools-check-languages.conf test {posargs}
[testenv:publishlang]
allowlist_externals = doc-tools-check-languages
commands =
doc-tools-check-languages doc-tools-check-languages.conf publish all
[testenv:generatepot-rst]
# Generate POT files for translation, needs {posargs} like:
# tox -e generatepot-rst -- user-guide
commands = bash {toxinidir}/tools/generatepot-rst.sh openstack-manuals 1 {posargs}
[testenv:releasenotes]
commands =
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[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
[doc8]
# Settings for doc8:
# Ignore target directories and autogenerated files
ignore-path = doc/*/target,doc/*/build*
# File extensions to use
extensions = .rst,.txt
# Maximal line length should be 79 but we have some overlong lines.
# Let's not get far more in.
max-line-length = 79
# Disable some doc8 checks:
# D000: Check RST validity (cannot handle the "linenos" directive)
ignore = D000
[flake8]
show-source = True
builtins = _
exclude=.venv,.git,.tox,dist,*lib/python*,*egg,build,*/source/conf.py