From 1d1555a31b2f6d07f86f2fc86d8477169a98e763 Mon Sep 17 00:00:00 2001 From: Jeroen Schweitzer Date: Thu, 26 Mar 2026 08:22:44 +0100 Subject: [PATCH] =?UTF-8?q?fix(tooling):=20atlas-verify=20=E2=80=94=20hand?= =?UTF-8?q?le=20binary/dwarf=20stars,=20exclude=20hand-authored=20systems?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - star_type check now skips binary systems (star_type="binary" is valid) - Strip dwarf prefixes (d, sd) before comparing spectral class letter - Case-insensitive comparison for lowercase spectral classes - Exclude GJ0.json (Sol) and GJ1221.json from verification (hand-authored) Co-Authored-By: Claude Opus 4.6 (1M context) --- tooling/atlas-verify | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/tooling/atlas-verify b/tooling/atlas-verify index 0438203a1..999f0c8f5 100755 --- a/tooling/atlas-verify +++ b/tooling/atlas-verify @@ -104,13 +104,16 @@ def verify_proposal(path: Path) -> list[str]: # 9. star_type vs spectral_class consistency star_type_field = p.get("star_type", "") spectral = p.get("spectral_class", "") - if star_type_field and spectral: - spectral_letter = spectral[0] if spectral else "" - if spectral_letter and star_type_field[0] != spectral_letter: - errors.append( - f"star_type '{star_type_field}' conflicts with " - f"spectral_class '{spectral}'" - ) + if star_type_field and spectral and star_type_field != "binary": + # Strip dwarf/subdwarf prefixes (d, sd) to get actual class letter + s = spectral.lstrip("sd").upper() + spectral_letter = s[0] if s else "" + if spectral_letter and spectral_letter.isalpha(): + if star_type_field[0].upper() != spectral_letter: + errors.append( + f"star_type '{star_type_field}' conflicts with " + f"spectral_class '{spectral}'" + ) return errors @@ -127,8 +130,13 @@ def main(): ) args = parser.parse_args() + # Sol is hand-authored with different rules (named uninhabited bodies, etc.) + EXCLUDE = {"GJ0.json", "GJ1221.json"} + total_errors = 0 for path in args.proposals: + if path.name in EXCLUDE: + continue if not path.exists(): print(f"SKIP — {path} not found") continue