MCPcopy Create free account
hub / github.com/Open-Quant/openquant / load_module_map

Function load_module_map

scripts/afml_docs_loop.py:90–97  ·  view source on GitHub ↗

Map module name -> slug from docs-site/src/data/moduleDocs.ts.

()

Source from the content-addressed store, hash-verified

88
89
90def load_module_map() -> dict[str, str]:
91 """Map module name -> slug from docs-site/src/data/moduleDocs.ts."""
92 text = MODULE_DOCS_PATH.read_text(encoding="utf-8")
93 pairs = re.findall(r"slug:\s*\"([^\"]+)\"\s*,\s*module:\s*\"([^\"]+)\"", text, flags=re.DOTALL)
94 mapping = {module: slug for slug, module in pairs}
95 if not mapping:
96 raise RuntimeError(f"No module docs parsed from {MODULE_DOCS_PATH}")
97 return mapping
98
99
100def summarize_hit(hit: dict[str, Any]) -> dict[str, Any]:

Callers 1

build_stateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected