-
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathpyproject.toml
More file actions
563 lines (543 loc) · 26 KB
/
Copy pathpyproject.toml
File metadata and controls
563 lines (543 loc) · 26 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
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
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
[build-system]
build-backend = "uv_build"
# uv-build is intentionally left uncapped. uv warns on build that the sdist
# could break on a future breaking uv-build release, but repomatic is pure
# Python with none of the packaging edge cases that warning guards against (no
# compiled extensions, no GPU/CUDA targets). Flexibility is preferred here:
# repomatic runs across the ecosystem, where uv versions drift between projects,
# and a hard ceiling risks a chicken-and-egg deadlock when one project's uv
# moves ahead of repomatic's next release.
requires = [ "uv-build>=0.8" ]
[project]
# Docs: https://packaging.python.org/en/latest/guides/writing-pyproject-toml/
name = "repomatic"
version = "7.10.1.dev0"
description = "🏭 Automate repository maintenance, releases, and CI/CD workflows"
readme = "readme.md"
keywords = [
"changelog-formatter",
"dependabot-alternative",
"github-actions",
"github-labels",
"github-workflow",
"gitignore",
"mailmap",
"mypy",
"nuitka",
"python-automation",
"release-automation",
"repository-automation",
"repository-management",
"reusable-workflows",
"software-factory",
"sphinx-doc",
"typo",
"uv",
"workflow-reusable",
]
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 :: 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",
]
dependencies = [
# arrow parses the RFC 3339 timestamps uv emits (nanosecond fractional seconds
# + a Z suffix, which Python 3.10's stdlib fromisoformat rejects) and renders the
# relative-time hints in sync-uv-lock tables and the unsubscribe report through
# its .humanize(). whenever was the prior parser but has no humanizer; switch back
# to it once one lands: https://github.com/ariebovenberg/whenever/discussions/277
"arrow>=1.3",
# Provides enum.StrEnum for Python < 3.11; all versions expose the class.
"backports-strenum>=1; python_version<'3.11'",
# boltons 25.0.0 dropped Python 3.9, matching our requires-python >= 3.10.
"boltons>=25",
# click-extra 8.8.0 is the floor: repomatic delegates to the utilities absorbed
# there — `format_size` (byte sizes in the image and cache reports), the
# `parse_friendly_duration`/`parse_iso8601_duration` pair (uv cooldown spans
# in `uv.py`/`version_sync.py`), `prep_path`/`is_stdout`/`STDOUT_SENTINEL`
# (CLI `--output` handling), and `config_table_to_flags` (tool flag
# translation). Earlier floors remain in play: `binaries_page` imports
# `click_extra.blocks` (`replace_region`, 8.7.1) to splice the binaries page
# chart region; `OperationTrail` and `resolve_jobs` (8.6.0) render the `sync-*`
# resolve trail; the `{matrix}` newest-first default (8.6.0) backs the committed
# Python-compatibility table in `docs/install.md`; the `python:render`
# `:mirror:` regions (8.5) drive the `update-docs` phase 4 refresh, and
# `click_extra.sphinx.myst_docstrings` (8.5, absorbed from
# `repomatic.myst_docstrings`) is loaded by `docs/conf.py`; `click:config`
# and `schema_field_infos()` (8.3) back `configuration.md` and `show-config`.
"click-extra>=8.8",
# extra-platforms 12.0.2 reimplemented is_macos() with sys.platform, avoiding
# the platform.platform() shell-out to ``cmd /c ver`` on Windows that broke
# under patched subprocess in tests and triggered a CPython 3.10.x bug.
"extra-platforms>=12.0.2",
# canonicalize_name() available since packaging 16; Version() since 17.
"packaging>=17",
# py-walk 0.3.x introduced get_parser_from_file(); replaced gitignore-parser
# (mherrmann/gitignore_parser#43).
# XXX Replace py-walk with wcmatch once the latter supports gitignore files:
# https://github.com/facelessuser/wcmatch/issues/226
"py-walk>=0.3.1",
# pyelftools parses the ELF headers of compiled binaries, so verify-binary can
# check architectures and glibc floors natively, inside manylinux containers,
# without installing exiftool. 0.33 is the first release to declare
# requires-python (>= 3.10, matching ours); earlier ones carry no guard.
"pyelftools>=0.33",
# pyproject-metadata 0.9 added PEP 639 (license expressions) and PEP 685 (extras
# normalization); our StandardMetadata.from_pyproject() call benefits from these.
"pyproject-metadata>=0.9",
# PyYAML < 6.0.2 uses Cython extensions that fail to compile on Python 3.14, and
# old releases lack requires-python metadata to prevent selection on 3.14.
"pyyaml>=6.0.3",
# tomlrt is a format-preserving TOML reader/writer used for both reads
# (pyproject.toml, uv.lock) and comment-preserving writes (tool config
# translation, pyproject.toml merging). `>=1.7.6` floor: 1.7.6 fixed two
# bugs on the `_update_tool_config` path: standalone-comment + inline-array
# bracket-pad trivia loss on cross-doc table grafts (dimbleby/tomlrt#171),
# and AoT children relocating to the document tail on section overwrite
# (dimbleby/tomlrt#172). 1.7.5 still carried both.
"tomlrt>=1.7.6",
# vt-py is the official VirusTotal Python client (uses aiohttp internally).
# Used by the scan-virustotal CLI command to upload release binaries.
"vt-py>=0.18",
# wcmatch 10.0 fixed globbing inconsistencies with symlinks; our metadata
# globbing uses iglob() with FOLLOW for symlink-aware file discovery.
"wcmatch>=10",
]
urls.Changelog = "https://github.com/kdeldycke/repomatic/blob/main/changelog.md"
urls.Documentation = "https://kdeldycke.github.io/repomatic"
urls.Download = "https://github.com/kdeldycke/repomatic/releases/tag/v7.10.1.dev0"
urls.Funding = "https://github.com/sponsors/kdeldycke"
urls.Homepage = "https://github.com/kdeldycke/repomatic"
urls.Issues = "https://github.com/kdeldycke/repomatic/issues"
urls.Repository = "https://github.com/kdeldycke/repomatic"
scripts.repomatic = "repomatic.__main__:main"
# Non-runtime development dependency groups.
[dependency-groups]
test = [
# coverage 7.11.0 dropped Python 3.9, matching our requires-python >= 3.10.
"coverage[toml]>=7.11",
# Pytest 9.0.0 introduce support for native TOML configuration files.
"pytest>=9",
# pytest-cov 4.0 stabilized the modern pytest plugin interface; --cov/--cov-report in addopts.
"pytest-cov>=4",
# pytest-github-actions-annotate-failures 0.2 requires Python >= 3.8; CI annotation
# API stable since 0.1.x.
"pytest-github-actions-annotate-failures>=0.2",
# pytest-randomly 3.x is the modern API; basic test randomization compatible with pytest >= 9.
"pytest-randomly>=3",
# pytest-xdist < 3.7 fails on Python 3.14 (no requires-python guard in older releases);
# [psutil] extra needed for --numprocesses=auto.
"pytest-xdist[psutil]>=3.7",
]
docs = [
# click-extra[sphinx] provides click_extra.sphinx extension, docutils, pygments,
# and sphinx transitively.
"click-extra[sphinx]",
# furo 2024.8.6+ supports Sphinx 8; pinned to recent CalVer release.
"furo>=2025.9.25",
# myst-parser 5.1 ships the native "alert" extension (enabled in docs/conf.py)
# that renders GitHub-style alerts as admonitions; earlier 5.x reject "alert".
"myst-parser>=5.1",
# Sphinx 8.0.0 is the first version to drop Python 3.9, like us.
"sphinx>=8",
# sphinx-autodoc-typehints 2.4.0 is the first version aligned to our Python >= 3.10 requirement.
"sphinx-autodoc-typehints>=2.4",
# sphinx-copybutton 0.5.2 stabilized the copy button behavior for code blocks.
"sphinx-copybutton>=0.5.2",
# sphinx-datatables 1.0.0 is the first stable release; makes the binaries
# catalog table searchable and sortable client-side (pulls sphinxcontrib-jquery).
"sphinx-datatables>=1",
# sphinx-design 0.6 introduced the current directive syntax for cards, grids, and tabs.
"sphinx-design>=0.6",
# sphinxcontrib-jquery is loaded explicitly in docs/conf.py (sphinx-datatables
# activates it too late to register jquery.js on its own); declare it so the
# build never relies on it arriving only transitively via sphinx-datatables.
"sphinxcontrib-jquery>=4",
# sphinxcontrib-mermaid 1.2.3 fixed mermaid_d3_zoom configuration support.
"sphinxcontrib-mermaid>=1.2.3",
# sphinxext-opengraph 0.13 stabilized OpenGraph metadata generation for Sphinx 8+.
"sphinxext-opengraph>=0.13",
]
# types-boltons: first stub release covering boltons 25.0 API (FrozenDict, unique, flatten,
# strip_ansi). types-docutils: covers the docutils.nodes imports in docs/conf.py.
# types-pyyaml: stub release covering PyYAML 6.0 (safe_load, safe_dump, full_load).
typing = [
# backports-strenum: provides StrEnum stubs for mypy --python-version 3.10 analysis;
# not in main deps (version-gated to Python<3.11 there), so added here unconditionally.
"backports-strenum>=1",
"types-boltons>=25.0.0.20250822",
"types-docutils>=0.22.3.20251115",
"types-pyyaml>=6.0.12.9",
]
[tool.uv]
# Floor uv at the minimum resolver repomatic relies on, with no upper bound.
# astral-sh/setup-uv reads this automatically (its `version` input defaults to
# the pyproject value) and installs the newest uv satisfying it, so CI and
# contributors move forward without a manual ceiling bump each minor (a hard
# upper cap breaks every machine the day the next uv minor lands, since uv
# self-updates). uv.lock stays stable across minors because sync-uv-lock
# discards a re-lock that only re-spells equivalent markers (see
# repomatic.uv.sync_uv_lock).
required-version = ">=0.11.15"
# Docs group requires Python >= 3.14 for recent MyST-Parser and click-extra features.
dependency-groups.docs = { requires-python = ">= 3.14" }
# Cooldown period before using newly released packages. Kept equal to
# `[tool.repomatic] minimum-release-age`: that value gates the `uvx` installs
# every workflow runs, and a wider window here would lock a version those
# installs refuse to resolve. Relative dates are fine: uv 0.11.8+ writes a
# sentinel timestamp to uv.lock for relative spans, so re-resolving never
# produces churn.
exclude-newer = "1 week"
# Per-package cooldown control. A fixed date holds a package at the version
# available then (the day after it shipped), so `uv lock --upgrade` keeps that
# version instead of tracking newer releases. `sync-uv-lock` freezes new
# bypasses at that date and prunes each entry once its held version ages past
# `exclude-newer`, returning the package to the normal cooldown. repomatic is
# pinned to git main (no PyPI release to freeze), so it keeps a permanent
# "0 day" span.
exclude-newer-package = { repomatic = "0 day" }
# Package is at root level, not in "./src/".
build-backend.module-root = ""
# Nuitka binary build options. repomatic translates this section to CLI flags
# at build time via `repomatic run nuitka` (Nuitka itself only reads it when
# acting as the wheel build backend: https://github.com/Nuitka/Nuitka/issues/2136).
# Values with spaces are fine: the tool runner passes them as a proper argv.
[tool.nuitka]
copyright = "Kevin Deldycke <kevin@deldycke.com> and contributors. Distributed under GPL-2.0-or-later license."
file-description = "🏭 Automate repository maintenance, releases, and CI/CD workflows"
# Numeric only: Nuitka rejects PEP 440 .devN suffixes. Kept in sync with the
# package version by the dedicated [tool.bumpversion] rule that strips the suffix.
file-version = "7.10.1"
include-data-dir = [
"repomatic/data/awesome_template=repomatic/data/awesome_template",
"repomatic/data/skills=repomatic/data/skills",
]
include-data-files = [
"repomatic/templates/*.md=repomatic/templates/",
]
# click-extra ships themes.toml as package data loaded via importlib.resources;
# Nuitka does not auto-bundle non-Python data files, so the binary crashes on
# startup unless it is declared here.
include-package-data = [ "click_extra" ]
# Each platform points at its native icon format (all rendered from
# favicon.svg). Passing a non-native image (like a PNG to
# --windows-icon-from-ico) makes Nuitka require the imageio package to convert
# it, which fails the build. Per-OS flags not matching the build host are ignored.
linux-icon = "docs/assets/icon.png"
macos-app-icon = "docs/assets/icon.icns"
product-name = "Repomatic"
product-version = "7.10.1"
windows-icon-from-ico = "docs/assets/icon.ico"
[tool.ruff]
preview = true
fix = true
# Disabled for the reasons documented in the bundled repomatic/data/ruff.toml.
unsafe-fixes = false
show-fixes = true
# Enable reformatting of code snippets in docstrings.
# https://docs.astral.sh/ruff/formatter/#docstring-formatting
format.docstring-code-format = true
# PLW1514: `open` and friends called without an explicit `encoding` argument.
# Windows defaults text I/O to cp1252, so a bare `open()`, `read_text()` or
# `write_text()` breaks on non-ASCII content, and only on Windows runners.
# Preview rule; its type inference misses unannotated `Path` locals, so
# PEP 597's `PYTHONWARNDEFAULTENCODING=1` remains the complete runtime net.
# See: https://docs.astral.sh/ruff/rules/unspecified-encoding/
lint.extend-select = [ "PLW1514" ]
# 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
# LOG015: Root logger calls (logging.info(), etc.).
# The CLI configures the root logger via Click, so root logger calls are intentional.
# See: https://docs.astral.sh/ruff/rules/root-logger-call/
lint.ignore = [ "D400", "ERA001", "LOG015" ]
lint.isort.combine-as-imports = true
# 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
# Report rule codes, not the human-readable names preview mode defaults to.
# See the bundled repomatic/data/ruff.toml for the rationale.
output-prefer-rule-codes = true
[tool.typos]
default.extend-identifiers = { Github = "GitHub", IOS = "iOS", Javascript = "JavaScript", MacOS = "macOS", PNGs = "PNGs", PyPi = "PyPI", Typescript = "TypeScript" }
# False positives. "Contribuer" is the French for "Contributing", part of the
# translated-readme fixture in tests/test_awesome_toc.py. "quater" is the fourth
# term of the Latin ordinal series numbering the repo-lint checks (bis, ter,
# quater), not a misspelling of "quarter": the unattended fix-typos job rewrote
# it once already and had to be reverted by hand.
default.extend-words = { astroid = "astroid", Contribuer = "Contribuer", oject = "oject", PNGs = "PNGs", quater = "quater", sur = "sur" }
# Skip content between <!-- typos:off --> and <!-- typos:on --> markers.
default.extend-ignore-re = [
"(?s)<!-- typos:off -->.*?<!-- typos:on -->",
# `{qeury}` is the intentional-typo example in the typos tool's own docs_notes
# guidance (tool_runner.py), which recommends downstream projects guard such
# examples and encoded hashes from the unattended fix-typos pull request.
"\\{qeury\\}",
'base32 "[0-9a-z]{52}"',
]
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: `nwo` should be `now`
# ╭▸ ./repomatic/github/release_sync.py:147:5
# │
# 147 │ nwo = f"{parts[-2]}/{parts[-1]}" if len(parts) >= 2 else ""
# ╰╴ ━━━
# Standard GitHub API term for "name with owner" (e.g. "owner/repo").
"nwo",
# error: `vulnerabilit` should be `vulnerability`
# ╭▸ ./repomatic/uv.py:82:55
# │
# 82 │ r"^(\S+)\s+(\S+)\s+has\s+\d+\s+known\s+vulnerabilit"
# ╰╴ ━━━━━━━━━━━━
# Intentional truncation to match both "vulnerability" and "vulnerabilities".
"vulnerabilit",
# error: `WARNIN` should be `WARNING`
# ╭▸ ./tests/test_changelog.py:565:46
# │
# 565 │ # Both sources available — NOTE only, no WARNINGs.
# ╰╴
"WARNIN",
]
[tool.mypy]
mypy_path = "docs"
check_untyped_defs = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_return_any = true
warn_unreachable = true
pretty = true
warn_unused_configs = true
overrides = [
{ module = [
"py_walk.*",
"sphinxcontrib.mermaid",
"vt",
], ignore_missing_imports = true },
]
[tool.pytest]
addopts = [
"--durations=10",
"--cov",
"--cov-report=term",
"--numprocesses=auto",
# Import test modules via importlib instead of prepending their root dir to
# sys.path. Avoids "import file mismatch" collection errors when an installed
# copy of the package coexists with the source tree, as in distro builds.
"--import-mode=importlib",
]
# https://docs.pytest.org/en/latest/customize.html#pyproject-toml
markers = [
"once: Tests that only need to run once, not across the full CI matrix.",
]
# Restrict collection to the test suite, so pytest never descends into the
# package or an installed copy of it in dual-copy builds.
testpaths = [ "tests" ]
# 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 = [ "repomatic" ]
# Coverage ratchet: the suite fails below this. The matrix floor sits near
# 81.6%, since the only cell-dependent tests (tests/test_sphinx_crossrefs.py)
# run on Linux + Python 3.14 alone and push that cell *up*; the package holds
# four platform-conditional lines total, so the OS spread is noise. ~1.6 points
# of margin absorbs that without waving a real regression through.
#
# The `once-tests` workflow job overrides this to 0, covering ~22% on its own
# by design. A focused local run trips it too, so pair those with `--no-cov`.
report.fail_under = 80
report.precision = 2
[tool.bumpversion]
current_version = "7.10.1.dev0"
# 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}",
]
ignore_missing_files = true
allow_dirty = true
parts.dev.optional_value = "release"
# 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" ]
[[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. Anchored to a line start (regex) so it
# does not also match version-suffixed keys like file-version/product-version
# under [tool.nuitka], which contain `version = "X"` as a substring (their
# values collide with the package version on release commits, where the .devN
# suffix is absent).
filename = "./pyproject.toml"
regex = true
search = '(?m)^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]]
# Keep the numeric file-version/product-version under [tool.nuitka] in sync,
# when present. Nuitka rejects PEP 440 .devN suffixes, so the file-specific
# serialize strips them; the `-version = "` prefix matches both keys at once.
# ignore_missing_version makes this a no-op in projects without [tool.nuitka].
filename = "./pyproject.toml"
ignore_missing_version = true
serialize = [ "{major}.{minor}.{patch}" ]
search = '-version = "{current_version}"'
replace = '-version = "{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. Anchored to a line start (regex) so
# it does not also match the `cff-version:` schema field, which would otherwise
# be overwritten with the package version on every bump as soon as the two
# values coincide once.
filename = "./citation.cff"
regex = true
search = "(?m)^version: {current_version}"
replace = "version: {new_version}"
[[tool.bumpversion.files]]
# Update the release date in the citation file.
filename = "./citation.cff"
regex = true
search = "date-released: \\d{{4}}-\\d{{2}}-\\d{{2}}"
replace = "date-released: {utcnow:%Y-%m-%d}"
[tool.lychee]
# https://lychee.cli.rs/guides/config/
exclude = [
# GitHub issue comment fragments are dynamically loaded and can't be verified.
"^https://github.com/.+/issues/[0-9]+#issuecomment-.*$",
# Release binary download URLs redirect to the GitHub CDN (objects.githubusercontent.com).
"^https://github.com/.+/releases/.+/download/.*$",
# Allow redirects of generic DOI URLs to their specific Zenodo release page.
"^https://doi.org/.+/zenodo.*$",
# Bitdefender returns 403 to bots.
"bitdefender\\.com",
# archive.ph rate-limits crawlers.
"archive\\.ph",
# npmjs.com returns 403 to bots.
"^https://www\\.npmjs\\.com/package/.*$",
# VirusTotal analysis pages are a JS app that rate-limits bots, and the
# binaries page links one per released binary.
"^https://www\\.virustotal\\.com/gui/.*$",
# star-history.com fragments are JS-rendered and invisible to lychee.
"^https://star-history\\.com/.*$",
# githubstatus.com returns 405 to HEAD requests from bots.
"githubstatus\\.com",
# Local intra-docs heading fragments are Sphinx cross-references, validated
# at doc build time via `myst_heading_anchors`. Lychee's GitHub-style slugger
# strips dots (`cache.dir` → `cachedir`) and cannot see MyST `(target)=`
# anchors, so it would false-positive links that resolve fine in the rendered
# docs. Anchored to `file://` so external `.../docs/*.md#` URLs stay checked.
"^file://.*/docs/[\\w.-]+\\.md#",
]
exclude_path = [
# Template files contain $variable placeholders that are not real URLs.
"repomatic/templates/",
]
[tool.repomatic]
abandoned-versions = [
"4.1.0",
"4.6.1",
"4.7.0",
"4.8.0",
"5.0.0",
"6.0.0",
"6.18.0",
]
changelog.archive-location = "./docs/changelog-archive.md"
exclude = [ "workflows" ]
# Render the Click command tree as roff `.1` files and attach a
# `repomatic-manpages.tar.gz` asset to every GitHub release. The script target
# mirrors `click_extra_manpages` in `docs/conf.py`, so the release tarball and
# the HTML docs site stay in lockstep.
manpages.script = "repomatic.cli:repomatic"
pypi-package-history = [ "gha-utils", "repokit" ]
# Claude Code plugin archive packed by release.yaml's pack-plugin job and
# attached to every GitHub release by the engine's extra-assets job. The
# marketplace at .claude-plugin/marketplace.json installs the plugin straight
# from this asset, so a release missing it breaks `/plugin install`.
release-assets = [ "repomatic-claude-plugin.zip" ]
[tool.actionlint]
# actionlint reads no pyproject section of its own: repomatic serializes this one
# to a temporary YAML config and passes it via `--config-file`. `paths` keys are
# globs relative to the repository root, and each `ignore` entry is a regular
# expression matched against the error message.
#
# `github.job_workflow_sha` is a real context property, holding the commit SHA of
# the reusable workflow file itself, which the tool-cache keys read so they do not
# rotate on every caller commit. GitHub documents it only as an OIDC token claim,
# never on the `github` context reference page, so actionlint's schema lacks it.
# Drop this entry once rhysd/actionlint#671 ships in a release.
#
# The glob carries no dot on purpose: click-extra expands every dotted key of
# `pyproject.toml`, and one starting with a dot makes it warn on each repomatic
# invocation. `**` matches dot-directories, so `.github/workflows/` is covered.
paths."**/workflows/*".ignore = [ 'property "job_workflow_sha" is not defined' ]
# actionlint validates a literal `runs-on:` against a built-in label list that
# does not yet carry GitHub's Ubuntu 26.04 preview images, so it rejects them as
# unknown. Declaring them here is the mechanism actionlint's own error message
# points to. They are ordinary GitHub-hosted images, not self-hosted runners:
# that key is simply where actionlint accepts a label it does not ship. Drop
# this entry once rhysd/actionlint#682 ships in a release. Meanwhile it opens no
# hole: a typo'd runner is still caught by `lint-repo`'s own check against
# KNOWN_RUNNERS.
self-hosted-runner.labels = [ "ubuntu-26.04", "ubuntu-26.04-arm" ]