forked from usnistgov/dioptra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
121 lines (108 loc) · 3.47 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
# This Software (Dioptra) is being made available as a public service by the
# National Institute of Standards and Technology (NIST), an Agency of the United
# States Department of Commerce. This software was developed in part by employees of
# NIST and in part by NIST contractors. Copyright in portions of this software that
# were developed by NIST contractors has been licensed or assigned to NIST. Pursuant
# to Title 17 United States Code Section 105, works of NIST employees are not
# subject to copyright protection in the United States. However, NIST may hold
# international copyright in software created by its employees and domestic
# copyright (or licensing rights) in portions of software that were assigned or
# licensed to NIST. To the extent that NIST holds copyright in this software, it is
# being made available under the Creative Commons Attribution 4.0 International
# license (CC BY 4.0). The disclaimers of the CC BY 4.0 license apply to all parts
# of the software developed or licensed by NIST.
#
# ACCESS THE FULL CC BY 4.0 LICENSE HERE:
# https://creativecommons.org/licenses/by/4.0/legalcode
[tox]
envlist = clean,pytest,black,isort,flake8,mypy,gitlint
isolated_build = True
skip_missing_interpreters = True
distshare = {toxinidir}/dist
[testenv]
extras = sdk
recreate = false
[testenv:pytest]
deps =
coverage
freezegun
pytest>=6
pytest-cov
pytest-datadir
skip_install = false
commands = python -m pytest --cov=mitre.securingai.pyplugs --cov=mitre.securingai.restapi --cov=mitre.securingai.rq --cov-append --cov-report=term-missing --cov-report=html:coverage --import-mode=importlib {posargs} {toxinidir}/tests
[testenv:black]
deps =
black>=20.8b1
skip_install = true
commands = black --config {toxinidir}/pyproject.toml --check --diff {toxinidir}/src/mitre/securingai {toxinidir}/task-plugins/securingai_builtins
[testenv:isort]
deps =
isort>=5.6.0
skip_install = true
commands = isort {toxinidir}/src/mitre/securingai {toxinidir}/task-plugins/securingai_builtins -c -v
[testenv:flake8]
deps =
flake8>=3.8.0
flake8-bugbear
mccabe
pycodestyle
pyflakes
skip_install = true
commands = flake8 {toxinidir}/src/mitre/securingai {toxinidir}/task-plugins/securingai_builtins
[testenv:mypy]
deps =
Click>=7.1.0,<8
marshmallow>=3.9.0,<4
mypy>=0.900
mypy_extensions
prefect==0.14.*
python-dateutil>=2.8.0
sqlalchemy-stubs
structlog>=20.2.0
types-click
types-cryptography
types-enum34
types-Flask
types-freezegun
types-ipaddress
types-Jinja2
types-python-dateutil
types-redis
types-Werkzeug
typing-extensions
skip_install = true
commands = mypy {toxinidir}/src/mitre/securingai {toxinidir}/task-plugins/securingai_builtins
[testenv:gitlint]
deps =
gitlint
skip_install = true
commands = gitlint
[testenv:clean]
deps =
coverage
skip_install = true
commands = coverage erase
[pytest]
addopts = -ra
testpaths = tests
log_cli = False
log_cli_level = INFO
markers =
info: marks tests as info (deselect with '-m "not info"')
[coverage:run]
omit =
restapi/config.py
restapi/models.py
# omit __init__.py files since they are just for mypy and pytest purposes
*/__init__.py
[coverage:report]
exclude_lines =
# Have to re-enable the standard pragma
pragma: no cover
# Don't complain about missing debug-only and type checking-only code:
def __repr__
if TYPE_CHECKING:
# Don't complain if non-runnable code isn't run:
\.\.\.
if __name__ == .__main__.: