feat(cli):Add support for .gitingest file processing in query ingestion #191
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Feature Documentation: .gitingest Ignore Patterns
This pull request includes changes to the
src/gitingest/query_ingestion.py
file to enhance the query ingestion process by applying ignore patterns from a.gitingest
file. The most important changes include importing thetomllib
library and adding a new function to handle the.gitingest
file.Enhancements to query ingestion:
src/gitingest/query_ingestion.py
: Imported thetomllib
library to read TOML files.src/gitingest/query_ingestion.py
: Added theapply_gitingest_file
function to read the.gitingest
file and update the query object with ignore patterns.Overview
This feature introduces support for a
.gitingest
configuration file in the project root directory that allows users to define file and directory ignore patterns using a TOML format. The.gitingest
file enables more flexible and customizable query ingestion by allowing users to exclude specific files or directories from being processed.Purpose
The primary goal of this feature is to provide users with a simple and effective way to define ignore patterns for files and directories that should not be ingested by the query ingestion process. This reduces unnecessary processing, improves performance, and allows for better control over the indexing of repository contents.
File Format
The
.gitingest
file is written in TOML format and consists of a[config]
section where users specify ignore patterns as a list.Example
.gitingest
File:Explanation of Fields:
README.md
) will be ignored.tests/
) will cause all files inside the directory to be ignored.*.log
) allow for flexible filtering of file types.docs/*.md
) allow filtering within specific subdirectories.Future Enhancements
.gitingest
to be placed in subdirectories for more granular control.By implementing the
.gitingest
file support, this feature significantly improves the usability and efficiency of the query ingestion system ingitingest
.