mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-13 15:03:23 -05:00
fix: state one catalog ratio, correct the faq
The home page and the stats export counted every file carrying a provenance record, the provenance page and the README only the system files. The site published 553 and 566 for the same quantity, one click apart, and the export paired the wider count with composition.systems as its denominator. common.count_catalog_matched is now the single source, scoped to the systems bucket. The FAQ had drifted from the profiles it describes: MAME pinned at 0.287 against 0.289 in mame.yml, Adler-32 attributed to Dolphin's IPL rather than the DSP ROMs that carry known_hash_adler32, and the per-emulator verbose report named as the only content check on an existence platform, which skips the DISCREPANCY line the platform report raises itself. Tests read both sides: no generator may count matches inline, and each FAQ claim is checked against the profile or the script that owns it.
This commit is contained in:
1 parent
022888e9ea
commit
fe77535c3b
5 files changed
+184
-52
No files matched your search
@@ -18,8 +18,8 @@ from datetime import datetime, timezone
|
||||
|
||||
sys.path.insert(0, os.path.dirname(__file__))
|
||||
from common import (
|
||||
GAME_DATA_TOPS,
|
||||
compute_composition,
|
||||
count_catalog_matched,
|
||||
list_registered_platforms,
|
||||
load_database,
|
||||
load_emulator_profiles,
|
||||
@@ -184,25 +184,13 @@ _CATALOG_LABELS = {"redump": "Redump", "no-intro": "No-Intro", "tosec": "TOSEC"}
|
||||
|
||||
|
||||
def _catalog_matched_line(db: dict) -> list[str]:
|
||||
"""Bullet line for files matched to dump-preservation catalogs.
|
||||
|
||||
Counted against the system files alone: those catalogs index console and
|
||||
computer dumps, so arcade ROM sets and engine data sit outside their
|
||||
scope and would only dilute the ratio.
|
||||
"""
|
||||
sources: set[str] = set()
|
||||
matched = 0
|
||||
for entry in db.get("files", {}).values():
|
||||
provenance = entry.get("provenance")
|
||||
if not provenance:
|
||||
continue
|
||||
sources.update(provenance)
|
||||
parts = entry.get("path", "").split("/")
|
||||
top = parts[1] if len(parts) > 1 else ""
|
||||
if top != "Arcade" and top not in GAME_DATA_TOPS:
|
||||
matched += 1
|
||||
"""Bullet line for files matched to dump-preservation catalogs."""
|
||||
matched = count_catalog_matched(db)
|
||||
if not matched:
|
||||
return []
|
||||
sources: set[str] = set()
|
||||
for entry in db.get("files", {}).values():
|
||||
sources.update(entry.get("provenance") or ())
|
||||
system_files = compute_composition(db)["systems"]["files"]
|
||||
labels = ", ".join(_CATALOG_LABELS.get(s, s) for s in sorted(sources))
|
||||
return [
|
||||
|
||||
Reference in new issue
Block a user