Enhance CLI argument parsing and add max file lines option for context splitting #5
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.
This pull request introduces several changes to the
repo_context
module, primarily focusing on adding functionality to split context files based on a maximum number of lines and updating related tests. The most important changes include modifying theconvert
method to support splitting context files, updating the CLI to accept a new argument for the maximum number of lines, and adding comprehensive tests for the new functionality.Changes to
repo_context/cli.py
:--output
argument to specify an output directory instead of a file path.--max-file-lines
to specify the maximum number of lines in context files.main
function to handle multiple context files and write each to a separate file.Changes to
repo_context/repo_converter.py
:convert
method to support splitting context files based on the maximum number of lines. [1] [2]_split_context
to handle the logic for splitting context files.Changes to
tests/test_repo_converter.py
:convert
method._split_context
method, including edge cases and error handling.