-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue #498 Implement a print function for forecast objects #584
Issue #498 Implement a print function for forecast objects #584
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #584 +/- ##
==========================================
- Coverage 83.71% 83.25% -0.46%
==========================================
Files 21 21
Lines 1719 1750 +31
==========================================
+ Hits 1439 1457 +18
- Misses 280 293 +13 ☔ View full report in Codecov by Sentry. |
Thank you so much for this PR, @toshiakiasakura! The actual functionality is really there and looks good. I have some additional thoughts that I think would make the code easier to maintain in the future. My main piece of feedback is that I would suggest we simplify the current proposal a bit. The current code is nice but fairly complex: it introduces a new package dependency ( It might really be enough to do something like the following:
This would allow us to avoid the package dependency, defining another helper function, using By convention, the method should have the same arguments as the generic function, so What do you think? I've opened up 2 related issues / pull requests:
Merging in those two PRs will make this one easier because then we can simply call |
This does look really nice! Just to weigh in that if moving package messaging to |
Thanks for both comments and updates for the branch. |
Description
This PR closes #498 .
I implemented a print function using S3 method to print out the inforamtion about
forecast
objects.Currently support for
forecast_binary
,forecast_quantile
,forecast_point
,forecast_sampel
,forecast_integer
.Potential further update is to include validated information, i.e. results from
validate_general
or including the number of NA (#581).Due to the issue of #559, after passing through
add_coverage
, it does not correctly work, but instead if use the internal private functionprint_forecast_info
, results look likeChecklist
lintr::lint_package()
to check for style issues introduced by my changes.P.S. I am not sure it is right to send a pull request to
main
branch but I can not finddevelop
branch...