diff --git a/scripts/generate_readme.py b/scripts/generate_readme.py index 9a959bad..83a1814e 100644 --- a/scripts/generate_readme.py +++ b/scripts/generate_readme.py @@ -273,15 +273,17 @@ def generate_readme(db: dict, platforms_dir: str) -> str: for name, cov in sorted(coverages.items(), key=lambda x: x[1]["platform"]): pct = f"{cov['percentage']:.1f}%" gt = cov["ground_truth"] - gt_pct = ( - f"{gt['with_validation'] / gt['total'] * 100:.0f}%" - if gt["total"] - else "0%" - ) + if not gt.get("applicable", True): + gt_cell = "-" + elif gt["total"]: + gt_pct = f"{gt['with_validation'] / gt['total'] * 100:.0f}%" + gt_cell = f"{gt['with_validation']}/{gt['total']} ({gt_pct})" + else: + gt_cell = "0/0" lines.append( f"| {cov['platform']} | {cov['present']}/{cov['total']} ({pct}) | " f"{cov['verified']} | {cov['untested']} | {cov['missing']} | " - f"{gt['with_validation']}/{gt['total']} ({gt_pct}) |" + f"{gt_cell} |" ) lines.extend( @@ -291,7 +293,8 @@ def generate_readme(db: dict, platforms_dir: str) -> str: " using that platform's own verification mode.", "Source-backed counts the files whose expectations were also read" " from an emulator's source code; the rest rely on the platform" - " list alone.", + " list alone. A dash means no profiled emulator applies to the" + " platform, whose own source is then the only authority.", "Where platform lists and emulator source code disagree, the" f" differences are tracked in the [gap analysis]({SITE_URL}gaps/).", "", diff --git a/scripts/generate_site.py b/scripts/generate_site.py index d57de183..516e7f0a 100644 --- a/scripts/generate_site.py +++ b/scripts/generate_site.py @@ -1539,11 +1539,13 @@ def generate_gap_analysis( else str(u) ) gt = cov["ground_truth"] - gt_pct = ( - f"{gt['with_validation'] / gt['total'] * 100:.0f}%" - if gt["total"] - else "0%" - ) + if not gt.get("applicable", True): + gt_cell = "-" + elif gt["total"]: + gt_pct = f"{gt['with_validation'] / gt['total'] * 100:.0f}%" + gt_cell = f"{gt['with_validation']}/{gt['total']} ({gt_pct})" + else: + gt_cell = "0/0" lines.append( f"| [{display}](platforms/{pname}.md) " f"| {cov['total']} " @@ -1551,7 +1553,7 @@ def generate_gap_analysis( f"| {untested_str} " f"| {missing_str} " f"| {cov['mode']} " - f"| {gt['with_validation']}/{gt['total']} ({gt_pct}) |" + f"| {gt_cell} |" ) lines.extend([ "", @@ -1560,7 +1562,8 @@ def generate_gap_analysis( "measure the repository against the file list each platform declares. " "Source-backed counts the files whose expectations were also read " "from an emulator's source code; the rest rely on the platform list " - "alone.", + "alone. A dash means no profiled emulator applies to the platform, " + "whose own source is then the only authority.", "", ]) diff --git a/scripts/verify.py b/scripts/verify.py index b9c13103..90ee335e 100644 --- a/scripts/verify.py +++ b/scripts/verify.py @@ -855,6 +855,7 @@ def verify_platform( "with_validation": with_validation, "platform_only": total - with_validation, "total": total, + "applicable": bool(resolve_platform_cores(config, profiles)), }, }