Keep configs in ~/.config/build-release/ and tool state in ~/.local/state/build-release/, under XDG_* where set
CI / tests (pull_request) Successful in 6m34s

This commit is contained in:
2026-12-03 18:56:28 +01:00
parent 20c83f861f
commit 1ca2c8efe0
142 changed files with 1095 additions and 933 deletions
+4 -3
View File
@@ -1,5 +1,6 @@
import functools
import hashlib
from collections.abc import Mapping
import pathlib
import subprocess
import sys
@@ -20,15 +21,15 @@ OWN = RELEASE_ROOT
OWN_CHECK_SECONDS = 20
def todo_breaches(directory: str, home: pathlib.Path, own: pathlib.Path = OWN, seconds: float = OWN_CHECK_SECONDS) -> list[Breach]:
def todo_breaches(directory: str, home: pathlib.Path, env: Mapping[str, str], own: pathlib.Path = OWN, seconds: float = OWN_CHECK_SECONDS) -> list[Breach]:
"""Why the plan of directory's project is not ranked, where the plan has changed; the plan is the todo.md its config names. directory may also be in a config's folder, a git repo of its own."""
top = guarded_git(directory, "rev-parse", "--show-toplevel")
if isinstance(top, Failure):
return []
held_here = held(pathlib.Path(top), home)
held_here = held(pathlib.Path(top), home, env)
if held_here is not None:
return folder_breaches(top, held_here, own, seconds)
config = located(top, home, functools.partial(git, guarded=True))
config = located(top, home, env, functools.partial(git, guarded=True))
if isinstance(config, Failure):
# A checkout whose todo.md changes with no config is one whose config is still to write. An unchanged todo.md may be a third party's, whose clone needs no config.
unconfigured = pathlib.Path(top) / "todo.md"