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

Function _graph

tests/test_tree_html.py:32–41  ·  view source on GitHub ↗

Minimal node-link graph: one symbol node per {source_file: label}.

(files: dict[str, str])

Source from the content-addressed store, hash-verified

30
31
32def _graph(files: dict[str, str]) -> dict:
33 """Minimal node-link graph: one symbol node per {source_file: label}."""
34 return {
35 "directed": False,
36 "nodes": [
37 {"id": f"n{i}", "label": label, "source_file": src}
38 for i, (src, label) in enumerate(sorted(files.items()))
39 ],
40 "links": [],
41 }
42
43
44def _write_graph(tmp_path: Path, graph: dict) -> Path:

Calls 1

itemsMethod · 0.45

Tested by

no test coverage detected