MCPcopy Create free account
hub / github.com/CodeGraphContext/CodeGraphContext / resolve_node_id

Function resolve_node_id

src/codegraphcontext/core/simulator.py:9–20  ·  view source on GitHub ↗

Helper to get a unique identifier for a node based on its properties.

(row: Dict[str, Any])

Source from the content-addressed store, hash-verified

7
8
9def resolve_node_id(row: Dict[str, Any]) -> str:
10 """Helper to get a unique identifier for a node based on its properties."""
11 uid = row.get("uid")
12 if uid:
13 return str(uid)
14 path = row.get("path")
15 if path:
16 return str(path)
17 name = row.get("name")
18 if name:
19 return str(name)
20 return "unknown"
21
22
23class CodeGraphTwin:

Callers 2

test_resolve_node_idFunction · 0.90
load_from_dbMethod · 0.85

Calls 1

getMethod · 0.65

Tested by 1

test_resolve_node_idFunction · 0.72