build_index
Build the RAG vector index over OpenFOAM tutorials, source headers, and docs.
Functions
-
build_index.should_skip_dir(dirname)[source]
- Parameters:
dirname (str)
- Return type:
bool
-
build_index.should_index_file(filepath, context)[source]
Decide whether to index this file.
- Parameters:
-
- Return type:
bool
-
build_index.chunk_text(text, filepath)[source]
Split text into chunks with overlap.
- Parameters:
-
- Return type:
list[str]
-
build_index.get_metadata(filepath, version, context)[source]
Build metadata for a file chunk.
- Parameters:
-
- Return type:
dict
-
build_index.walk_directory(root, context)[source]
Walk a directory tree, respecting skip rules.
- Parameters:
-
- Return type:
list[tuple[Path, str]]
-
build_index.collect_files()[source]
Collect all files to index from both OpenFOAM versions.
- Return type:
list[tuple[Path, str, str]]
-
build_index.build_index()[source]
Main index building function.