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 #405: expose get_forecast_type() to users #466

Merged
merged 4 commits into from
Nov 20, 2023
Merged

Conversation

nikosbosse
Copy link
Contributor

@nikosbosse nikosbosse commented Nov 18, 2023

Update: Tests are now succeeding apart from R3.5 (see #483) and pkgdown (see #482)

Closes #405.

The function get_forecast_type() infers the forecast type based on the input data (a data.frame). This function might potentially be useful to users, so this PR

  • exports it
  • adds some tests
  • adds very simple input checks (making sure that the data is a data.frame or similar)

Note: checks were failing due to the issue explained in #468 (i.e. there are two rogue lines of code (check_metrics() and a test with scores instead of scores_quantile that make tests fail).

@nikosbosse nikosbosse changed the base branch from main to dev November 18, 2023 14:43
@nikosbosse nikosbosse changed the title Issue Issue #405: expose get_forecast_type() to users Nov 18, 2023
@nikosbosse nikosbosse changed the base branch from dev-backup to dev November 18, 2023 15:36
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 all looks fine but we need to fix CI before we can merge this/review it properly

tests/testthat/test-get_-functions.R Outdated Show resolved Hide resolved
Fix failing CI issues by deleting code remnants that shouldn't be there anymore
Copy link

codecov bot commented Nov 19, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ No coverage uploaded for pull request base (develop@4df4576). Click here to learn what that means.

Additional details and impacted files
@@            Coverage Diff             @@
##             develop     #466   +/-   ##
==========================================
  Coverage           ?   80.93%           
==========================================
  Files              ?       20           
  Lines              ?     1715           
  Branches           ?        0           
==========================================
  Hits               ?     1388           
  Misses             ?      327           
  Partials           ?        0           

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

@nikosbosse
Copy link
Contributor Author

Merged in CI fix - merging #468 into the develop branch should resolve future CI issues

@nikosbosse
Copy link
Contributor Author

Should be good for review now :)

@seabbs
Copy link
Contributor

seabbs commented Nov 20, 2023

Can you formally ping when ready as it is easier to find vs sorting through all the notifications.

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.

Looks fine. For safety I would merge in the GH actions fix first. Looks like yet again some random unrelated and undocumented changes in this PR.

@@ -109,3 +109,39 @@ test_that("get_duplicate_forecasts() works as expected for point", {
22
)
})


Copy link
Contributor

Choose a reason for hiding this comment

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

random space



# ==============================================================================
# `get_forecast_type`
Copy link
Contributor

Choose a reason for hiding this comment

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

why don't these get functions just have there own test file?

tests/testthat/test-plot_correlation.R Show resolved Hide resolved
@@ -21,8 +21,6 @@
correlation <- function(scores,
metrics = NULL,
digits = NULL) {
metrics <- check_metrics(metrics)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this unrelated to this PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, but I noted this! 🥺 🐶 It's mentioned in the PR description and you asked me to fix these 🐩

Copy link
Contributor

Choose a reason for hiding this comment

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

Why is it not its own PR?

@nikosbosse nikosbosse merged commit 88cfd97 into develop Nov 20, 2023
@nikosbosse nikosbosse deleted the expose-function3 branch November 20, 2023 10:09
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.

2 participants