diff --git a/tools/checkin_check.py b/tools/checkin_check.py index 55fef1f..f0c8981 100644 --- a/tools/checkin_check.py +++ b/tools/checkin_check.py @@ -85,7 +85,6 @@ HEADING_RE = re.compile(r"^#{1,6}\s+(.*\S)\s*$") WANT_HEADINGS = ("did", "blocked", "next", "ask") FAULTS = ("BAD_NAME", "UNKNOWN_HANDLE", "BAD_DATE", "FUTURE", "EMPTY") -ADVISORY = ("MISSING_HEADINGS", "GAP") # Not a check-in, and never silently dropped: the directory's own README is # printed as SKIP so a reader can see it was seen and why it was not graded. SKIP_NAMES = {"README.md"} @@ -299,7 +298,7 @@ def banner(text: str) -> str: return f"== {text} ==" -def run(repo: str, path: str, roster, today: date, show_gaps: bool, quiet=False, +def run(path: str, roster, today: date, show_gaps: bool, since: str | None = None): """Everything except printing the file table. Returns the report dict.""" if not os.path.isdir(path): @@ -497,7 +496,7 @@ def selftest(): cell("c10 roster is the union of table and mailmap, and says so", roster == {"timmy", "zephyrus", "volt"} and "WIZARDS-TABLE.md" in src, f"{roster} / {src}") - rep = run(repo, ck, roster, today, True) + rep = run(ck, roster, today, True) by = {r["file"]: r for r in rep["rows"]} cell("c11 a conforming complete file has no class", by["2026-10-17-volt.md"]["class"] == [] @@ -550,7 +549,7 @@ def selftest(): rep["skipped"] == ["README.md"] and "README.md" not in [r["file"] for r in rep["rows"]] and rep["checked"] == 7, f"{rep['skipped']} {rep['checked']}") - rep_since = run(repo, ck, roster, today, False, since="2026-10-16") + rep_since = run(ck, roster, today, False, since="2026-10-16") cell("c25 --since grades forward only, and says how many it left out", rep_since["checked"] == 5 and rep_since["excluded_since"] == 3 and "2026-10-15-volt.md" not in [r["file"] for r in rep_since["rows"]], @@ -603,7 +602,7 @@ def main(argv=None): return 2 try: roster, src = load_roster(repo, a.roster) - rep = run(repo, path, roster, today, a.gaps, since=since) + rep = run(path, roster, today, a.gaps, since=since) except CannotGrade as exc: print(str(exc), file=sys.stderr) return 2