-
Notifications
You must be signed in to change notification settings - Fork 25
/
tox.ini
112 lines (102 loc) · 3.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
[tox]
minversion = 3.15.0
toxworkdir = {env:TOX_WORKDIR:{toxinidir}/.tox}
envlist = py{36,37,38},py{36,37,38}-{min}
[testenv]
platform = linux: linux
mac: darwin
win: win32
skip-missing-interpreter = True
usedevelop = {env:TOX_USEDEVELOP:True}
setenv =
!win: PIP_FIND_LINKS = {env:PIP_FIND_LINKS:} {env:PIP_FIND_LINKS_TORCH:}
win: PIP_FIND_LINKS = {env:PIP_FIND_LINKS:} {env:PIP_FIND_LINKS_TORCH:https://download.pytorch.org/whl/torch_stable.html}
MPLBACKEND = Agg
# Set `recreate` as True to recreate the virtualenvs if needed
recreate = False
extras =
unittests
!nopytorch: pytorch
!nofoolbox: foolbox
deps =
{min,n17}: numpy~=1.17.0
{min,scy3}: scipy~=1.3.2.0
{min,sk22}: scikit-learn~=0.22.0
!py38-{min}: matplotlib~=3.0.0
py38-{min}: matplotlib~=3.2.0
{min}-!nopytorch: torchvision~=0.5.0
{min,torch14}-!nopytorch: torch~=1.4.0
{min}-!nofoolbox: torch~=1.4.0
{min}-!nofoolbox: foolbox~=3.3.0
!{min,tf114}: tensorflow~=1.14.0
!py38-gpu
commands_pre =
python -V
pip freeze
commands =
py.test src/secml --cov=src/secml --junitxml=pytest-report.xml {posargs}
[testenv:min]
description = env with minimum versions of dependencies and extras
[testenv:latest]
description = env with latest versions of dependencies
[testenv:latest-gpu]
description = env with latest versions of dependencies and extra gpu support
# Test notebooks
[testenv:latest-notebooks]
description = env with latest versions of dependencies for testing notebooks
commands =
py.test src/secml/test_simple.py --nbval tutorials {posargs}
deps =
git+https://github.com/RobustBench/robustbench.git@v0.1
# Documentation
[testenv:docs]
description = invoke sphinx-build to build the HTML docs
usedevelop = {env:TOX_USEDEVELOP:True}
recreate = False
deps = -rdocs/requirements.txt
extras =
passenv = SECML_ISRELEASE
commands =
; rm -r docs/build
; sphinx-apidoc -M -o docs/source/ src/secml/ '_*' "*tests" # Build addition sources
sphinx-build -E -W --keep-going -c docs/source/ -b html docs/source/ docs/build/html
# Release tooling
[testenv:build]
skip_install = true
recreate = False
deps =
setuptools
twine
passenv = SECML_ISRELEASE
commands =
python setup.py clean --all
python setup.py -q bdist_wheel --universal
python setup.py -q sdist --formats=zip
# PYTEST CONFIG
[pytest]
filterwarnings =
once:check\_pickle is deprecated in joblib 0\.12 and will be removed in 0\.13:DeprecationWarning
ignore:numpy.dtype size changed*:RuntimeWarning
ignore:numpy.ufunc size changed*:RuntimeWarning
ignore:More than.*figures have been opened*:RuntimeWarning
ignore:Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated*:DeprecationWarning
ignore:Passing (type, 1)*:FutureWarning
ignore:the imp module is deprecated in favour of importlib*:PendingDeprecationWarning
ignore:the imp module is deprecated in favour of importlib*:DeprecationWarning
ignore:KernelManager._kernel_spec_manager_changed is deprecated*:DeprecationWarning
ignore:Matplotlib is building the font cache*:UserWarning
ignore:Report.file_reporters will no longer be available*:DeprecationWarning
ignore:This package is experimental and could change*:UserWarning
ignore:Matplotlib is currently using agg*:UserWarning
ignore:tostring\(\) is deprecated\. Use tobytes\(\) instead\.:DeprecationWarning
ignore:The given NumPy array is not writeable:UserWarning:torchvision.datasets.mnist
ignore:CUDA initialization:UserWarning
# PYTEST-COV CONFIG
[coverage:run]
branch = True
omit =
*/tests/*
*/test_*
*/testing/*
[coverage:report]
show_missing = True