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

Function load_platforms

tools/skillgen/gen.py:349–372  ·  view source on GitHub ↗

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

()

Source from the content-addressed store, hash-verified

347
348
349def load_platforms() -> dict[str, Platform]:
350 """Parse platforms.toml into Platform records, keyed by platform name."""
351 data = tomllib.loads(PLATFORMS_TOML.read_text(encoding="utf-8"))
352 out: dict[str, Platform] = {}
353 for key, cfg in data.get("platform", {}).items():
354 out[key] = Platform(
355 key=key,
356 bucket=cfg["bucket"],
357 skill_dst=cfg["skill_dst"],
358 core=cfg.get("core"),
359 refs_dst=cfg.get("refs_dst"),
360 name=cfg.get("name", "graphify"),
361 description=cfg.get("description"),
362 trigger=cfg.get("trigger"),
363 dispatch=cfg.get("dispatch"),
364 extraction=cfg.get("extraction", "verbose"),
365 shell=cfg.get("shell", "posix"),
366 claude_md=bool(cfg.get("claude_md", False)),
367 hooks_variant=cfg.get("hooks_variant", "claude-md"),
368 extra_sections=tuple(cfg.get("extra_sections", [])),
369 monolith=cfg.get("monolith"),
370 roundtrip_ref=cfg.get("roundtrip_ref"),
371 )
372 return out
373
374
375def _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