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

Function _file_node_id

graphify/extract.py:276–283  ·  view source on GitHub ↗

File-level node ID matching the skill.md spec: ``{parent_dir}_{stem}`` — one parent directory level, no extension. ``rel_path`` MUST be relative to the project root so top-level files collapse to a bare stem (``setup.py`` -> ``setup``) instead of picking up the root directory name. This

(rel_path: Path)

Source from the content-addressed store, hash-verified

274
275
276def _file_node_id(rel_path: Path) -> str:
277 """File-level node ID matching the skill.md spec: ``{parent_dir}_{stem}`` —
278 one parent directory level, no extension. ``rel_path`` MUST be relative to
279 the project root so top-level files collapse to a bare stem (``setup.py`` ->
280 ``setup``) instead of picking up the root directory name. This must equal the
281 ID semantic subagents generate, or AST and semantic extraction split a file
282 into two disconnected ghost nodes (#1033)."""
283 return _make_id(_file_stem(rel_path))
284
285
286def _python_absolute_import_alias_files(paths, root) -> tuple[dict[str, set[str]], set[str]]:

Calls 2

_make_idFunction · 0.90
_file_stemFunction · 0.85