diff --git a/scripts/sitegen/diagrams.py b/scripts/sitegen/diagrams.py index 56931f923..188fbc9ba 100644 --- a/scripts/sitegen/diagrams.py +++ b/scripts/sitegen/diagrams.py @@ -19,6 +19,7 @@ from core.paths import REPO_ROOT from core.text import count_text from model import siteinputs from sitegen import markup +from orchestrate.labels import STEP_LABELS PLACEHOLDER = re.compile(r"(?m)^([ \t]*)[ \t]*$") @@ -595,21 +596,8 @@ def _minui_narrow() -> tuple[float, float, list[str]]: def _pipeline_boxes() -> list[Box]: - """The steps pipeline.py runs, read from the STEP_LABELS literal of its step list.""" - tree = ast.parse((REPO_ROOT / "scripts" / "orchestrate" / "labels.py").read_text(encoding="utf-8")) - for node in ast.walk(tree): - if isinstance(node, ast.Assign): - target: ast.expr = node.targets[0] - value: ast.expr | None = node.value - elif isinstance(node, ast.AnnAssign): - target, value = node.target, node.value - else: - continue - if isinstance(target, ast.Name) and target.id == "STEP_LABELS" and value is not None: - labels = ast.literal_eval(value) - break - else: - raise RuntimeError("STEP_LABELS not found in scripts/orchestrate/labels.py") + """The steps pipeline.py runs, numbered as the run prints them.""" + labels = STEP_LABELS boxes = [] for label in labels.values(): number, title = label.split(" ", 1) diff --git a/tests/test_layers.py b/tests/test_layers.py index 69a70c5b4..bc3a38611 100644 --- a/tests/test_layers.py +++ b/tests/test_layers.py @@ -40,8 +40,9 @@ SIBLING_IMPORTS: dict[str, frozenset[str]] = { "romrecipes": frozenset(), # The site prints the recipe counts and the dump-catalog coverage report # those two packages compute, serves the handheld launchers and prints the - # CI checks. The logo copier downloads through the scrapers' fetch_bytes. - "sitegen": frozenset({"acquire", "packs", "romrecipes", "installer_build", "devtools", "scraper"}), + # CI checks. The logo copier downloads through the scrapers' fetch_bytes, + # and the pipeline diagram numbers its steps from the run's own labels. + "sitegen": frozenset({"acquire", "packs", "romrecipes", "installer_build", "devtools", "scraper", "orchestrate"}), # The record names its packs as the pack builder does. "release": frozenset({"packs"}), # The launcher archives are written by the pack member writer.