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

Function load_platforms

tools/skillgen/gen.py:301–324  ·  view source on GitHub ↗

Parse platforms.toml into Platform records, keyed by platform name.

()

Source from the content-addressed store, hash-verified

299
300
301def load_platforms() -> dict[str, Platform]:
302 """Parse platforms.toml into Platform records, keyed by platform name."""
303 data = tomllib.loads(PLATFORMS_TOML.read_text(encoding="utf-8"))
304 out: dict[str, Platform] = {}
305 for key, cfg in data.get("platform", {}).items():
306 out[key] = Platform(
307 key=key,
308 bucket=cfg["bucket"],
309 skill_dst=cfg["skill_dst"],
310 core=cfg.get("core"),
311 refs_dst=cfg.get("refs_dst"),
312 name=cfg.get("name", "graphify"),
313 description=cfg.get("description"),
314 trigger=cfg.get("trigger"),
315 dispatch=cfg.get("dispatch"),
316 extraction=cfg.get("extraction", "verbose"),
317 shell=cfg.get("shell", "posix"),
318 claude_md=bool(cfg.get("claude_md", False)),
319 hooks_variant=cfg.get("hooks_variant", "claude-md"),
320 extra_sections=tuple(cfg.get("extra_sections", [])),
321 monolith=cfg.get("monolith"),
322 roundtrip_ref=cfg.get("roundtrip_ref"),
323 )
324 return out
325
326
327def _read_fragment(rel: str) -> str:

Callers 1

mainFunction · 0.85

Calls 3

PlatformClass · 0.85
itemsMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected