Skip to main content

Module ingest

Module ingest 

Source
Expand description

Batch ingestion — walk a directory tree, parse all Python files, build Arrow tables.

Two ingestion modes are available:

  • Generic (ingest_directory / ingest_files): uses parser::parse_python_file, emitting language-agnostic CodeNodeKind variants (File, Module, Class, Function, etc.). Backward-compatible with existing callers.

  • Python-specific (ingest_python_directory / Language::Python): uses PythonParser, emitting Python-specific kinds (PythonFunction, PythonClass, etc.) with full position metadata populated.

Usage:

// Generic (backward compat)
let result = ingest_directory(Path::new("brain/"))?;
println!("{}", result.summary());

// Python-specific with position metadata
let result = ingest_python_directory(Path::new("_archive/brain-v13/brain/"))?;
println!("{}", result.summary());

Structs§

IngestResult
Result of a full directory ingestion.

Enums§

IngestError
Errors from ingestion.
Language
Language selection for the ingest pipeline.

Functions§

callers_of
Query callers of a function/method by name.
ingest_directory
Ingest all Python and Rust files under a directory into a CodeGraph.
ingest_files
Ingest a specific list of source files (Python and Rust).
ingest_python_directory
Ingest all Python files under a directory using the Python-specific parser.
ingest_python_files
Ingest a specific list of Python files using the Python-specific parser.
nodes_in_file
Query nodes by file path (returns nodes whose ID contains the path).

Type Aliases§

Result