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

Class GraphBuilder

src/codegraphcontext/tools/graph_builder.py:34–1250  ·  view source on GitHub ↗

Build and manage the code graph. Provides a high-level facade over the indexing pipeline, including repository ingestion, file parsing, call resolution, and inheritance linking for Neo4j, FalkorDB, and Kùzu backends.

Source from the content-addressed store, hash-verified

32
33
34class GraphBuilder:
35 """Build and manage the code graph.
36
37 Provides a high-level facade over the indexing pipeline, including
38 repository ingestion, file parsing, call resolution, and inheritance
39 linking for Neo4j, FalkorDB, and Kùzu backends.
40 """
41
42 def __init__(self, db_manager: DatabaseManager, job_manager: JobManager, loop: asyncio.AbstractEventLoop):
43 """Initialize GraphBuilder.
44
45 Parameters
46 ----------
47 db_manager : DatabaseManager
48 Active database manager instance.
49 job_manager : JobManager
50 Job manager for tracking indexing progress.
51 loop : asyncio.AbstractEventLoop
52 Event loop for async operations.
53 """
54 self.db_manager = db_manager
55 self.job_manager = job_manager
56 self.loop = loop
57 self._writer = GraphWriter(self.db_manager.get_driver(), db_manager=self.db_manager)
58 self.last_call_resolution_diagnostics: list[Dict[str, Any]] = []
59 self.last_index_summary: Dict[str, Any] = {}
60 self.parsers = {
61 ".py": "python",
62 ".ipynb": "python",
63 ".js": "javascript",
64 ".jsx": "javascript",
65 ".mjs": "javascript",
66 ".cjs": "javascript",
67 ".go": "go",
68 ".ts": "typescript",
69 ".mts": "typescript",
70 ".cts": "typescript",
71 ".d.ts": "typescript",
72 ".tsx": "tsx",
73 ".cpp": "cpp",
74 ".h": "cpp",
75 ".hpp": "cpp",
76 ".hh": "cpp",
77 ".rs": "rust",
78 ".c": "c",
79 ".java": "java",
80 ".rb": "ruby",
81 ".cs": "c_sharp",
82 ".php": "php",
83 ".kt": "kotlin",
84 ".scala": "scala",
85 ".sc": "scala",
86 ".swift": "swift",
87 ".hs": "haskell",
88 ".dart": "dart",
89 ".pl": "perl",
90 ".pm": "perl",
91 ".lua": "lua",

Callers 4

index_fixtureFunction · 0.90
__init__Method · 0.85
switch_context_toolMethod · 0.85
_initialize_servicesFunction · 0.85

Calls

no outgoing calls

Tested by 1

index_fixtureFunction · 0.72