-
Notifications
You must be signed in to change notification settings - Fork 1
/
tox.ini
51 lines (47 loc) · 1.53 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
[tox]
envlist = py, docs, report
isolated_build = True
[testenv]
# pytest-cov has an issue when the tests are inside an sdist, as created by tox by default
# despite tests being run, coverage discovers no data, leading to: Coverage.py warning: No data was collected
# this issue is resolved by running pytest-cov within tox development mode, thus not creating an sdist
usedevelop = true
commands =
coverage erase
pytest --cov --cov-append --cov-report=term-missing tests
pytest -n 4 notebooks
deps =
pytest
pytest-cov
pytest-xdist
pytest-lazy-fixture
jupyter==1.0.0
nbconvert==6.4.5
-rrequirements.txt
[testenv:docs]
; NOTE: we don't use pytest for running the doctest, even though with pytest no imports have to be written in them
; The reason is that we want to be running doctest during the docs build (which might happen on a remote machine,
; like read_the_docs does) with possibly fewer external dependencies and use sphinx' ability to automock the missing ones.
commands =
python build_scripts/update_docs.py
git add docs/*
sphinx-build -W -b html -d "{envtmpdir}/doctrees" docs "docs/_build/html"
sphinx-build -b doctest -d "{envtmpdir}/doctrees" docs "docs/_build/doctest"
deps =
Sphinx==3.2.1
sphinxcontrib-websupport==1.2.4
jinja2<3.1
sphinx_rtd_theme
nbsphinx
ipython
whitelist_externals =
git
[testenv:report]
commands =
coverage html
coverage-badge -o badges/coverage.svg -f
coverage erase
deps =
coverage
coverage-badge
skip_install = true