Skip to content
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 #851 - Create S3 methods for converting to point and quantile forecasts #876

Merged
merged 9 commits into from
Jul 30, 2024

Conversation

nikosbosse
Copy link
Contributor

@nikosbosse nikosbosse commented Jul 28, 2024

Description

This PR closes #851.

The PR

  • creates S3 methods for as_forecast_point() and as_forecast_quantile to convert quantile-based and sample-based forecasts
  • splits up the doc files for as_forecast(). ?as_forecast() now has the overview of all the types and there are separate entries for all the specific as_forecast_<type>() functions. In the future we could flesh them out more, but at the moment it's not top on my priority list
  • updates tests and the news file.

Checklist

  • My PR is based on a package issue and I have explicitly linked it.
  • I have included the target issue or issues in the PR title as follows: issue-number: PR title
  • I have tested my changes locally.
  • I have added or updated unit tests where necessary.
  • I have updated the documentation if required.
  • I have built the package locally and run rebuilt docs using roxygen2.
  • My code follows the established coding standards and I have run lintr::lint_package() to check for style issues introduced by my changes.
  • I have added a news item linked to this PR.
  • I have reviewed CI checks for this PR and addressed them as far as I am able.

@nikosbosse nikosbosse marked this pull request as ready for review July 28, 2024 11:11
@nikosbosse nikosbosse requested a review from seabbs July 28, 2024 15:27
@seabbs seabbs force-pushed the as_quantile_new branch from 54ffbb4 to f9f35c0 Compare July 30, 2024 10:44
@seabbs seabbs enabled auto-merge (squash) July 30, 2024 10:45
Copy link
Contributor

@seabbs seabbs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great. The new interface is starting to feel really slick. A few comments about the s3 setup that can be handled in another issue and a few depreciated arg that have slipped through

R/forecast.R Show resolved Hide resolved
R/forecast.R Show resolved Hide resolved
R/forecast.R Show resolved Hide resolved
R/forecast.R Show resolved Hide resolved
inst/manuscript/R/toy-example-calibration.R Show resolved Hide resolved
Merge remote-tracking branch 'origin/main' into as_quantile_new

# Conflicts:
#	R/utils_data_handling.R
#	man/sample_to_quantile.Rd
Copy link

codecov bot commented Jul 30, 2024

Codecov Report

Attention: Patch coverage is 77.77778% with 6 lines in your changes missing coverage. Please review.

Project coverage is 95.20%. Comparing base (4fee240) to head (1904f52).
Report is 43 commits behind head on main.

Files Patch % Lines
R/forecast.R 76.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #876      +/-   ##
==========================================
- Coverage   95.47%   95.20%   -0.27%     
==========================================
  Files          21       21              
  Lines        1568     1606      +38     
==========================================
+ Hits         1497     1529      +32     
- Misses         71       77       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nikosbosse
Copy link
Contributor Author

I think I successfully addressed all points by deferring them to new issues :D
Good to merge?

Copy link
Contributor

@seabbs seabbs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup

@seabbs seabbs merged commit 4d9ecf7 into main Jul 30, 2024
9 checks passed
@seabbs seabbs deleted the as_quantile_new branch July 30, 2024 17:08
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.

Make sample_to_quantile() a method
2 participants