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

Function global_remove

graphify/global_graph.py:159–173  ·  view source on GitHub ↗

Remove all nodes for repo_tag from the global graph. Returns count removed.

(repo_tag: str)

Source from the content-addressed store, hash-verified

157
158
159def global_remove(repo_tag: str) -> int:
160 """Remove all nodes for repo_tag from the global graph. Returns count removed."""
161 from graphify.build import prune_repo_from_graph
162
163 manifest = _load_manifest()
164 if repo_tag not in manifest["repos"]:
165 raise KeyError(f"repo '{repo_tag}' not in global graph")
166
167 G = _load_global_graph()
168 removed = prune_repo_from_graph(G, repo_tag)
169 _save_global_graph(G)
170
171 del manifest["repos"][repo_tag]
172 _save_manifest(manifest)
173 return removed
174
175
176def global_list() -> dict:

Callers 2

test_global_removeFunction · 0.90

Calls 5

prune_repo_from_graphFunction · 0.90
_load_manifestFunction · 0.85
_load_global_graphFunction · 0.85
_save_global_graphFunction · 0.85
_save_manifestFunction · 0.85

Tested by 2

test_global_removeFunction · 0.72