-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathtox.ini
109 lines (96 loc) · 2.62 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
[tox]
envlist =
clean,
docs,
py{36,37,38}-cov{yes,no}-ml{yes,no},
report,
mypy
# -------------- dependency setup ---------------
[gh-actions]
python =
3.6: py36
3.7: py37
3.8: py38
[gh-actions:env]
TESTCOVER =
yes: covyes
no: covno
TESTML =
yes: mlyes
no: mlno
[base]
deps =
Cython
py{36,37,38}: pytest
pytest-xdist
py{36,37,38}-mlno: hypothesis[numpy]
pretend
py{36,37,38}-covyes: pytest-cov
py{36,37,38}-cov{yes,no}-mlyes,docs: tensorflow-cpu == 2.2.0
py{36,37,38}-cov{yes,no}-mlyes,docs: torch == 1.4.0+cpu ; sys_platform != 'darwin'
py{36,37,38}-cov{yes,no}-mlyes,docs: torch == 1.4.0 ; sys_platform == 'darwin'
[testenv]
deps =
{[base]deps}
usedevelop =
covyes,docs: true
covno: false
ignore_basepython_conflict = true
setenv =
PYTHONPATH={toxinidir}/tests
passenv =
*
install_command =
pip install {packages} -f https://download.pytorch.org/whl/torch_stable.html
commands =
py{36,37,38}-covno-mlno: pytest --ignore {env:PYTHONPATH}/ml_datasets -n={env:PYTEST_XDIST_PROC_NR:4} {posargs}
py{36,37,38}-covyes-mlno: pytest --ignore {env:PYTHONPATH}/ml_datasets --cov --cov-append --cov-report term -n={env:PYTEST_XDIST_PROC_NR:4} {posargs}
py{36,37,38}-covno-mlyes: pytest -n={env:PYTEST_XDIST_PROC_NR:4} {posargs} {env:PYTHONPATH}/ml_datasets
py{36,37,38}-covyes-mlyes: pytest --cov --cov-append --cov-report term -n={env:PYTEST_XDIST_PROC_NR:4} {posargs} {env:PYTHONPATH}/ml_datasets
# ---------------- checkers ------------------------
[testenv:spell]
setenv =
SPELLCHECK=1
commands =
sphinx-build -b spelling docs dist/docs
skip_install = true
deps =
-r{toxinidir}/docs/requirements.txt
sphinxcontrib-spelling
pyenchant
[testenv:docs]
usedevelop = true
deps =
{[base]deps}
-r{toxinidir}/docs/requirements.txt
commands =
sphinx-build {posargs:-E} -b html docs dist/docs
sphinx-build -b linkcheck docs dist/docs -j {env:GH_ACTIONS_PROC_NR:8}
install_command =
pip install {packages} -f https://download.pytorch.org/whl/torch_stable.html
[testenv:report]
deps =
coverage
skip_install = true
commands =
coverage report
coverage html
[testenv:clean]
skip_install = true
deps =
coverage
commands =
coverage erase
# ------------------- mypy ----------------------
[testenv:mypy]
basepython = {env:TOXPYTHON:python3.8}
skip_install = False
commands =
{posargs:mypy --config-file mypy.ini src/hangar}
deps =
{[base]deps}
mypy >= 0.701
mypy-protobuf
grpcio_tools
install_command =
pip install {packages} -f https://download.pytorch.org/whl/torch_stable.html