INNER CODE UNIT · Python
write_report
crocs-muni/javacard-curated-list · scripts/process_curated_list.py:662
def write_report(entries):
total = len(entries)
with_stars = [e for e in entries if e["stars"] is not None]
with_year = [e for e in entries if e["last_commit_year"] is not None]
with_devs = [e for e in entries if e["developers"] is not None]
star_order = ["0", "1-4", "5-9", "10-24", "25-49", "50-99", "100+", "Unknown"]
star_counts = {k: 0 for k in star_order}
for e in entries:
star_counts[star_bucket(e["stars"])] += 1
recency_order = ["This year (2026)", "Last year (2025)", "2 years ago (2024)",
"3-4 years ago", "5-9 years ago", "10+ years ago", "Unknown"]
recency_counts = {k: 0 for k in recency_order}
for e in entries:
recency_counts[recency_bucket(e["last_commit_year"])] += 1
dev_order = ["1", "2-3", "4-10", "11+", "Unknown"]