-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
278 lines (248 loc) · 7.4 KB
/
pyproject.toml
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
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
# vscode-python-2020.7.0 automatically loads if this file is present.
# https://github.com/microsoft/vscode-python/blob/master/CHANGELOG.md#enhancements-1
[tool.poetry]
name = "pymdma"
version = "0.1.7"
description = "Multimodal Data Metrics for Auditing real and synthetic data"
authors = ["Fraunhofer AICOS <no-reply@aicos.fraunhofer.pt>"]
maintainers = [
"Ivo Façoco <ivo.facoco@aicos.fraunhofer.pt>",
"Joana Rebelo <joana.rebelo@aicos.fraunhofer.pt>",
"Pedro Matias <pedro.matias@aicos.fraunhofer.pt>",
"Marília Barandas <marilia.barandas@aicos.fraunhofer.pt>",
]
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
"Operating System :: OS Independent",
"Development Status :: 5 - Production/Stable",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Scientific/Engineering :: Information Analysis",
]
readme = "README.md"
license = "LGPL-3.0-or-later"
package-mode = true
documentation = "https://pymdma.readthedocs.io/en/latest/"
repository = "https://github.com/fraunhoferportugal/pymdma"
packages = [
{ include = "pymdma", from = "src"}
]
exclude = ["tests/*", "notebooks/*", "docs/*", "src/**/main.py",
"src/**/version.py", "src/**/api/*", "__pycache__/*", "src/**/old", "src/**/experiments",
"src/**/text/*" # exclude text (for now)
]
[tool.poetry.dependencies]
python = ">=3.9, <3.13"
loguru = {version = ">=0.7.2, <0.8.0"}
matplotlib = {version = ">=3.4.3, <4.0.0"}
numpy = {version = ">=1.22.0, <2.5.0"}
piq = {version = ">=0.8.0, <1.0.0"}
pot = {version = ">=0.9.4, <0.10.0"}
pydantic = {version = ">=2.8.2, <3.0.0"}
python-dotenv = {version = ">=1.0.0, <2.0.0"}
torch = {version = ">=2.1.0, <2.9.0"}
scikit-learn = {version = ">1.4.0"}
# Image dependencies
torchvision = {version = ">=0.15.2, <0.26.0", optional = true}
pycocotools = {version = ">=2.0.8", optional = true}
opencv-python = {version = ">=4.10.0.84, <4.15.0.0", optional = true}
# Time Series dependencies
tsfel = {version = ">0.1.7", optional = true}
wfdb = {version = ">=4.1.2, <5.0.0", optional = true}
statsmodels = {version = ">=0.14.4, <0.15.0", optional = true}
fastdtw = {version = "^0.3.4", optional = true}
# Text Dependencies TODO
# accelerate = {version = "^0.24.0", optional = true}
# datasets = {version = "^2.14.6", optional = true}
# nltk = {version = "^3.8.1", optional = true}
# sentence-transformers = {version = "^2.2.2", optional = true}
# python-multipart = {version = "0.0.6", optional = true}
# Tabular Dependencies
numba = {version = ">=0.60.0, <0.80.0", optional = true}
pandas = {version = ">=2.0.0, <3.0.0", optional = true}
pycanon = {version = "1.0.1.post2", optional = true}
scipy = {version = ">=1.6.0, <2.0.0", optional = true}
spacy = {version = ">=3.7.4, <4.0.0", optional = true}
transformers = {version = ">=4.43.2, <5.0.0", optional = true}
umap-learn = {version = ">=0.5.5, <0.6.0", optional = true}
gudhi = {version = ">=3.9.0, <=4.0.0", optional = true}
word2number = {version = ">=1.1.0, <1.5.0", optional = true}
[tool.poetry.extras]
image = ["torchvision", "pycocotools", "opencv-python"]
tabular = ["numba", "pandas", "pycanon", "scipy", "spacy", "transformers", "umap-learn", "gudhi", "word2number", "statsmodels"]
time_series = ["tsfel", "wfdb", "statsmodels", "fastdtw"]
# text = ["accelerate", "datasets", "nltk", "sentence-transformers", "transformers", "python-multipart"]
all = [
"torchvision", "pycocotools", "opencv-python",
"numba", "pandas", "pycanon", "scipy", "spacy", "transformers", "umap-learn", "word2number", "gudhi",
"tsfel", "wfdb", "statsmodels", "fastdtw"
# "accelerate", "datasets", "nltk", "sentence-transformers", "transformers", "python-multipart"
]
[tool.poetry.group.prod.dependencies]
fastapi = "^0.104.1"
python-multipart = "^0.0.6"
uvicorn = "^0.24.0.post1"
[tool.poetry.group.dev]
optional = true
[tool.poetry.group.dev.dependencies]
black = "^23.11.0"
flake8 = "^6.1.0"
isort = "^5.12.0"
mypy = "^1.13.0"
pre-commit = "^3.5.0"
pytest = "^7.4.3"
pytest-cov = "^4.1.0"
commitizen = "^3.17.0"
safety = "^2.3.5"
httpx = "^0.27.0"
twine = "^5.1.1"
[tool.poetry.group.docs]
optional = true
[tool.poetry.group.docs.dependencies]
pydocstyle = "^6.3.0"
mkdocs = "^1.6.1"
mkdocstrings = {extras = ["python"], version = "^0.26.1"}
mkdocs-gen-files = "^0.5.0"
mkdocs-literate-nav = "^0.6.1"
mkdocs-material = "^9.5.34"
mkdocs-section-index = "^0.3.9"
mkautodoc = "^0.2.0"
mkdocs-include-markdown-plugin = "^6.2.2"
[tool.poetry.group.notebook]
optional = true
[tool.poetry.group.notebook.dependencies]
ipykernel = "^6.27.1"
nbconvert = "^7.11.0"
[tool.poetry.scripts]
pymdma = "pymdma.cli:main"
[tool.black]
line-length = 120
color = true
target-version = ['py39']
include = '\.pyi?$'
exclude = '''
(
\.egg
| \.eggs
| \.git
| \.hg
| \.dvc
| \.mypy_cache
| \.pytest_cache
| \.nox
| \.tox
| \.venv
| \.venv-docs
| \.venv-dev
| \.venv-note
| \.venv-dempy
| _build
| build
| dist
| setup.py
)
'''
# `isort` configurations
[tool.isort]
# https://github.com/timothycrosley/isort
py_version = 39
profile = "black"
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
line_length = 120
skip_gitignore = true
color_output = true
atomic = true
# `coverage` configurations
[tool.coverage.run]
source = ["src/pymdma"]
branch = true
command_line = '-m pytest'
[tool.coverage.report]
exclude_lines = [
"pragma: nocover",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"raise AssertionError",
]
show_missing = true
ignore_errors = true
skip_covered = true
#fail_under = 100
#precision = 1
omit = [
"tests/*",
".venv*",
"version.py",
"cli.py",
"*/text/*" # TODO Remove when text metrics are implemented
]
# `pytest` configurations
[tool.pytest.ini_options]
pythonpath = "src"
minversion = "6.0"
addopts = ["-vv", "--doctest-modules"]
doctest_optionflags = "NORMALIZE_WHITESPACE"
testpaths = ["test"]
filterwarnings = ["ignore::DeprecationWarning"]
[tool.mypy]
# https://mypy.readthedocs.io/en/latest/config_file.html
python_version = "3.9"
pretty = true
show_traceback = true
color_output = true
warn_return_any = true
warn_no_return = true
warn_unused_configs = true
warn_unused_ignores = true
warn_redundant_casts = true
warn_unreachable = true
[tool.vulture]
paths = ["src/pymdma"]
min_confidence = 65
[tool.pydocstyle]
convention = "numpy"
#ignore = "D205,D415"
[tool.interrogate]
# https://github.com/econchick/interrogate#configuration
ignore-init-method = true
fail-under = 95
color = true
# possible values: 0 (minimal output), 1 (-v), 2 (-vv)
verbose = 0
quiet = false
exclude = ["setup.py", "docs", "build"]
[tool.nbqa.config]
black = "pyproject.toml"
isort = "pyproject.toml"
[tool.nbqa.mutate]
isort = 1
black = 1
pyupgrade = 1
[tool.nbqa.addopts]
pyupgrade = ["--py36-plus"]
[tool.nbqa.files]
isort = "^notebooks/"
black = "^notebooks/"
flake8 = "^notebooks/"
mypy = "^notebooks/"
pydocstyle = "^notebooks/"
pyupgrade = "^notebooks/"
[tool.bandit]
targets = ["src/pymdma"]
# (optional) list included test IDs here, eg '[B101, B406]':
tests = ["B201", "B301"]
# (optional) list skipped test IDs here, eg '[B101, B406]':
skips = ["B101", "B601"]
[tool.bandit.assert_used]
exclude = ["*_test.py", "test_*.py"]
# TODO
# https://github.com/terrencepreilly/darglint/issues/130
[tool.cruft]
skip = [".git"]
[build-system]
requires = ["poetry-core>=1.0.0, <2.0.0"]
build-backend = "poetry.core.masonry.api"