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

Function _graph_file

tests/test_compact_graph_json.py:40–49  ·  view source on GitHub ↗
(path: Path, node_ids, edges=(), *, indent=None)

Source from the content-addressed store, hash-verified

38
39
40def _graph_file(path: Path, node_ids, edges=(), *, indent=None) -> dict:
41 data = {
42 "directed": False, "multigraph": False, "graph": {},
43 "nodes": [_node(n) for n in node_ids],
44 "links": [{"source": s, "target": t, "relation": "calls", "confidence": "EXTRACTED",
45 "source_file": "a.py"} for s, t in edges],
46 }
47 path.parent.mkdir(parents=True, exist_ok=True)
48 path.write_text(json.dumps(data, indent=indent), encoding="utf-8")
49 return data
50
51
52def _corpus(tmp_path: Path) -> Path:

Calls 1

_nodeFunction · 0.70

Tested by

no test coverage detected