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

Function _write_graph

tests/test_explain_cli.py:8–32  ·  view source on GitHub ↗
(tmp_path)

Source from the content-addressed store, hash-verified

6
7
8def _write_graph(tmp_path):
9 graph_data = {
10 "directed": False, "multigraph": False, "graph": {},
11 "nodes": [
12 {"id": "validate", "label": "validateSanitySession()",
13 "source_file": "server/sanity-validate-session.ts", "community": 0},
14 {"id": "create_patch", "label": "createPatchHandler()",
15 "source_file": "server/create-patch-handler.ts", "community": 0},
16 {"id": "create_edit", "label": "createEditHandler()",
17 "source_file": "server/create-edit-handler.ts", "community": 0},
18 {"id": "stable_stringify", "label": "stableStringify()",
19 "source_file": "shared/stringify.ts", "community": 0},
20 ],
21 "links": [
22 {"source": "create_patch", "target": "validate",
23 "relation": "calls", "confidence": "EXTRACTED"},
24 {"source": "create_edit", "target": "validate",
25 "relation": "calls", "confidence": "EXTRACTED"},
26 {"source": "validate", "target": "stable_stringify",
27 "relation": "calls", "confidence": "EXTRACTED"},
28 ],
29 }
30 p = tmp_path / "graph.json"
31 p.write_text(json.dumps(graph_data))
32 return p
33
34
35def _run(monkeypatch, graph_path, label, capsys):

Calls

no outgoing calls

Tested by

no test coverage detected