Repository navigation
Fix add_temporal_info() to match its Julia method - #15
Merged
Merged
Conversation
Drop target_date, pass resolution as a keyword and convert a Date reference date to Julia's Dates.Date instead of a bare Float64. Also expose reference_date and target_date on a Forecast so they can be read back. Co-authored-by: sbfnk <sebastian.funk@lshtm.ac.uk>
Co-authored-by: sbfnk <sebastian.funk@lshtm.ac.uk>
Co-authored-by: sbfnk <sebastian.funk@lshtm.ac.uk>
Co-authored-by: sbfnk <sebastian.funk@lshtm.ac.uk>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #15 +/- ##
==========================================
+ Coverage 66.97% 68.26% +1.29%
==========================================
Files 8 8
Lines 327 334 +7
==========================================
+ Hits 219 228 +9
+ Misses 108 106 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
sbfnk-bot
marked this pull request as ready for review
October 14, 2026 22:14
sbfnk
approved these changes
Oct 14, 2026
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.
add_temporal_info()passed four positional arguments to a Julia method that takes two:reference_datepositionally andresolutionas a keyword, with notarget_date(Julia derives it from the reference date, the horizon andresolution). It also sent aDateas a bareFloat64instead of building a JuliaDate.This drops
target_datefrom the R signature, passesresolutionas a keyword, and converts the reference date to Julia'sDates.Date(and an integer resolution toDates.Day), asTemporalInfo()already does.forecast_to_r()now also carriesreference_dateandtarget_dateback onto the R forecast, so a test can check the round-trip.Closes #14.
This PR closes #14.