#!/usr/bin/env python3 from pathlib import Path import json import re root = Path(__file__).resolve().parents[1] readme = (root / "README.md").read_text(encoding="utf-8") index = (root / "index.html").read_text(encoding="utf-8") required = [ root / "README.md", root / "index.html", root / "LICENSE", root / "assets/graph-classifier-map.png", root / "data/classification-network.json", root / "data/classification-network.graphml", root / "data/scenario-summary.json", ] for path in required: if not path.is_file() or path.stat().st_size == 0: raise SystemExit(f"FAIL: missing or empty file: {path}") assert "sdk: static" in readme assert "app_file: index.html" in readme short_description = next( line.split(":", 1)[1].strip() for line in readme.splitlines() if line.startswith("short_description:") ) assert len(short_description) <= 60, ( f"short_description is {len(short_description)} characters; " "maximum is 60" ) assert "GraphShieldMistral interactive policy-graph explorer" in index assert '