Add historic package lists - #133
andrewnaessens wants to merge 26 commits into
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
yselkowitz
left a comment
There was a problem hiding this comment.
There seems to be some boilerplate-like code here, is there an opportunity to create some functions which can be reused in multiple places?
| history_data = {} | ||
| history_data["date"] = str(now.strftime("%Y-%m-%d")) | ||
| history_data["workloads"] = {} | ||
| history_data["envs"] = {} | ||
| history_data["repos"] = {} | ||
| history_data["views"] = {} |
There was a problem hiding this comment.
IIUC we've settled on an initialization syntax for these.
There was a problem hiding this comment.
Updated to dict literal syntax in save_current_historic_data_daily.
| # Generate daily Chart.js JSON — same chart types as _generate_chartjs_data | ||
| # but reading from daily snapshots instead of weekly |
There was a problem hiding this comment.
Do we need both? Or can we just use daily throughout?
There was a problem hiding this comment.
Removed _generate_chartjs_data_daily and chart toggle. Chart is now generated from weekly snapshots for previous historic data and daily snapshots going forward.
| <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/flatpickr/dist/flatpickr.min.css"> | ||
| <script src="https://cdn.jsdelivr.net/npm/flatpickr"></script> |
There was a problem hiding this comment.
This should be like the others, with a version-specific src and integrity, and also make sure it's covered by the update checking workflow.
There was a problem hiding this comment.
Pinned to v4.6.13 with SRI and added to check_cdn_updates.py.
|
Also, could the exisitng weekly data be of any use to "backfill" the daily data? |
Add daily package list snapshots with browse and compare UI features
Add daily snapshots of each view's package lists and counts, viewable from chart data points and with browse and compare calendar date pickers.
Resolves #25
Summary
generate_historic_data()beforegenerate_pages()so date list is available to templates