-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpyproject.toml
387 lines (349 loc) Β· 8.07 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
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
# Part of blastpipe.
# See LICENSE.txt in the project root for details.
[project]
dynamic = ["dependencies", "version"]
license = {file = "LICENSE.txt"}
[build-system]
requires = [
"OZI.build[core,uv]~=1.5",
]
build-backend = "ozi_build.buildapi"
[tool.setuptools.dynamic]
dependencies = { file = ["requirements.in"] }
[project.optional_dependencies] # also meson test suite names
# OZI Packaging Dependencies
# continuous integration
ci = [
"tox>4",
"tox-gh>1.2",
]
# tox -e fix
fix = ["black", "ruff>=0.1.6", "autoflake", "isort"]
# Default meson test setup
dev = ["[dist,lint,test,]"]
dist = [
"python-semantic-release",
"sigstore",
"cibuildwheel",
"twine",
]
lint = [
"Flake8-pyproject",
"bandit[toml]",
"black",
"flake8",
"flake8-annotations",
"flake8-broken-line",
"flake8-bugbear",
"flake8-comprehensions",
"flake8-datetimez",
"flake8-docstring-checker",
"flake8-eradicate",
"flake8-fixme",
"flake8-leading-blank-lines",
"flake8-no-pep420",
"flake8-pyi",
"flake8-pytest-style",
"flake8-quotes",
"flake8-tidy-imports",
"flake8-type-checking",
"isort",
"mypy",
"pyright",
"readme-renderer",
]
test = [
"coverage[toml]",
"pytest",
"hypothesis[all]",
"pytest-asyncio",
"pytest-cov",
"pytest-randomly",
"pytest-tcpclient",
"pytest-xdist",
]
[tool.ozi-build.metadata]
summary='OZI Project utility library.'
home-page='https://oziproject.dev'
author='Eden Ross Duff MSc'
author-email='[email protected]'
license='Apache-2.0 WITH LLVM-exception'
download-url='https://github.com/OZI-Project/blastpipe/archive/refs/tags/@[email protected]'
requires-python='>=3.10, <3.14'
keywords='ozi,meson'
provides=['msgspec']
classifiers = [
'License :: OSI Approved :: Apache Software License',
'Development Status :: 3 - Alpha',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
'Programming Language :: Python :: Implementation :: CPython',
'Intended Audience :: Other Audience',
'Natural Language :: English',
'Typing :: Typed',
'Environment :: Other Environment',
]
description-file='README.rst'
[tool.cibuildwheel]
build-frontend = "build[uv]"
[tool.setuptools_scm]
fallback_version = "@VCS_TAG@"
parentdir_prefix_version = "blastpipe-"
tag_regex = "^(?P<prefix>v)?(?P<version>[^\\+]+)(?P<suffix>.*)?$"
[tool.bandit]
exclude_dirs = [
"venv",
"meson-private",
"tests",
]
format = "txt"
ignore_nosec = true
verbose = true
[tool.black]
extend-exclude = "(\\.pyi|venv|meson-private|subprojects)"
line-length = 93
[tool.coverage.report]
exclude_lines = [
"^.*#\\s*(pragma|PRAGMA)[:\\s]?\\s*(no|NO)\\s*(cover|COVER)",
"^.*#\\s*(pragma|PRAGMA)[:\\s]?\\s*(defer|DEFER)\\s*(to|TO)\\s*[a-zA-Z0-9_-]*",
"def __repr__",
"def __wrapper", # functools.wraps decorated functions
"(\\.\\.\\.)",
"@(abc\\.)?abstractmethod",
"class .*\\bProtocol\\):",
"if __name__ == .__main__.:",
]
fail_under = 100.0
show_missing = true
skip_covered = true
skip_empty = true
[tool.coverage.run]
branch = true
relative_files = true
[tool.flake8]
ban-relative-imports = "parents"
max-line-length = 93
extend-exclude = [
"venv",
"meson-private",
"build-env-*",
"build*",
"*.pyi"
]
extend-ignore = "E203,E501,TC007,TC008"
extend-select = "B950"
[tool.isort]
line_length = 93
profile = "black"
force_single_line = true
skip_glob = ['subprojects/*',]
[tool.mypy]
strict = true
implicit_reexport = true
exclude = [
"venv",
"meson-private",
"tests",
"subprojects",
]
[tool.pyright]
reportMissingTypeStubs = false
exclude = [
"venv",
"meson-private",
"tests",
"subprojects",
]
[tool.pytest.ini_options]
filterwarnings = ["error","ignore:The --rsyncdir command line argument and rsyncdirs config variable are deprecated.:DeprecationWarning"]
asyncio_mode = "auto"
log_cli = true
log_cli_date_format = "%Y-%m-%d %H:%M:%S"
log_cli_format = "%(asctime)s [%(levelname)8s] %(name)s: %(message)s (%(filename)s:%(lineno)s)"
log_cli_level = "INFO"
[tool.ruff]
line-length = 93
extend-exclude = [
"venv",
"meson-private",
]
select = ["ALL"]
ignore = [
"A003",
"ARG",
"ANN401",
"TRY003",
"B028",
"B905",
"D1",
"D2",
"D101",
"D4",
"FLY",
"FBT",
"PGH003",
"PLR",
"RET",
"EM",
"PLW",
"PTH",
"RUF009",
"RUF012",
"RUF015",
"SIM",
"T201",
"TCH002",
"TCH004",
"UP",
"PERF203",
]
# target-version = "@PYTHON_VERSION_DIST@"
[tool.ruff.lint.mccabe]
max-complexity = 6
[tool.ruff.format]
line-ending = "lf"
quote-style = "single"
[tool.ruff.isort]
force-single-line = true
[tool.ruff.lint.pycodestyle]
max-line-length = 102
[tool.ruff.lint.flake8-copyright]
author="Eden Ross Duff MSc,"
[tool.ruff.lint.flake8-quotes]
inline-quotes = "single"
[tool.ruff.lint.flake8-type-checking]
strict = true
[tool.semantic_release]
commit_parser = "emoji"
major_on_zero = false
tag_format = "{version}"
[tool.semantic_release.branches.main]
match = "(main|master)"
prerelease_token = "beta"
prerelease = false
[tool.semantic_release.commit_parser_options]
major_tags = [
":boom:",
]
minor_tags = [
":sparkles:",
]
patch_tags = [
":adhesive_bandage:",
":alembic:",
":alien:",
":ambulance:",
":apple:",
":arrow_down:",
":arrow_up:",
":bento:",
":bug:",
":bulb:",
":card_file_box:",
":chart_with_upwards_trend:",
":checkered_flag:",
":children_crossing:",
":dizzy:",
":egg:",
":fire:",
":globe_with_meridians:",
":goal_net:",
":green_apple:",
":green_heart:",
":hammer:",
":heavy_minus_sign:",
":heavy_plus_sign:",
":iphone:",
":label:",
":lipstick:",
":lock:",
":mag:",
":necktie:",
":package:",
":passport_control:",
":pencil2:",
":penguin:",
":pushpin:",
":recycle:",
":rewind:",
":robot:",
":speech_balloon:",
":triangular_flag_on_post:",
":wastebasket:",
":wheelchair:",
":wrench:",
":zap:",
]
[tool.semantic_release.changelog]
changelog_file = "CHANGELOG.md"
[tool.semantic_release.remote]
type = "github"
[tool.semantic_release.publish]
dist_glob_patterns = [
"*.tar.gz",
"*.whl",
"sig/*",
]
upload_to_vcs_release = true
[tool.tox]
legacy_tox_ini = """
[tox]
skipsdist = True
env_list =
dist
lint
test
[gh]
python =
3.12 = dist,lint,test
3.11 = dist,lint,test
3.10 = dist,lint,test
[testenv]
allowlist_externals =
rm
pipx
meson
python
package = wheel
deps =
uv
commands_pre =
python -m uv pip install -r requirements.in OZI.build[uv,core]~=1.2
pipx install --python=python meson
commands =
meson setup {env_tmp_dir} -Dozi:dist=disabled -Dozi:tox-env-dir={env_dir}
meson compile -C {env_tmp_dir}
rm -rf {env_tmp_dir}/.gitignore
commands_post =
{env_python} -m invoke --search-root={env_tmp_dir}/subprojects/ozi/ozi checkpoint --suite={env_name} {posargs}
[testenv:dist]
description = OZI distribution checkpoint
[testenv:lint]
description = OZI format/lint checkpoint
[testenv:test]
description = OZI unit tests checkpoint
[testenv:fix]
description = OZI project fix issues utility (black, isort, autoflake, ruff)
deps = pipx
skip_install = true
commands_pre =
commands =
pipx run --python {env_python} black -S .
pipx run --python {env_python} isort .
pipx run --python {env_python} autoflake -i -r .
pipx run --python {env_python} ruff check ozi --fix
commands_post =
[testenv:scm]
description = OZI supply chain management (setuptools_scm)
commands =
{env_python} -m setuptools_scm {posargs}
commands_post =
[testenv:invoke]
description = OZI invoke task entrypoint, for more info use "tox -e invoke -- --list"
no_package = true
commands_post =
{env_python} -m invoke --search-root={env_tmp_dir}/subprojects/ozi/ozi {posargs:--list}
"""