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.pyfile to enhance the query ingestion process by applying ignore patterns from a.gitingestfile. The most important changes include importing thetomlliblibrary and adding a new function to handle the.gitingestfile.Enhancements to query ingestion:
src/gitingest/query_ingestion.py: Imported thetomlliblibrary to read TOML files.src/gitingest/query_ingestion.py: Added theapply_gitingest_filefunction to read the.gitingestfile and update the query object with ignore patterns.Overview
This feature introduces support for a
.gitingestconfiguration file in the project root directory that allows users to define file and directory ignore patterns using a TOML format. The.gitingestfile 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
.gitingestfile is written in TOML format and consists of a[config]section where users specify ignore patterns as a list.Example
.gitingestFile: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
.gitingestto be placed in subdirectories for more granular control.By implementing the
.gitingestfile support, this feature significantly improves the usability and efficiency of the query ingestion system ingitingest.