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

Function _graph_data

tests/test_explain_same_file_tie.py:38–50  ·  view source on GitHub ↗
(reverse: bool = False)

Source from the content-addressed store, hash-verified

36
37
38def _graph_data(reverse: bool = False) -> dict:
39 nodes = [
40 {"id": i, "label": lbl, "source_file": sf, "source_location": loc}
41 for i, lbl, sf, loc in _NODES
42 ]
43 return {
44 "directed": False, "multigraph": False, "graph": {},
45 "nodes": list(reversed(nodes)) if reverse else nodes,
46 "links": [
47 {"source": a, "target": b, "relation": rel, "confidence": "EXTRACTED"}
48 for a, b, rel in _LINKS
49 ],
50 }
51
52
53def _write(tmp_path, reverse: bool = False):

Callers 2

_writeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected