-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathtox.ini
115 lines (104 loc) · 2.65 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
110
111
112
113
114
[testenv:bootstrap]
deps =
jinja2
matrix
tox
skip_install = true
commands =
python ci/bootstrap.py
passenv =
*
; a generative tox configuration, see: https://tox.readthedocs.io/en/latest/config.html#generative-envlist
[tox]
envlist =
clean,
check,
docs,
{py36,py37},
report
ignore_basepython_conflict = true
[gh-actions]
python =
3.6: clean,check,docs,py36,report,coveralls
3.7: clean,check,docs,py37,report
[testenv]
; workaround to install PyTorch CPU version which is not available in PyPi
; GPU version is too large and doesn't work on machines without CUDA devices
install_command = pip install -f https://download.pytorch.org/whl/torch_stable.html {opts} {packages}
basepython =
py36: {env:TOXPYTHON:python3.6}
py37: {env:TOXPYTHON:python3.7}
{bootstrap,clean,check,docs,report,codecov,coveralls}: {env:TOXPYTHON:python3}
setenv =
PYTHONPATH={toxinidir}/tests{:}{toxinidir}/tests_requirements
PYTHONUNBUFFERED=yes
passenv =
*
usedevelop = false
deps =
pytest==5.2.2
pytest-cov
coverage==4.5.4
; coveralls 5.x is buggy for now
commands =
pytest --cov --cov-report= --cov-append --disable-warnings -m "not docker and not tf_v1" tests
pytest --cov --cov-report= --cov-append --disable-warnings tests_requirements
pytest --cov --cov-report= --cov-append --disable-warnings -m docker tests
pip uninstall -y tensorflow
pip install "tensorflow<2"
pytest --cov --cov-report= --cov-append --disable-warnings -m tf_v1 tests
extras =
testing
[testenv:check]
deps =
docutils
check-manifest
flake8
readme-renderer
pygments
isort<5.0.0
skip_install = true
commands =
python setup.py check --strict --metadata --restructuredtext
check-manifest {toxinidir}
flake8 src tests tests_requirements setup.py examples
isort --check-only --diff --recursive src tests tests_requirements setup.py examples
[testenv:docs]
usedevelop = true
whitelist_externals = rm
deps =
-r{toxinidir}/docs/requirements.txt
commands =
rm -rf docs/reference
sphinx-build {posargs:-E} -b doctest docs dist/docs
sphinx-build {posargs:-E} -b html docs dist/docs
; sphinx-build -b linkcheck docs dist/docs
[testenv:coveralls]
passenv =
COVERALLS_REPO_TOKEN
CI_BRANCH
deps =
coveralls
coverage==4.5.4
; coveralls 5.x is buggy for now
skip_install = true
commands =
coveralls
[testenv:codecov]
passenv =
GITHUB_*
CODECOV_TOKEN
deps =
codecov
skip_install = true
commands =
codecov []
[testenv:report]
skip_install = true
commands =
coverage report
coverage html
[testenv:clean]
commands =
coverage erase
skip_install = true