generated from microsoft/python-package-template
-
Notifications
You must be signed in to change notification settings - Fork 7
/
tox.ini
129 lines (114 loc) · 2.37 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
[tox]
envlist = py37-{black,mypy,flake8,bandit,pylint,unit,integration}
[testenv]
deps =
-rrequirements.txt
-rrequirements.test.txt
depends =
py37-{mypy,flake8,bandit,pylint,unit,integration}: py37-black
[testenv:py37-black]
skip_install = true
deps = black
commands = black \
--config "black.toml" \
"azureiai" \
"tests"
[testenv:py37-mypy]
skip_install = true
deps = mypy
commands =
mypy \
--config-file "tox.ini" \
"azureiai"
[testenv:py37-flake8]
skip_install = true
deps = flake8
commands =
flake8 \
--config "tox.ini" \
"azureiai"
[testenv:py37-bandit]
skip_install = true
deps = bandit
commands = bandit -r --ini "tox.ini"
[testenv:py37-pylint]
deps =
pylint
pylint-junit
commands =
pylint \
--enable=locally-disabled \
--rcfile ".pylintrc" \
"azureiai"
[testenv:py37-safety]
skip_install = true
deps = safety
commands = safety check --full-report
[testenv:py37-unit]
deps =
pytest
coverage
pytest-cov
pytest-github-actions-annotate-failures
commands =
python3 -m pip install .
coverage erase
python3 -m pytest \
-c "tox.ini" \
-m "not integration and not gpu" \
--cov-append \
--cov-config ".coveragerc" \
--cov azureiai \
"tests"
coverage \
report \
--fail-under 100 \
--include "azureiai/*" \
--omit "azureiai/__init__.py"
[testenv:py37-integration]
deps =
pytest
pytest-parallel
commands =
python -m pytest \
-c "tox.ini" \
-m "integration" \
"tests"
[bandit]
exclude = build,dist,tests,scripts
number: 4
recursive: True
skips = B110,B311,B314,B404,B405,B406
targets = azureiai
[flake8]
max-line-length = 120
select = F,E,W,B,B901,B902,B903
exclude =
.eggs,
.git,
.tox,
nssm,
obj,
out,
packages,
pywin32,
tests,
swagger_client
ignore = E722,B001,W503,E203
[pytest]
junit_family = xunit2
markers =
integration: marks as integration test
notebooks: marks as notebook test
gpu: marks as gpu test
smoke: marks as smoke test
spark: marks tests which need Spark
cdm: marks tests which need cdm
slow: marks tests as slow
unit: fast offline tests
[mypy]
python_version = 3.7
ignore_missing_imports = True
strict_optional = False
follow_imports = silent
no_site_packages = True