fix: run retired_files through run_cli

The new script's entry point skipped run_cli and its options were in no
tools.md row, which two suite checks hold every tracked script to.
This commit is contained in:
Abdessamad Derraz committed 2026-11-06 05:18:11 +01:00
1 parent acd2ef31fd
commit f12ba5632b
2 files changed
+5 -6

No files matched your search

+4 -6
View File
@@ -24,6 +24,9 @@ import subprocess
import sys
from pathlib import Path
sys.path.insert(0, str(Path(__file__).parent))
from common import run_cli, write_if_changed # noqa: E402
REPO_ROOT = Path(__file__).resolve().parents[1]
RETIRED_FILE = REPO_ROOT / "retired.json"
# The commit that published content addresses: 0d586ef6b, 2026-10-19.
@@ -95,8 +98,6 @@ def dump(records: dict[str, dict]) -> str:
def update(path: Path, old: dict, new: dict, day: str) -> int:
"""Records what *new* dropped from *old*. Returns how many left now."""
from common import write_if_changed # noqa: PLC0415
left = retired_between(old, new, day)
record = load(path)
merged = merge(record, left, new)
@@ -136,9 +137,6 @@ def main() -> int:
if not args.backfill:
parser.print_help()
return 2
sys.path.insert(0, str(Path(__file__).parent))
from common import write_if_changed # noqa: PLC0415
records = backfill()
current = json.loads((REPO_ROOT / "database.json").read_text(encoding="utf-8"))
records = merge(records, {}, current)
@@ -148,4 +146,4 @@ def main() -> int:
if __name__ == "__main__":
sys.exit(main())
run_cli(main)
+1
View File
@@ -1328,6 +1328,7 @@ before a release (wiki/release-process.md). Its lines stay in
| Script | Purpose |
|--------|---------|
| `common.py` | Shared library: hash computation, file resolution, platform config loading, emulator profiles, target filtering |
| `retired_files.py` | The record of files that left the collection, `retired.json`, which `generate_db.py` appends to and the site's lookup reads. `--backfill` rebuilds it from the history of `database.json` since content addresses were published (`--output` names another file) |
| `dedup.py` | Deduplicate `bios/` (`--dry-run`, `--bios-dir`): byte-identical copies are deleted and one kept. Identical MAME sets under other names stay one file, named in `_mame_clones.json`. Trees addressed by path are left alone (`NODEDUP_DIRS`), under a folder of that name at any depth: BBK, Bungie, C-Dogs SDL, Ikemen GO, mame, PinMAME, RPG Maker, ScummVM, Softdisk, TheXTech, splitwolf, Theme Hospital, c64-emu, opentyrian, tzdata |
| `identity.py` | One content filed under two identities: groups `bios/` by content and reports a group that crosses manufacturers outside `KNOWN_SHARED` (`--strict` exits 1, pipeline step 3a) |
| `slots.py` | Destinations the platform and a core both claim, and how the pack settles each (`--platform`, `--include-archived`, `--target`, `--json`, `--strict`, and pipeline step 3b passes the run's own `--include-archived` and `--target`) |