mirror of
https://github.com/kuhyx/utils.git
synced 2026-11-10 18:47:20 +01:00
Match dated backups by shape, not by hardcoded name
Some checks are pending
dependency freshness / dependencies on newest stable (push) Waiting to run
file length / file-length (push) Waiting to run
md-naming / markdown naming convention (push) Waiting to run
palette drift / palette (push) Waiting to run
shared gate tests / gate unit tests (push) Waiting to run
Some checks are pending
dependency freshness / dependencies on newest stable (push) Waiting to run
file length / file-length (push) Waiting to run
md-naming / markdown naming convention (push) Waiting to run
palette drift / palette (push) Waiting to run
shared gate tests / gate unit tests (push) Waiting to run
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
b42737f834
commit
675b3859b3
@ -14,6 +14,7 @@ from __future__ import annotations
|
||||
|
||||
import re
|
||||
|
||||
|
||||
#: The four namespaces. A markdown file in a kuhy-owned repo must match one.
|
||||
#:
|
||||
#: README -- what this directory is and how to run it.
|
||||
@ -82,8 +83,15 @@ EXEMPT_SUBPATHS = (
|
||||
"/android/app/src/",
|
||||
)
|
||||
|
||||
#: A dated backup is never a live repo, so its markdown is not ours to name.
|
||||
#: Matched by *shape* rather than by listing each one: the 2026-09-11 ~
|
||||
#: reorganisation renamed every backup into ~/archive/YYYY-MM-DD-<name>, which
|
||||
#: silently invalidated the hand-listed
|
||||
#: "screen-locker-backup-20260705-200741" and left this gate red on main.
|
||||
DATED_BACKUP = re.compile(r"^\d{4}-\d{2}-\d{2}-")
|
||||
|
||||
#: Repos under ~ that are clones of other people's work, in addition to the
|
||||
#: shared THIRD_PARTY_REPOS list. A dated backup clone is not a live repo.
|
||||
#: shared THIRD_PARTY_REPOS list.
|
||||
EXTRA_THIRD_PARTY = frozenset(
|
||||
{
|
||||
# Dotfile clones of other people's projects. These live outside ~/*/
|
||||
@ -96,7 +104,6 @@ EXTRA_THIRD_PARTY = frozenset(
|
||||
".pyenv",
|
||||
".fzf",
|
||||
".tmux",
|
||||
"screen-locker-backup-20260705-200741",
|
||||
"flax-editor",
|
||||
"flax-mcp-test",
|
||||
"diet-guard-peer-backup",
|
||||
|
||||
@ -22,6 +22,7 @@ from md_naming._tables import (
|
||||
ALLOWED_PATTERN,
|
||||
COMMUNITY_NAMES,
|
||||
EXEMPT_SUBPATHS,
|
||||
DATED_BACKUP,
|
||||
EXTRA_THIRD_PARTY,
|
||||
HARNESS_NAMES,
|
||||
MARKER,
|
||||
@ -51,7 +52,7 @@ def is_third_party(path: Path) -> bool:
|
||||
"""
|
||||
parts = path.as_posix().split("/")
|
||||
repos = THIRD_PARTY_REPOS | EXTRA_THIRD_PARTY
|
||||
return any(part in repos for part in parts)
|
||||
return any(part in repos for part in parts) or any(DATED_BACKUP.match(part) for part in parts)
|
||||
|
||||
|
||||
def is_vendored(path: Path) -> bool:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user