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

Function _graph

tests/test_export_path_length.py:30–39  ·  view source on GitHub ↗
(labels: list[str])

Source from the content-addressed store, hash-verified

28
29
30def _graph(labels: list[str]) -> tuple[nx.Graph, dict[int, list[str]]]:
31 G = nx.Graph()
32 ids = []
33 for i, lab in enumerate(labels):
34 nid = f"n{i}"
35 G.add_node(nid, label=lab, file_type="code", source_file="x.py", community=0)
36 ids.append(nid)
37 for a, b in zip(ids, ids[1:]):
38 G.add_edge(a, b, relation="calls", confidence="EXTRACTED")
39 return G, {0: ids}
40
41
42def _fake_windows(monkeypatch):

Calls 2

add_nodeMethod · 0.95
add_edgeMethod · 0.95

Tested by

no test coverage detected