Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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:
.github/workflows/collect-metrics.ymlto run weekly at 12:00 UTC instead of 00:00 UTC, ensuring PyPI stats for the previous day are available before collection.calculate_recent_downloadsfunction inscripts/collect_pypi_metrics.pyto 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:
catalog/public/data/pypi_metrics.jsonwith the latest download statistics, package versions, and timestamps for all tracked packages. [1] [2] [3] [4] [5] [6]catalog/public/data/pypi_metrics_history.jsonto 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.