-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpyproject.toml
More file actions
357 lines (318 loc) · 7.69 KB
/
pyproject.toml
File metadata and controls
357 lines (318 loc) · 7.69 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
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
# Part of TAP-Producer.
# See LICENSE.txt in the project root for details.
[build-system]
requires = ['OZI.build[core,pip,uv]>=2.0.5,<2.4.0']
build-backend = "ozi_build.buildapi"
[project]
name="TAP-Producer"
description = 'Test Anything Protocol producer API for Python.'
authors = [{name='Eden Ross Duff MSc', email='help@oziproject.dev'}]
readme='README.rst'
requires-python = '>=3.9, <3.14'
keywords = 'TAP'
classifiers = [
'License :: OSI Approved :: Apache Software License',
'Development Status :: 5 - Production/Stable',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.9',
'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 :: Developers',
'Natural Language :: English',
'Operating System :: OS Independent',
'Topic :: Software Development :: Testing',
'Typing :: Typed',
'Environment :: Console',
]
dependencies = [
'PyYAML~=6.0',
]
[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>=24.3", "ruff>=0.1.6", "autoflake", "isort"]
# Default meson test setup
# dev = ["[dist,lint,test,]"]
dist = [
"python-semantic-release",
"sigstore",
]
lint = [
"bandit[toml]",
"black>=24.3",
"flake8",
"isort",
"mypy",
"pyright",
"readme-renderer[md]",
"Flake8-pyproject",
"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",
]
test = [
"coverage[toml]",
"pytest",
"hypothesis[all]",
"pytest-asyncio",
"pytest-cov",
"pytest-randomly",
"pytest-tcpclient",
"pytest-xdist",
]
[project.urls]
Homepage = "https://rjdbcm.github.io/rjdbcm/"
Documentation = "https://tap-producer.readthedocs.io/en/latest/"
Source = "https://github.com/OZI-Project/TAP-Producer"
[tool.setuptools_scm]
fallback_version = "@VCS_TAG@"
parentdir_prefix_version = "TAP-Producer-"
tag_regex = "^(?P<prefix>v)?(?P<version>[^\\+]+)(?P<suffix>.*)?$"
[tool.bandit]
exclude_dirs = [
"venv",
"meson-private",
"subprojects",
"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__.:",
"if TYPE_CHECKING:",
]
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",
"subprojects",
"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",
"subprojects",
"tests",
]
[tool.pyright]
reportMissingTypeStubs = false
exclude = [
"venv",
"meson-private",
"subprojects",
"tests",
]
[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",
"subprojects",
]
select = ["ALL"]
ignore = [
"A003",
"ARG",
"ANN401",
"TRY003",
"B028",
"B905",
"D1",
"D2",
"D101",
"D4",
"FLY",
"FBT",
"PGH003",
"PLR",
"RET",
"EM",
"PLW",
"PTH",
"RUF009",
"RUF012",
"RUF015",
"RUF200",
"SIM",
"T201",
"TCH002",
"TCH004",
"UP",
"PERF203",
"PYI021",
]
# 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 = "conventional"
major_on_zero = true
tag_format = "{version}"
[tool.semantic_release.branches.main]
match = "(main|master)"
prerelease_token = "beta"
prerelease = false
[tool.semantic_release.branches."0.x"]
match = "\\A0\\.\\d+\\Z"
prerelease_token = "alpha"
prerelease = false
[tool.semantic_release.branches."1.x"]
match = "\\A1\\.\\d+\\Z"
prerelease_token = "rc"
prerelease = false
[tool.semantic_release.commit_parser_options]
allowed_tags = [
"build",
"chore",
"ci",
"docs",
"feat",
"fix",
"perf",
"style",
"refactor",
"test",
]
minor_tags = ["feat"]
patch_tags = ["fix", "perf", "build"]
[tool.semantic_release.changelog.default_templates]
changelog_file = "CHANGELOG.md"
[tool.semantic_release.changelog]
exclude_commit_patterns = ["Merge.*"]
[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
envlist = 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
python
meson
package = wheel
deps =
uv
commands_pre =
python -m uv pip install OZI.build[core,pip,uv]>=2.0.5,<2.4.0
pipx install --python=python meson
commands =
meson setup {env_tmp_dir} -Dozi:{env_name}=enabled -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 .
commands_post =
[testenv:scm]
description = OZI supply chain management (setuptools_scm)
deps = setuptools_scm[toml]>=8
commands =
{env_python} -m setuptools_scm {posargs}
[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}
"""