Skip to content

Conversation

mathiasesn
Copy link
Owner

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 the convert 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:

  • Modified the --output argument to specify an output directory instead of a file path.
  • Added a new argument --max-file-lines to specify the maximum number of lines in context files.
  • Updated the main function to handle multiple context files and write each to a separate file.

Changes to repo_context/repo_converter.py:

  • Updated the convert method to support splitting context files based on the maximum number of lines. [1] [2]
  • Added a new method _split_context to handle the logic for splitting context files.

Changes to tests/test_repo_converter.py:

  • Updated existing tests to accommodate the changes in the convert method.
  • Added new tests to verify the functionality of the _split_context method, including edge cases and error handling.

@mathiasesn mathiasesn self-assigned this Jan 3, 2025
@mathiasesn mathiasesn linked an issue Jan 3, 2025 that may be closed by this pull request
Copy link

github-actions bot commented Jan 3, 2025

Coverage

Coverage Report
FileStmtsMissCoverMissing
repo_context
   cli.py37370%1–82
   repo_converter.py1422781%57–59, 64–66, 98, 132–133, 175, 255–256, 259–260, 263–269, 287–288, 299, 306, 311, 316
TOTAL1916467% 

Tests Skipped Failures Errors Time
19 0 💤 0 ❌ 0 🔥 0.625s ⏱️

@mathiasesn mathiasesn merged commit 14f7e03 into master Jan 3, 2025
7 checks passed
@mathiasesn mathiasesn deleted the 3-let-user-set-max-file-size branch January 3, 2025 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Let user set max file size
1 participant