Modify process_all_tags_since function to include all data for each tag pair in --all output

This commit is contained in:
Paul Gauthier (aider) 2024-07-30 10:16:38 -03:00
parent 7d5e666ea7
commit 16eadba5e5

View file

@ -77,15 +77,24 @@ def process_all_tags_since(start_tag):
results = [] results = []
for i in tqdm(range(len(tags) - 1), desc="Processing tags"): for i in tqdm(range(len(tags) - 1), desc="Processing tags"):
start_tag, end_tag = tags[i], tags[i + 1] start_tag, end_tag = tags[i], tags[i + 1]
_, _, total_lines, aider_total, aider_percentage, end_date = blame(start_tag, end_tag) all_file_counts, grand_total, total_lines, aider_total, aider_percentage, end_date = blame(
start_tag, end_tag
)
results.append( results.append(
{ {
"start_tag": start_tag, "start_tag": start_tag,
"end_tag": end_tag, "end_tag": end_tag,
"end_date": end_date.strftime("%Y-%m-%d"), "end_date": end_date.strftime("%Y-%m-%d"),
"aider_percentage": round(aider_percentage, 2), "file_counts": all_file_counts,
"aider_lines": aider_total, "grand_total": {
author: count
for author, count in sorted(
grand_total.items(), key=itemgetter(1), reverse=True
)
},
"total_lines": total_lines, "total_lines": total_lines,
"aider_total": aider_total,
"aider_percentage": round(aider_percentage, 2),
} }
) )
return results return results