forked from twosixlabs/armory
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
236 lines (204 loc) · 5.76 KB
/
pyproject.toml
File metadata and controls
236 lines (204 loc) · 5.76 KB
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
[build-system]
build-backend = "hatchling.build"
requires = [
"hatchling>=1.10.0",
"hatch-vcs",
]
[project]
requires-python = ">=3.8"
name = "armory-testbed"
description = "Adversarial Robustness Test Bed"
readme = "README.md"
dynamic = [ "version" ]
license = "MIT"
authors = [
{ name = "Two Six Technologies", email = "armory@twosixtech.com" },
]
classifiers = [
"Development Status :: 3 - Alpha",
"License :: OSI Approved :: MIT License",
"Environment :: Console",
"Natural Language :: English",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
]
dependencies = [
"setuptools_scm",
"docker",
"jsonschema",
"loguru",
"pytest",
"PyYAML",
"requests",
"toml",
]
[project.urls]
Source = "https://github.com/twosixlabs/armory"
Documentation = "https://armory.readthedocs.io/en/latest/"
[project.scripts]
armory = "armory.__main__:main"
# please see docs/getting_started.md#the-armory-flavors for how these
# optional dependencies work
[project.optional-dependencies]
developer =[
"hatch", # build tool
"wheel", # build tool
"mkdocs",
"black[jupyter]==22.*",
"isort",
"flake8",
"bandit[toml]", # code scanning
"hydra-core", # configuration
]
engine = [
"adversarial-robustness-toolbox == 1.14.1",
"Pillow", # Data dependencies
"boto3", # Needed for armory.data.utils
"botocore" , # Needed for armory.data.utils
"ffmpeg-python", # Needed for armory.utils.export
"pydub", # this is in ART's extra-requires
"tidecv", # Needed for TIDE metrics
# Both `opencv-python` and `opencv-python-headless` must specify
# the same version.
"opencv-python == 4.5.5.62", # Needed for CARLA baseline scenario
"opencv-python-headless == 4.5.5.62", # Needed for CARLA baseline scenario
"tensorboardx",
]
pytorch = [
"armory-testbed[engine,datasets,math]",
"torch",
"torchaudio",
"torchvision",
]
tensorflow = [
"armory-testbed[engine,datasets,math]",
"tf-models-official",
"tensorflow >= 2.10.0",
]
deepspeech = [
"armory-testbed[pytorch,engine,datasets,math]",
"python-levenshtein",
"torchmetrics < 0.8.0",
"sox",
"librosa",
"google-cloud-storage",
"transformers",
"pytorch-lightning < 1.5.0",
]
math = [
"numpy",
"pandas",
"scipy >= 1.4.1",
"scikit-learn < 1.1.0", # ART requires scikit-learn >=0.22.2,<1.1.0
"matplotlib",
]
datasets = [
"armory-testbed[tensorflow]",
"tensorflow-datasets >= 4.6.0, != 4.9.0",
"protobuf",
]
datasets-builder = [
"armory-testbed[datasets,engine]",
"apache-beam >= 2.22.0",
]
jupyter = [
"jupyterlab",
"jupyterlab_widgets",
"ipywidgets",
]
yolo = [
"armory-testbed[engine]",
"armory-testbed[tensorflow]",
"numpy == 1.23.4",
"pytorchyolo",
]
all = [
"armory-testbed[developer]",
"armory-testbed[engine]",
"armory-testbed[math]",
"armory-testbed[jupyter]",
"armory-testbed[datasets]",
"armory-testbed[pytorch]",
"armory-testbed[tensorflow]",
]
[tool.hatch.build]
ignore-vcs = false
reproducible = true
directory = "dist"
include = [
"armory/",
"tests/",
"scenario_configs/",
"pyproject.toml",
]
exclude = [
"tools/",
]
[tool.hatch.build.hooks.vcs]
version-file = "armory/__about__.py"
template = """
# coding: utf-8
# File automatically generated by setuptools_scm.
# Do not change or track in version control.
__version__ = {version!r}
version_tuple = {version_tuple!r}
"""
[tool.hatch.metadata]
allow-direct-references = true
[tool.hatch.version]
source = "vcs"
path = "armory/__about__.py"
[tool.hatch.version.raw-options]
version_scheme = "post-release"
# Tools
[tool.setuptools_scm]
# the presence of this empty block stops setuptools_scm from complaining
[tool.bandit]
recursive = true
targets = [ "armory" ]
skips = [
"B101", # Ignore defensive `assert`s (especially useful for mypy)
"B404", # Ignore warnings about importing subprocess
"B603", # Ignore warnings about calling subprocess.Popen without shell=True
"B607", # Ignore warnings about calling subprocess.Popen without a full path to executable
]
[tool.pytest.ini_options]
addopts = "-ra -q"
log_level = "ERROR"
testpaths = [ "tests" ]
log_cli = true
filterwarnings = [ ]
markers = [
"slow", # This test is slow
"online", # This test needs open internet access
"keras", # This test requires tf1.compat support for keras
"tf1", # This test requires tf1 support (tf2.compat.v1 adapter)
"docker_required", # This Test Requires Docker to run
"end_to_end", # Full End to End Test (typically slow)
"unit", # These are Unit Tests (fast and lightweight)
"pytorch_deepspeech", # This test requires pytorch-deepspeech docker container (or equivalent dependencies) to run
]
# TODO: Add these to the pytest options. From armory/validation/test_config
# addopts = -p no:cacheprovider
# filterwarnings =
# ignore::DeprecationWarning
# ignore::RuntimeWarning
# ignore::UserWarning:tensorflow*
# ignore::UserWarning:torch*
# ignore::Warning:art*
# ------------ pre-commit hooks ------------
[tool.vulture]
paths = ["src"]
ignore_decorators = ["#~vulture.ignore~#"]
min_confidence = 80
make_whitelist = true
sort_by_size = true
verbose = true
[tool.isort]
profile = "black"
force_sort_within_sections = true