MCPcopy Create free account
hub / github.com/Graphify-Labs/graphify / _theme

Function _theme

tests/test_liquid_extractor.py:27–36  ·  view source on GitHub ↗

Write a synthetic theme (always with layout/theme.liquid) and return its root.

(tmp_path: Path, files: dict[str, str])

Source from the content-addressed store, hash-verified

25
26
27def _theme(tmp_path: Path, files: dict[str, str]) -> Path:
28 """Write a synthetic theme (always with layout/theme.liquid) and return its root."""
29 root = tmp_path / "theme"
30 root.mkdir()
31 base = {"layout/theme.liquid": "{{ content_for_layout }}\n"}
32 for rel, body in {**base, **files}.items():
33 p = root / rel
34 p.parent.mkdir(parents=True, exist_ok=True)
35 p.write_text(body, encoding="utf-8")
36 return root
37
38
39def _edges(root: Path, rel: str) -> list[dict]:

Calls 1

itemsMethod · 0.45

Tested by

no test coverage detected