Skip to content

Fix metric collection timing#43

Merged
amrit110 merged 1 commit intomainfrom
fix_metric_calc
Dec 3, 2025
Merged

Fix metric collection timing#43
amrit110 merged 1 commit intomainfrom
fix_metric_calc

Conversation

@amrit110
Copy link
Member

@amrit110 amrit110 commented Dec 3, 2025

This pull request updates the PyPI metrics collection workflow and the associated data files to ensure more accurate and up-to-date reporting. The main improvements include adjusting the workflow schedule for better data availability, updating the metrics calculation logic to avoid incomplete daily data, and refreshing the metrics and history files with the latest download statistics.

Workflow and Metrics Calculation Improvements:

  • Changed the GitHub Actions workflow in .github/workflows/collect-metrics.yml to run weekly at 12:00 UTC instead of 00:00 UTC, ensuring PyPI stats for the previous day are available before collection.
  • Updated the calculate_recent_downloads function in scripts/collect_pypi_metrics.py to use the previous day (yesterday) for "last day" download counts, avoiding issues with incomplete data for the current day. [1] [2]

Data Refresh and Metrics Updates:

  • Refreshed catalog/public/data/pypi_metrics.json with the latest download statistics, package versions, and timestamps for all tracked packages. [1] [2] [3] [4] [5] [6]
  • Updated catalog/public/data/pypi_metrics_history.json to append new entries reflecting the latest download metrics for each package, ensuring historical data is preserved and up to date. [1] [2] [3] [4] [5] [6] [7] [8]

These changes collectively improve the reliability and accuracy of PyPI metrics reporting for the project.

@amrit110 amrit110 self-assigned this Dec 3, 2025
@amrit110 amrit110 added bug Something isn't working enhancement New feature or request labels Dec 3, 2025
@amrit110 amrit110 merged commit ae79f12 into main Dec 3, 2025
5 checks passed
@amrit110 amrit110 deleted the fix_metric_calc branch December 3, 2025 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant