Skip to content

Fix add_temporal_info() to match its Julia method - #15

Merged
sbfnk merged 4 commits into
mainfrom
issue-14-add-temporal-info-cannot-succeed-its-arg
Oct 14, 2026
Merged

sbfnk merged 4 commits into
mainfrom
issue-14-add-temporal-info-cannot-succeed-its-arg

Conversation

@sbfnk-bot

Copy link
Copy Markdown
Contributor

add_temporal_info() passed four positional arguments to a Julia method that takes two: reference_date positionally and resolution as a keyword, with no target_date (Julia derives it from the reference date, the horizon and resolution). It also sent a Date as a bare Float64 instead of building a Julia Date.

This drops target_date from the R signature, passes resolution as a keyword, and converts the reference date to Julia's Dates.Date (and an integer resolution to Dates.Day), as TemporalInfo() already does. forecast_to_r() now also carries reference_date and target_date back onto the R forecast, so a test can check the round-trip.

Closes #14.

This PR closes #14.

sbfnk-bot and others added 4 commits October 14, 2026 22:34
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

codecov Bot commented Oct 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.26%. Comparing base (5bc73ed) to head (4a04a4f).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sbfnk-bot
sbfnk-bot marked this pull request as ready for review October 14, 2026 22:14
@sbfnk-bot
sbfnk-bot requested a review from sbfnk October 14, 2026 22:14
@sbfnk
sbfnk merged commit e04a0e2 into main Oct 14, 2026
9 checks passed
@sbfnk
sbfnk deleted the issue-14-add-temporal-info-cannot-succeed-its-arg branch October 15, 2026 06:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add_temporal_info() cannot succeed: its arguments do not match the Julia method

2 participants