forked from jupyter-book/jupyter-book
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
88 lines (75 loc) · 2.36 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
# To use tox, see https://tox.readthedocs.io
# Simply pip or conda install tox
# If you use conda, you may also want to install tox-conda
# then run `tox` or `tox -- {pytest args}`
# To run in parallel using `tox -p` (this does not appear to work for this repo)
# To rebuild the tox environment, for example when dependencies change, use
# `tox -r`
# Note: if the following error is encountered: `ImportError while loading conftest`
# then then deleting compiled files has been found to fix it: `find . -name \*.pyc -delete`
[tox]
envlist = py39-sphinx4
[testenv]
usedevelop = true
passenv=TERM
[testenv:py{37,38,39}-sphinx{4,5}]
extras = testing
deps =
sphinx4: sphinx>=4,<5
sphinx5: sphinx<=5,<6
commands = pytest {posargs}
[testenv:cli]
commands = jupyter-book {posargs}
[testenv:docs-{update,clean}]
extras = sphinx
commands =
clean: jupyter-book clean --all docs/
jupyter-book build -W -n --keep-going --builder html {posargs:docs/}
[testenv:docs-live]
extras = sphinx
deps =
sphinx-autobuild
commands =
sphinx-autobuild \
--re-ignore _build/.* \
--re-ignore docs/conf.py \
--watch jupyter_book \
--port 0 --open-browser \
--pre-build "jupyter-book config sphinx docs" \
-n -b {posargs:html} docs/ docs/_build/{posargs:html}
[testenv:docs-pdfhtml-{update,clean}]
extras =
sphinx
pdfhtml
commands =
clean: jupyter-book clean --all docs/
jupyter-book build -W -n --keep-going --builder pdfhtml {posargs:docs/}
[testenv:docs-pdflatex-{update,clean}]
extras =
sphinx
pdflatex
commands =
clean: jupyter-book clean --all docs/
jupyter-book build -W -n --keep-going --builder pdflatex {posargs:docs/}
[testenv:sphinx-{update,clean}]
extras = sphinx
whitelist_externals =
echo
rm
commands =
jupyter-book config sphinx docs/
clean: rm -rf docs/_build
sphinx-build -nW --keep-going -b {posargs:html} docs/ docs/_build/{posargs:html}
commands_post = echo "open docs/_build/html/index.html"
[pytest]
timeout = 100
markers =
requires_tex: mark a test which requires a TeX installation.
requires_chrome: mark a test which requires a chrome/chromium browser
filterwarnings =
ignore::DeprecationWarning:pyee.*
ignore::DeprecationWarning:pybtex.*
# Use tox.ini for flake8 config because it does not yet support pyproject.toml
[flake8]
max-line-length = 100
extend-ignore = E203