feat: Add stats command to allow user to compare aider usage across different revision #2883
+172
−75
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.
TODO:
This pull request introduces a new feature to show code change statistics between revisions and refactors existing code to support this functionality. The most important changes include adding a new command, updating argument parsing, and refactoring common functions into a new module.
New Feature: Code Change Statistics
--stats
argument to show code change statistics between revisions inaider/args.py
.cmd_stats
method to calculate and display code change statistics inaider/commands.py
.--stats
argument inaider/main.py
.Refactoring for Code Reuse
hash_len
,get_all_commit_hashes_between_tags
,get_commit_authors
, andget_counts_for_file
to a new moduleaider/stats.py
for reuse.Codebase Simplification
aider/commands.py
andscripts/blame.py
to use refactored functions fromaider/stats.py
. [1] [2]scripts/blame.py
after refactoring. [1] [2]Example