-
Notifications
You must be signed in to change notification settings - Fork 77
/
tox.ini
76 lines (69 loc) · 1.87 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
[tox]
minversion = 3.1
envlist = py39,pep8
skipsdist = True
ignore_basepython_conflict = True
[testenv]
usedevelop = True
install_command = pip install {opts} {packages}
deps =
-r{toxinidir}/requirements.txt
commands = stestr run {posargs}
stestr slowest
[testenv:pep8]
commands =
doc8 doc/source README.rst
[testenv:venv]
deps =
-r{toxinidir}/requirements.txt
commands = {posargs}
# This env is invoked in the periodic pipeline and is therefore responsible to
# build all relevant docs at once.
[testenv:docs]
deps = -r{toxinidir}/docs/requirements.txt
allowlist_externals =
rm
sphinx-build
bash
sed
commands =
rm -rf docs/data-sources/index.md
rm -rf docs/resources/index.md
bash scripts/sphinx-helpers.sh
rm -rf docs/build/html docs/build/doctrees
sphinx-build --keep-going -b html docs/ doc/build/html/
[testenv:docs-pdf]
deps = -r{toxinidir}/docs/requirements.txt
allowlist_externals =
rm
mkdir
make
bash
cp
commands =
rm -rf docs/build/pdf
rm -rf docs/data-sources/index.md
rm -rf docs/resources/index.md
bash scripts/sphinx-helpers.sh
sphinx-build --keep-going -b latex docs/ doc/build/pdf/
bash -c "for f in docs/build/pdf/*.gif; do convert $f $\{f/%gif/png\}; done || true"
bash -c "for f in docs/build/pdf/*.tex; do sed -iorig 's/\.gif//g' $f; done"
make -C docs/build/pdf
# Json version (for search)
[testenv:docs-json]
deps = -r{toxinidir}/docs/requirements.txt
allowlist_externals =
sh
bash
rm
commands =
rm -rf docs/data-sources/index.md
rm -rf docs/resources/index.md
bash scripts/sphinx-helpers.sh
sphinx-build --keep-going -b json docs/ doc/build/json/
# Drop data useless for the search - wrap it also with sh/xargs due to bugs
# in tox
sh -c "find docs/build/json -type d -and '(' -name '_images' -or -name '_static' -or -name '_sources' ')' -print0 | xargs -0 rm -rf"
[doc8]
ignore = D001
extensions = .rst, .yaml