Functions | |
| list | normalize (list paths, Path workspace, str run_id) |
| Replace unstable path components with logical tokens. | |
| dict | run_plan (Path workspace, Path case_dir, str monitor, list extra, str post="post.yml") |
| Invoke the dry-run planner for one scenario and return its raw plan. | |
| Path | init_case (Path workspace) |
| Initialize a shipped case inside a scenario workspace. | |
| str | flat_post_recipe (Path case_dir) |
| Write a post recipe requesting a non-canonical output directory. | |
| dict | map_to_identities (list artifacts, dict contract) |
| Map each normalized artifact token onto a declared logical identity. | |
| dict | build_snapshot () |
| Build the normalized topology snapshot across scenarios. | |
| int | main () |
| Write or verify the artifact topology snapshot. | |
Variables | |
| REPO_ROOT = Path(__file__).resolve().parents[2] | |
| str | CONTRACT_PATH = REPO_ROOT / "tests" / "tooling" / "artifact_topology.json" |
| str | SNAPSHOT_PATH = REPO_ROOT / "docs" / "generated" / "artifact_topology_snapshot.json" |
| str | PICURV = REPO_ROOT / "picurv_cli" / "picurv" |
Extract a normalized run-artifact topology snapshot from the CLI's own planner.
Replace unstable path components with logical tokens.
The workspace root, the generated run id, and any embedded timestamp differ on every invocation. Fingerprinting the raw plan would therefore report drift on every run; fingerprinting the normalized shape reports drift only when the topology actually changes.
| [in] | paths | Planned artifact paths. |
| [in] | workspace | Temporary workspace root used for the plan. |
| [in] | run_id | Generated run identifier. |
Definition at line 23 of file extract_artifact_topology.py.
| dict extract_artifact_topology.run_plan | ( | Path | workspace, |
| Path | case_dir, | ||
| str | monitor, | ||
| list | extra, | ||
| str | post = "post.yml" |
||
| ) |
Invoke the dry-run planner for one scenario and return its raw plan.
| [in] | workspace | Scenario workspace. |
| [in] | case_dir | Directory holding the initialized case. |
| [in] | monitor | Monitor file name inside the case directory. |
| [in] | extra | Additional CLI arguments for the scenario. |
| [in] | post | Post recipe file name inside the case directory. |
| RuntimeError | when the planner fails. |
Definition at line 46 of file extract_artifact_topology.py.
| Path extract_artifact_topology.init_case | ( | Path | workspace | ) |
Initialize a shipped case inside a scenario workspace.
| [in] | workspace | Scenario workspace. |
| RuntimeError | when initialization fails. |
Definition at line 74 of file extract_artifact_topology.py.
| str extract_artifact_topology.flat_post_recipe | ( | Path | case_dir | ) |
Write a post recipe requesting a non-canonical output directory.
Runtime path injection must replace this request with the stable output/visualization/<recipe_id> home.
| [in] | case_dir | Case directory to write into. |
Definition at line 91 of file extract_artifact_topology.py.
| dict extract_artifact_topology.map_to_identities | ( | list | artifacts, |
| dict | contract | ||
| ) |
Map each normalized artifact token onto a declared logical identity.
An artifact the contract does not name is reported rather than ignored: an unmapped path is a documented-layout gap, which is exactly what a topology contract exists to surface.
| [in] | artifacts | Normalized artifact tokens. |
| [in] | contract | Parsed topology contract. |
unmapped list. Definition at line 107 of file extract_artifact_topology.py.
| dict extract_artifact_topology.build_snapshot | ( | ) |
Build the normalized topology snapshot across scenarios.
Definition at line 169 of file extract_artifact_topology.py.
| int extract_artifact_topology.main | ( | ) |
Write or verify the artifact topology snapshot.
Definition at line 208 of file extract_artifact_topology.py.
| extract_artifact_topology.REPO_ROOT = Path(__file__).resolve().parents[2] |
Definition at line 17 of file extract_artifact_topology.py.
| str extract_artifact_topology.CONTRACT_PATH = REPO_ROOT / "tests" / "tooling" / "artifact_topology.json" |
Definition at line 18 of file extract_artifact_topology.py.
| str extract_artifact_topology.SNAPSHOT_PATH = REPO_ROOT / "docs" / "generated" / "artifact_topology_snapshot.json" |
Definition at line 19 of file extract_artifact_topology.py.
| str extract_artifact_topology.PICURV = REPO_ROOT / "picurv_cli" / "picurv" |
Definition at line 20 of file extract_artifact_topology.py.