generated from italia/docs-italia-template
-
Notifications
You must be signed in to change notification settings - Fork 4
/
tox.ini
61 lines (48 loc) · 1.6 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
[tox]
env = py27,py36
skipsdist = True
[testenv]
deps =
-rrequirements.txt
commands =
doc8 --ignore D001,D002,D003,D004 docs
[testenv:py36-build]
commands =
doc8 --ignore D001,D002,D003,D004 docs
sphinx-build -b html . _build/
[testenv:build]
commands =
doc8 --ignore D001,D002,D003,D004 docs
sphinx-build -b html . _build/
[testenv:build-single]
commands =
doc8 --ignore D001,D002,D003,D004 docs
sphinx-build -b singlehtml . _build_single/
# Replace special characters in docs.
[testenv:refactor]
deps =
whitelist_externals =
find
commands =
find docs -name *.rst -exec sed -i 's/[“”]/"/g; ' \{\} ;
find docs -name *.rst -exec sed -i 's,HTTP header \([a-zA-Z\-]\+\),:httpheader:`\1`,g' \{\} ;
find docs -name *.rst -exec sed -i 's,HTTP method \([a-zA-Z\-]\+\),:httpmethod:`\1`,g' \{\} ;
find docs -name *.rst -exec sed -i 's,HTTP status \([0-9][0-9][0-9]\) \(ok\|not found\|internal server error\|unauthorized\|accepted\|bad request\),:httpstatus:`\1`,gi' \{\} ;
find docs -name *.rst -exec sed -i 's/RFC \([0-9]\+\)/:rfc:`\1`/g' \{\} ;
find docs -name *.rst -exec sed -i 's/\*\*\[:rfc:`\([0-9]\+\)`\]\*\*/ [RFC\1] /g' \{\} ;
[testenv:latex]
commands =
doc8 --ignore D001,D002,D003,D004 docs
sphinx-build -b latex -D language=it -d _latex/doctrees . _latex/
[testenv:latex-full]
commands =
tox -e latex
bash -c 'cd _latex && make all-pdf'
[flake8]
# allow urls: long lines are managed by black.
max-line-length = 160
ignore =
# Allow module level import not at top of file (for monkeypatch, logging)
E402,
# Line break before a binary operator (for black)
W503