-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
325 lines (278 loc) · 7.94 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
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
[tool.poetry]
name = "SiD2ReGenerator"
version = "0.2.15"
description = "The SiD2ReGenerator Python project"
license = "BSD-3-Clause"
authors = ["B. Stratmann <[email protected]>"]
maintainers = ["B. Stratmann <[email protected]>"]
readme = "README.md"
# The project homepage, e.g. Gitlab pages
# homepage = ""
repository = "https://github.com/FraunhoferIOSB/SiD2Re"
# The project documentation, e.g. Gitlab pages
# documentation = ""
keywords = ["tool", "ml"]
classifiers = [# Optional
# How mature is this project? Common values are
# 3 - Alpha
# 4 - Beta
# 5 - Production/Stable
# 'Development Status :: 3 - Alpha',
# Indicate who your project is intended for
# 'Intended Audience :: Developers',
# 'Topic :: Software Development :: Build Tools',
# Pick your license as you wish
'License :: OSI Approved :: BSD License',
# Specify the Python versions you support here. In particular, ensure
# that you indicate you support Python 3. These classifiers are *not*
# checked by 'pip install'. See instead 'python_requires' below.
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
"Programming Language :: Python :: 3.10",
'Programming Language :: Python :: 3 :: Only',
"Operating System :: OS Independent",
]
packages = [
{ include = "sid2re", from = "src" },
{ include = "tests", format = "sdist" },
]
[project.urls]
Homepage = "https://github.com/FraunhoferIOSB/SiD2Re"
Issues = "https://github.com/FraunhoferIOSB/SiD2Re/issues"
Paper = "https://ieeexplore.ieee.org/document/10218255"
[tool.poetry.dependencies]
python = ">=3.8,<3.12"
scikit-learn = "^1.2.1"
pandas = "*"
matplotlib = "^3.6.3"
numpy = "^1.24.1"
seaborn = "^0.12.2"
networkx = "^3.1"
tqdm = "*"
[tool.poetry.group.test]
optional = true
[tool.poetry.group.test.dependencies]
pytest = "*"
pytest-cov = "*"
pytest-xdist = "*"
pytest-profiling = "*"
check-manifest = "*"
coverage = "*"
tox = "*"
[tool.poetry.group.lint]
optional = true
[tool.poetry.group.lint.dependencies]
mypy = "*"
flake8 = "*"
flake8-pyproject = "*"
flake8-builtins = "*"
wemake-python-styleguide = "*"
flake8-mutable = "*"
flake8-print = "*"
pydoclint = "*"
pylint = "*"
ruff = "*"
# stubs extensions for imported packages to support mypy checking
pandas-stubs = "*"
types-PyYAML = "*"
types-protobuf = "*"
types-pytz = "*"
types-python-dateutil = "*"
types-appdirs = "*"
types-tqdm = "^4.66.0.2"
types-setuptools = "^68.2.0.1"
networkx-stubs = "^0.0.1"
[tool.poetry.group.dev]
optional = true
[tool.poetry.group.dev.dependencies]
tox = "*"
jupyterlab = "*"
jupyter = "*"
notebook = "*"
cython = "*"
[tool.poetry.group.pytest]
optional = true
[tool.poetry.group.pytest.dependencies]
pytest = "*"
pytest-cov = "*"
pytest-xdist = "*"
pytest-profiling = "*"
check-manifest = "*"
coverage = "*"
typing_extensions = "*"
[tool.poetry.group.misctest]
optional = true
[tool.poetry.group.misctest.dependencies]
bandit = "*"
radon = "*"
[tool.poetry.group.docs]
optional = true
[tool.poetry.group.docs.dependencies]
Sphinx = "*"
sphinx-rtd-theme = "*"
nbsphinx = "*"
sphinx-gallery = "*"
tomli = "*"
numpydoc = "*"
[tool.poetry.group.examples]
optional = true
[tool.poetry.group.examples.dependencies]
nbqa = { extras = ["toolchain"], version = "^1.7.0" }
ipympl = "^0.9.3"
nbmake = "*"
[tool.poetry.group.ci]
optional = true
[tool.poetry.group.ci.dependencies]
fire = "*"
[tool.poetry.scripts]
SiD2ReGenerator = "sid2re.main:main"
[tool.pytest.ini_options]
minversion = "6.0"
addopts = [
"-ra",
"--maxfail=2",
"--code-highlight=yes",
"--color=yes"
]
testpaths = [
"tests"
]
pythonpath = [
"src"
]
# MYPY
# Global options:
[tool.mypy]
python_version = 3.8
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
warn_unreachable = true
plugins = "numpy.typing.mypy_plugin"
[[tool.mypy.overrides]]
module = "sklearn"
ignore_missing_imports = true
warn_return_any = false
[[tool.mypy.overrides]]
module = "sklearn.*"
ignore_missing_imports = true
warn_return_any = false
[[tool.mypy.overrides]]
module = "numpy"
ignore_missing_imports = true
warn_return_any = false
[[tool.mypy.overrides]]
module = "matplotlib"
ignore_missing_imports = true
warn_return_any = false
[[tool.mypy.overrides]]
module = "matplotlib.*"
ignore_missing_imports = true
warn_return_any = false
# Per-module options:
[tool.flake8]
exclude = [".tox", "*.egg", "build", "data", "tests"]
max-line-length = 120
max-doc-length = 120
ignore = ["E731", "W503", "WPS412", "WPS410", "I00", "WPS211", "WPS305", "WPS237", "WPS214", "WPS221", "RST", "WPS317",
"WPS114", "WPS425", "WPS226", "WPS430", "WPS202", "WPS212", "D105", "WPS336", "WPS232", "WPS110","T201"]
doctests = true
docstring-convention = "numpy"
count = true
style = "numpy"
skip-checking-short-docstrings = false
allow-init-docstring = true
per-file-ignores = ["docs/source/notebooks/*: WPS111,WPS221,WPS432,WPS430,WPS226", "*base*: WPS420"]
max-local-variables = 8
# Restrict the number of public instance variables. Expose variables through properties.
max-attributes = 1
max-annotation-complexity = 4
[tool.pylint]
max-line-length = 120
disable = ["similarities", "too-many-arguments", "imports", "too-many-instance-attributes", "logging-fstring-interpolation",
"logging-not-lazy", "missing-function-docstring", "too-few-public-methods", "missing-module-docstring",
"too-many-locals", "too-many-branches", "too-many-statements"]
[tool.tox]
legacy_tox_ini = """
[tox]
envlist = py{311},lint, type, docstring-examples,notebooks,bandit
# Define the minimal tox version required to run;
# if the host tox is less than this the tool with create an environment and
# provision it with a tox that satisfies it under provision_tox_env.
# At least this version is needed for PEP 517/518 support.
minversion = 3.3.0
# Activate isolated build environment. tox will use a virtual environment
# to build a source distribution from the source tree. For build tools and
# arguments use the pyproject.toml file as specified in PEP-517 and PEP-518.
isolated_build = true
[testenv]
passenv =
DBUS_SESSION_BUS_ADDRESS
skip_install = true
allowlist_externals = poetry
commands_pre =
poetry install --with pytest,dev
python setup.py build_ext --inplace
commands =
poetry run pytest tests/integration --cov=src --cov-report term-missing:skip-covered --cov-report=xml --import-mode importlib -n auto --profile
poetry run pytest tests/unit --cov=src --cov-report term-missing:skip-covered --cov-report=xml --import-mode importlib -n auto --profile
poetry run python dev_tools/test/profiling.py
[testenv:docstring-examples]
passenv =
DBUS_SESSION_BUS_ADDRESS
skip_install = true
allowlist_externals = poetry
commands_pre =
poetry install --with pytest,dev
commands =
poetry --version
[testenv:type]
passenv =
DBUS_SESSION_BUS_ADDRESS
skip_install = true
allowlist_externals = poetry
commands_pre =
poetry install --with lint
commands =
poetry run mypy src
[testenv:lint]
skip_install = true
allowlist_externals = poetry
commands_pre =
poetry install --only lint
commands =
ruff check src --fix
poetry run pylint -j 4 src
poetry run flake8 src
poetry run flake8 tests
[testenv:notebooks]
skip_install = true
allowlist_externals =
poetry
commands_pre =
poetry install --with dev,examples,pytest
commands = poetry run pytest -n 5 --nbmake docs --overwrite
[testenv:bandit]
description = Run Bandit security analysis.
allowlist_externals =
poetry
commands_pre =
poetry install --with misctest
commands = poetry --version
[testenv:radon]
description = Analyze code complexity with Radon.
allowlist_externals =
poetry
commands_pre =
poetry install --with misctest
commands = radon cc src -s -a
"""
[tool.black]
skip-string-normalization = true
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"