-
Notifications
You must be signed in to change notification settings - Fork 8
/
tox.ini
57 lines (48 loc) · 1.45 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
# 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.
[tox]
envlist = py{3.7,3.8}
isolated_build = True
[tox:.package]
# note tox will use the same python version as under what tox is installed to package
# so unless this is python 3 you can require a given python version for the packaging
# environment via the basepython key
basepython = python3
[testenv]
deps =
numpy
scipy
pandas
matplotlib
commands =
python -m unittest discover
[testenv:py3.7]
basepython = python3.7
commands = {[testenv]commands}
[testenv:py3.8]
basepython = python3.8
commands = {[testenv]commands}
[testenv:coverage]
basepython = python3.8
deps =
coverage
commands =
python -m coverage run -m unittest discover
python -m coverage html -d {toxworkdir}/htmlcov
python -m coverage report
[testenv:docs]
description = build html docs
deps =
-r docs/requirements.txt
basepython = python3.8
commands =
sphinx-build -d "{toxworkdir}/docs_doctree" docs/source "{toxworkdir}/docs_out/html" -bhtml
[testenv:docs-deploy]
decription = deploy docs to gitlab pages
deps = {[testenv:docs]deps}
basepython = python3.8
commands =
sphinx-build -d "{toxworkdir}/docs_doctree" docs/source "{toxworkdir}/docs_out/html" -bhtml
python -c 'import shutil; shutil.move(r"{toxworkdir}/docs_out/html", "public")'