-
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathpyproject.toml
More file actions
268 lines (252 loc) · 9.64 KB
/
pyproject.toml
File metadata and controls
268 lines (252 loc) · 9.64 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
[build-system]
build-backend = "uv_build"
requires = [ "uv-build>=0.9" ]
[project]
# Docs: https://packaging.python.org/en/latest/guides/writing-pyproject-toml/
name = "gha-utils"
version = "5.10.4.dev0"
description = "🧩 CLI for GitHub Actions + reusable workflows"
readme = "readme.md"
keywords = [
"build-automation",
"changelog-formatter",
"ci-cd",
"cli",
"formatting",
"github-actions",
"labels",
"linting",
"markdown",
"mypy",
"nuitka",
"packaging",
"pypi",
"python",
"release-automation",
"sphinx",
"sponsorship",
"terminal",
"typo",
"workflow-reusable",
"yaml",
]
license = "GPL-2.0-or-later"
license-files = [ "license" ]
authors = [ { name = "Kevin Deldycke", email = "kevin@deldycke.com" } ]
# Python versions and their status: https://devguide.python.org/versions/
requires-python = ">=3.10"
classifiers = [
# See: https://pypi.org/pypi?%3Aaction=list_classifiers
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Framework :: Pelican",
"Framework :: Sphinx",
"Intended Audience :: Developers",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: BSD :: FreeBSD",
"Operating System :: POSIX :: BSD :: NetBSD",
"Operating System :: POSIX :: BSD :: OpenBSD",
"Operating System :: POSIX :: Linux",
"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 :: 3.14",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Unix Shell",
"Topic :: Documentation :: Sphinx",
"Topic :: File Formats :: JSON",
"Topic :: Security",
"Topic :: Software Development :: Build Tools",
"Topic :: Software Development :: Compilers",
"Topic :: Software Development :: Documentation",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: Quality Assurance",
"Topic :: Software Development :: Version Control :: Git",
"Topic :: System :: Archiving :: Packaging",
"Topic :: System :: Installation/Setup",
"Topic :: System :: Shells",
"Topic :: System :: Software Distribution",
"Topic :: Terminals",
"Topic :: Text Processing :: Markup :: HTML",
"Topic :: Text Processing :: Markup :: Markdown",
"Topic :: Utilities",
"Typing :: Typed",
]
# Semantic versioning works in theory. In practice, it is hard to guarantee.
# That's why we rely on >= specifier instead of ~= to relax constraints. This gives more freedom to packagers to
# release hotfixes for security vulnerabilities in the future.
# See also discussion about upper limits at: https://iscinumpy.dev/post/bound-version-constraints/#tldr
# All minimal version choice are documented. Reasons to bump a minimal version are:
# - bug fixes,
# - security fixes,
# - new code path we depends on,
# - aligns minimal Python requirements to ours,
# - adds new explicit support Python version.
dependencies = [
"backports-strenum>=1.3.1; python_version<'3.11'",
# boltons 25.0.0 is the first version to support Python 3.13.
"boltons>=25",
# v1.2.6 fix Click compatibility issues.
"bump-my-version>=1.2.6",
# Click Extra 7.5.0 is the first version we used when we last changed the requirement.
"click-extra>=7.5",
# We depends on new plublic methods exposed in extra-platforms 8.0.0.
"extra-platforms>=8",
# v25.0 is the first version we used when we last changed the requirement.
"packaging>=25",
# v0.3.3 is the first version we used.
# XXX In the future, replace py-walk with wcmatch once the latter supports gitignore files:
# https://github.com/facelessuser/wcmatch/issues/226
"py-walk>=0.3.3",
# PyDriller 2.6.0 is the first version we used when we last changed the requirement.
"pydriller>=2.6",
# v0.9.0 supports the latest metadata specifications.
"pyproject-metadata>=0.9",
# PyYAML 6.0.3 is the first version to support Python 3.14.
"pyyaml>=6.0.3",
# Tomli 2.3.0 is the first version to support Python 3.14.
"tomli>=2.3; python_version<'3.11'",
# wcmatch 10.0 fix some inconsistencies in globbing and symlinks.
"wcmatch>=10",
]
[project.scripts]
gha-utils = "gha_utils.__main__:main"
[project.urls]
"Changelog" = "https://github.com/kdeldycke/workflows/blob/main/changelog.md"
"Download" = "https://github.com/kdeldycke/workflows/releases/tag/v5.10.4.dev0"
"Funding" = "https://github.com/sponsors/kdeldycke"
"Homepage" = "https://github.com/kdeldycke/workflows"
"Issues" = "https://github.com/kdeldycke/workflows/issues"
"Repository" = "https://github.com/kdeldycke/workflows"
# Non-runtime development dependency groups.
[dependency-groups]
test = [
# coverage 7.11.0 is the first version to drop support for Python 3.9.
"coverage[toml]>=7.11",
# Pytest 9.0.0 introduce support for native TOML configuration files.
"pytest>=9",
# pytest-cases 3.9.0 is the first version to support Python 3.14.
"pytest-cases>=3.9",
# pytest-cov 7.0.0 is the first version to be repackaged with pyproject-metadata.
"pytest-cov>=7",
# pytest-github-actions-annotate-failures 0.3.0 is the first version to support Python 3.13.
"pytest-github-actions-annotate-failures>=0.3",
# pytest-randomly 4.0.0 is the first version to support Python 3.14.
"pytest-randomly>=4",
]
typing = [ "types-boltons>=25.0.0.20250822", "types-pyyaml>=6.0.12.9" ]
[tool.uv]
# Cooldown period: 7-day buffer before using newly released packages.
# Relative dates are fine here because the Renovate lock-maintenance job
# (sync-uv-lock) reverts uv.lock when the only diff is timestamp noise.
exclude-newer = "1 week"
# Exclude gha-utils from the cooldown period.
exclude-newer-package = { "gha-utils" = "0 day" }
# Package is at root level, not in "./src/".
build-backend.module-root = ""
[tool.ruff]
# Enable formatting of Python code blocks in Markdown files.
# https://docs.astral.sh/ruff/formatter/#markdown-code-formatting
extend-include = [ "*.{markdown,mdown,mkdn,mdwn,mkd,md,mdtxt,mdtext,mdx}" ]
preview = true
fix = true
unsafe-fixes = true
show-fixes = true
# Enable reformatting of code snippets in docstrings.
# https://docs.astral.sh/ruff/formatter/#docstring-formatting
format.docstring-code-format = true
# D400: First line should end with a period.
# Allows docstrings to end up with any punctuation, not just a period.
# See: https://github.com/astral-sh/ruff/issues/1858#issuecomment-1382640623
# ERA001: Found commented-out code.
# Do not remove commented code, as it might be used for documentation.
# See: https://docs.astral.sh/ruff/rules/#eradicate-era
lint.ignore = [ "D400", "ERA001" ]
# Allow rules to add `from __future__ import annotations` in cases where
# this would simplify a fix or enable a new diagnostic.
# https://docs.astral.sh/ruff/settings/#lint_future-annotations
lint.future-annotations = true
[tool.typos]
default.extend-ignore-identifiers-re = [
# error: `certifi` should be `certify`, `certifies`, `certified`
# ╭▸ ./docs/assets/dependencies.mmd:184:11
# │
# 184 │ click certifi "https://pypi.org/project/certifi/" _blank
# ╰╴ ━━━━━━━
"certifi",
# error: `WARNIN` should be `WARNING`
# ╭▸ ./tests/test_changelog.py:565:46
# │
# 565 │ # Both sources available — NOTE only, no WARNINGs.
# ╰╴
"WARNIN",
]
[tool.pytest]
# https://docs.pytest.org/en/latest/customize.html#pyproject-toml
addopts = [
"--durations=10",
"--cov",
"--cov-report=term",
"--cov-report=xml",
# Codecov.io's test analytics requires a JUnit XML file:
# https://docs.codecov.com/docs/test-analytics#1-output-a-junit-xml-file-in-your-ci
"--junitxml=junit.xml",
"--override-ini=junit_family=legacy",
]
# Make sure tests that are expected to fail do not resurrect and start working all of a sudden.
xfail_strict = true
[tool.coverage]
# https://coverage.readthedocs.io/en/latest/config.html
run.branch = true
run.source = [ "gha_utils" ]
report.precision = 2
[tool.bumpversion]
current_version = "5.10.4.dev0"
allow_dirty = true
ignore_missing_files = true
# Parse versions with an optional .devN suffix (PEP 440).
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)(\\.dev(?P<dev>\\d+))?"
serialize = [
"{major}.{minor}.{patch}.dev{dev}",
"{major}.{minor}.{patch}",
]
# When dev is "release" (its optional value), the .devN suffix is omitted.
# Bumping patch/minor/major resets dev to "0", producing X.Y.Z.dev0.
# Bumping dev goes from "0" to "release", stripping the suffix for release.
parts.dev.values = [ "0", "release" ]
parts.dev.optional_value = "release"
[[tool.bumpversion.files]]
# Update Python package version in any __init__.py file.
glob = "./**/__init__.py"
ignore_missing_version = true
[[tool.bumpversion.files]]
# Update version in [project] section.
filename = "./pyproject.toml"
search = 'version = "{current_version}"'
replace = 'version = "{new_version}"'
[[tool.bumpversion.files]]
# Update version in download URL.
filename = "./pyproject.toml"
search = "releases/tag/v{current_version}"
replace = "releases/tag/v{new_version}"
[[tool.bumpversion.files]]
# Update the version in Markdown changelog.
filename = "./changelog.md"
search = "## [`{current_version}` (unreleased)]("
replace = "## [`{new_version}` (unreleased)]("
[[tool.bumpversion.files]]
# Update the version in the citation file.
filename = "./citation.cff"
search = "version: {current_version}"
replace = "version: {new_version}"
[tool.mypy]
warn_unused_configs = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_return_any = true
warn_unreachable = true
pretty = true
overrides = [ { ignore_missing_imports = true, module = [ "py_walk.*" ] } ]