feat: publish source coverage beyond shipped cores

This commit is contained in:
Abdessamad Derraz committed 2026-08-08 07:00:46 +02:00
1 parent 09c43be11a
commit 3a4f8a5111
3 files changed
+39 -24

No files matched your search

+7 -2
View File
@@ -205,8 +205,9 @@ def generate_readme(db: dict, platforms_dir: str) -> str:
'platform'
])[-1]['platform']}.",
"",
f"**{total_files:,}** verified files across **{len(system_ids)}** systems,"
f" ready to extract into your emulator's BIOS directory.",
f"Pick your platform below and extract the pack: it carries every file"
f" its emulators load, read from their source code. Nothing to"
f" configure, nothing to hunt down.",
"",
"## Quick Install",
"",
@@ -289,6 +290,10 @@ def generate_readme(db: dict, platforms_dir: str) -> str:
" profile exists, the expected hashes and sizes are read from the"
" emulator's source code (the Source-backed column below).",
"",
f"- **{sum(c['total_missing'] for c in coverages.values())} files missing**"
f" from the packs: every file the platforms' emulators load is in the"
f" collection. Files needed only by emulators no platform ships yet"
f" are counted in the [gap analysis]({SITE_URL}gaps/)",
f"- **{len(coverages)} platforms** supported with platform-specific verification",
f"- **{emulator_count} emulators** profiled from source (RetroArch cores + standalone)",
f"- **{len(system_ids)} systems** covered (NES, SNES, PlayStation, Saturn, Dreamcast, ...)",
+17 -8
View File
@@ -1348,6 +1348,7 @@ def generate_emulator_page(
return True
src = _resolve_source(
fname, by_name, by_name_lower, data_names, by_path_suffix,
f, db_files,
)
if src is not None:
return True
@@ -1355,7 +1356,7 @@ def generate_emulator_page(
if path_field and path_field != fname:
src = _resolve_source(
path_field, by_name, by_name_lower, data_names,
by_path_suffix,
by_path_suffix, f, db_files,
)
if src is not None:
return True
@@ -1969,20 +1970,20 @@ def generate_gap_analysis(
for _name, cov in coverages.items():
matched = resolve_platform_cores(cov["config"], unique_profiles)
relevant_set.update(matched)
active_profiles = {
k: v for k, v in unique_profiles.items() if k in relevant_set
}
report = run_cross_reference(
active_profiles, declared, db,
# One pass over every profile, read twice: the packs' scope (emulators a
# platform ships) and the whole profiled corpus, so the two views cannot
# drift apart.
report_all = run_cross_reference(
unique_profiles, declared, db,
data_names=data_names, all_declared=all_declared,
)
report = {k: v for k, v in report_all.items() if k in relevant_set}
src_totals: dict[str, int] = {"bios": 0, "data": 0, "large_file": 0, "missing": 0}
total_undeclared = 0
emulator_gaps = []
for emu_name, data in sorted(report.items()):
for emu_name, data in sorted(report_all.items()):
if data["gaps"] == 0:
continue
total_undeclared += data["gaps"]
@@ -1990,6 +1991,8 @@ def generate_gap_analysis(
src_totals[key] += data.get(f"gap_{key}", 0)
emulator_gaps.append((emu_name, data))
shipped_missing = sum(d["gap_missing"] for d in report.values())
if total_undeclared > 0:
total_available = (
src_totals["bios"] + src_totals["data"] + src_totals["large_file"]
@@ -2008,6 +2011,12 @@ def generate_gap_analysis(
f"{total_available:,} available ({pct_available}), "
f"{src_totals['missing']} to source.",
"",
f"This counts every profiled emulator, including those no platform "
f"ships yet. Restricted to the emulators the platforms above do "
f"ship, {shipped_missing} of these files are absent, which is why "
f"the packs report no missing file. The rest are acquisition "
f"targets, named per emulator below.",
"",
"### Provenance",
"",
"| Source | Count | Description |",