Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ you move from a broad field to an individual tool without losing the surrounding
| Concepts | **1,580** |
| Typed relationships | **9,834** |
| Relationship types | **14** |
| Curated guided paths | **145** |
| Curated guided paths | **257** |
| Isolated nodes | **0** |

The largest relationship groups are **related to (3,241)**, **belongs to domain (3,082)**, **implements (778)**, **used for (640)**. Counts come from the checked-in
Expand Down
40 changes: 40 additions & 0 deletions backend/tests/test_content_3000.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
"""The content pass for the 3,000-node atlas (scripts/expand/content_3000.py) is fully
applied and its references stay valid against the compiled graph."""
from __future__ import annotations

import json
import subprocess
import sys
from pathlib import Path

ROOT = Path(__file__).resolve().parents[2]
SEED = ROOT / "data" / "seed"
SCRIPT = ROOT / "scripts" / "expand" / "content_3000.py"


def _seed(name):
return json.loads((SEED / name).read_text(encoding="utf-8"))


def test_content_pass_is_applied_and_valid():
result = subprocess.run([sys.executable, str(SCRIPT), "--check"], cwd=ROOT,
capture_output=True, text=True, check=False)
assert result.returncode == 0, result.stdout + result.stderr


def test_every_top_level_field_has_a_guided_path():
graph = json.loads((ROOT / "data" / "graph.json").read_text(encoding="utf-8"))
nodes = {n["id"]: n for n in graph["nodes"]}
domains = {n["id"] for n in graph["nodes"] if n["node_type"] == "domain"}
covered = set()
for path in _seed("journeys.json"):
for step in path["steps"]:
node = nodes[step["id"]]
covered.add(node["id"] if node["node_type"] == "domain" else node.get("primary_domain"))
assert sorted(domains - covered) == []


def test_role_ids_are_unique_and_every_role_has_four_stages():
roles = _seed("roles.json")
assert len({r["id"] for r in roles}) == len(roles)
assert all(len(r["stages"]) == 4 for r in roles)
382 changes: 374 additions & 8 deletions data/seed/apps.json

Large diffs are not rendered by default.

Loading
Loading