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

Function _extract

tests/test_python_forward_ref_file_id.py:24–33  ·  view source on GitHub ↗
(tmp_path: Path, files: dict[str, str])

Source from the content-addressed store, hash-verified

22
23
24def _extract(tmp_path: Path, files: dict[str, str]):
25 paths = []
26 for name, src in files.items():
27 p = tmp_path / name
28 p.write_text(src)
29 paths.append(p)
30 result = extract(paths, cache_root=tmp_path, root=tmp_path, parallel=False)
31 labels = {n["id"]: n["label"] for n in result["nodes"]}
32 edges = {(labels.get(e["source"]), e["relation"], labels.get(e["target"])) for e in result["edges"]}
33 return result, labels, edges
34
35
36def _check(result, labels, edges):

Calls 3

extractFunction · 0.90
itemsMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected