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

Function _write_nodes

tests/test_path_cli.py:421–434  ·  view source on GitHub ↗
(tmp_path, nodes, links)

Source from the content-addressed store, hash-verified

419
420
421def _write_nodes(tmp_path, nodes, links):
422 gp = tmp_path / "graph.json"
423 gp.write_text(json.dumps({
424 "directed": False, "multigraph": False, "graph": {},
425 "nodes": [
426 {"id": i, "label": lbl, "source_file": sf, "source_location": loc}
427 for i, lbl, sf, loc in nodes
428 ],
429 "links": [
430 {"source": a, "target": b, "relation": rel, "confidence": "EXTRACTED"}
431 for a, b, rel in links
432 ],
433 }))
434 return gp
435
436
437def _same_file_twin_graph(tmp_path):

Calls

no outgoing calls

Tested by

no test coverage detected