mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-25 14:55:00 +00:00
refactor: Rename function and emphasize LATEST release in output
This commit is contained in:
parent
7942ca9206
commit
8f840ae0b1
1 changed files with 5 additions and 5 deletions
|
@ -49,9 +49,9 @@ def get_github_stars(repo="paul-gauthier/aider"):
|
|||
return None
|
||||
|
||||
|
||||
def get_aider_percentage():
|
||||
def get_latest_release_aider_percentage():
|
||||
"""
|
||||
Get the percentage of code written by Aider in the latest release
|
||||
Get the percentage of code written by Aider in the LATEST release
|
||||
from the blame.yml file
|
||||
"""
|
||||
blame_path = os.path.join(
|
||||
|
@ -66,7 +66,7 @@ def get_aider_percentage():
|
|||
with open(blame_path, "r") as f:
|
||||
blame_data = yaml.safe_load(f)
|
||||
|
||||
# Get the most recent release (first entry in the list)
|
||||
# The blame data is ordered chronologically, with the most recent release first
|
||||
if blame_data and len(blame_data) > 0:
|
||||
latest_release = blame_data[0]
|
||||
percentage = latest_release.get("aider_percentage", 0)
|
||||
|
@ -120,8 +120,8 @@ def main():
|
|||
print(f"GitHub stars for {args.github_repo}: {stars:,}")
|
||||
|
||||
# Get Aider contribution percentage in latest release
|
||||
percentage, version = get_aider_percentage()
|
||||
print(f"Aider wrote {percentage:.2f}% of code in the latest release ({version})")
|
||||
percentage, version = get_latest_release_aider_percentage()
|
||||
print(f"Aider wrote {percentage:.2f}% of code in the LATEST release ({version})")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue