fix(update): skip redundant daily download on weekly day#17
Open
fix(update): skip redundant daily download on weekly day#17
Conversation
When applying a fresh weekly snapshot, the subsequent daily chain download now skips the daily file for the same weekday as the weekly (typically Sunday). That daily's data is already included in the weekly, so downloading it was a no-op that wasted time and IO. Fixes #5
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #17 +/- ##
==========================================
+ Coverage 84.95% 85.17% +0.21%
==========================================
Files 57 57
Lines 9805 9867 +62
==========================================
+ Hits 8330 8404 +74
+ Misses 1475 1463 -12 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Refactor the weekday skip logic into a standalone function so it is directly exercised by unit tests, improving patch coverage.
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.
Summary
Fixes #5
Changes
skip_weekday: Option<Weekday>parameter tobuild_daily_chainapply_weekly_then_dailiespasses the weekly's weekday to skiprun_update(daily-only path) passesNoneto check all dailiesTest plan
parse_fcc_date(standard, various months, invalid)Weekday::for_datematching-D warnings