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

Function source_identity

graphify/cache.py:2089–2101  ·  view source on GitHub ↗
(value: str | Path)

Source from the content-addressed store, hash-verified

2087 return norm
2088
2089 def source_identity(value: str | Path) -> Path:
2090 path = Path(value)
2091 if not path.is_absolute():
2092 path = root_walked / path
2093 elif root_walked != root_resolved:
2094 normalized = _normalize_path(Path(os.path.abspath(path)))
2095 try:
2096 relative = normalized.relative_to(root_resolved)
2097 except ValueError:
2098 pass
2099 else:
2100 path = root_walked / relative
2101 return _normalize_path(Path(os.path.abspath(path)))
2102
2103 return source_identity, normalize_value
2104

Callers 2

_item_identityFunction · 0.85
scope_semantic_resultFunction · 0.85

Calls 1

_normalize_pathFunction · 0.85

Tested by

no test coverage detected