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

rename target_observations to oracle_output #62

Merged
merged 5 commits into from
Dec 2, 2024

Conversation

elray1
Copy link
Contributor

@elray1 elray1 commented Nov 22, 2024

all references are changed throughout documentation, primary code, examples, and unit tests. This resolves #59 .

Copy link

github-actions bot commented Nov 22, 2024

@@ -122,7 +125,7 @@ score_model_out <- function(model_out_tbl, target_observations, metrics = NULL,
#' Get scoring metrics
#'
#' @param forecast A scoringutils `forecast` object (see
#' [scoringutils::as_forecast()] for details).
Copy link
Contributor Author

Choose a reason for hiding this comment

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

scoringutils::as_forecast no longer exists; as_forecast_doc_template seems like a weird thing to be referring to, but it seemed to have the most useful/general documentation of the topic.

Copy link
Member

@zkamvar zkamvar left a comment

Choose a reason for hiding this comment

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

Sorry for not getting to this earlier. This looks good, the only thing that I was not expecting was the new make_hubExamples_snapshots "helper" function.

I added a suggestion for the documentation text. Beyond that, There are two concerns I have:

  1. there are two CSV files (one of which is 23K) that are unused and should be removed.
  2. the process for generating the test data relies on a snapshot of hubExamples and nearly quadruples the size of the package. This is a problem because it will miss any changes that happen in hubExamples that could affect these tests.

I think number 1 should be taken care of in this PR and I would be happy to tackle a solution to number 2 in another PR.

Copy link
Member

Choose a reason for hiding this comment

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

We import hubExamples as a suggested package, so why not just use these transformations in the helper functions instead of wrapping the output of the data?

At the moment, the new helper files amount to over a megabyte of storage:

$ ls -larth tests/testthat/helper-*
-rw-r--r--  1 zkamvar  staff   5.3K Sep  4 17:25 tests/testthat/helper-pmf_test_expected_merged_forecast.R
-rw-r--r--  1 zkamvar  staff   5.6K Sep  4 17:25 tests/testthat/helper-pmf_test_model_out_tbl.R
-rw-r--r--  1 zkamvar  staff   267K Dec  2 07:50 tests/testthat/helper-hubex_forecast_oracle_output.R
-rw-r--r--  1 zkamvar  staff   936K Dec  2 07:50 tests/testthat/helper-hubex_forecast_outputs.R
-rw-r--r--  1 zkamvar  staff   951B Dec  2 07:50 tests/testthat/helper-pmf_test_oracle_output.R
-rw-r--r--  1 zkamvar  staff   843B Dec  2 07:50 tests/testthat/helper-pmf_test_target_observations.R

)

exp_forecast <- utils::read.csv(
test_path("testdata/exp_forecast_hubExamples_2.csv")
Copy link
Member

Choose a reason for hiding this comment

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

Should this file (and exp_forecast_hubEsxamples_1.csv) be removed? It's not being used anywhere anymore.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done!

@elray1
Copy link
Contributor Author

elray1 commented Dec 2, 2024

Thanks for the review! I dealt with the easy ones. r.e. test data from hubExamples, I've been unclear on recommended practice here. At some point, earlier discussion had led to a consensus that test data should live within the package being tested. But I agree that it would be easier not to manage separate copies of the data!

@elray1 elray1 requested a review from zkamvar December 2, 2024 18:19
@elray1 elray1 merged commit fbd8700 into main Dec 2, 2024
8 checks passed
@elray1 elray1 deleted the elr/rename_to_oracle_output branch December 2, 2024 20:23
elray1 added a commit that referenced this pull request Dec 2, 2024
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.

update oracle_output argument and column names
2 participants