forked from opcode81/sensAI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
73 lines (68 loc) · 2.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
62
63
64
65
66
67
68
69
70
71
72
73
# tox (https://tox.readthedocs.io/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.to
[tox]
envlist = py, py_latest_dependencies, docs, report
isolated_build = True
[testenv:py]
# 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 -n 4 --cov --cov-append --cov-report=term-missing tests
pytest -n 4 notebooks
deps =
pytest
pytest-cov
pytest-xdist
jupyter==1.0.0
nbconvert==6.1.0
clearml==0.17.1
; TODO: For some reason including this into setup.py makes things slow locally, fail silently on gitlab
; and lead to non-ending builds (2.5h+) on github. This dependency should be installable with pip install sensai[torch] though...
pytorch-lightning~=1.1.0
-rrequirements.txt
extras =
full
# TODO or not TODO: notebooks are not executed here again (the build would become very slow) so they are not tested with
# latest dependencies. Hopefully, this is not a problem
[testenv:py_latest_dependencies]
commands =
pytest
deps =
pytest
; TODO: For some reason including this into setup.py makes things slow locally, fail silently on gitlab
; and lead to non-ending builds (2.5h+) on github. This dependency should be installable with pip install sensai[torch] though...
pytorch-lightning>=1.1
extras =
full
[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~=4.1
sphinxcontrib-websupport==1.2.4
sphinx_rtd_theme
nbsphinx
ipython
ipywidgets
whitelist_externals =
git
[testenv:report]
skip_install = true
commands =
coverage html
coverage-badge -o badges/coverage.svg -f
coverage erase
deps =
coverage
coverage-badge