Skip to content

Commit

Permalink
realized that production_date is the wrong spot
Browse files Browse the repository at this point in the history
It was originally put there by copilot, and somehow I missed that it was there the whole time. This should have happened in the Config class PR. Not sure how it got through there.
  • Loading branch information
natemcintosh committed Dec 5, 2024
1 parent 5325f11 commit ae484eb
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 8 deletions.
8 changes: 5 additions & 3 deletions R/config.R
Original file line number Diff line number Diff line change
Expand Up @@ -93,16 +93,15 @@ Parameters <- S7::new_class( # nolint: object_name_linter
#' occur.
#' @param report_date A list of strings representing report dates.
#' @param reference_date A list of strings representing reference dates.
#' @param production_date A list of strings representing production dates.

#' @export
Data <- S7::new_class( # nolint: object_name_linter
"Data",
properties = list(
path = S7::class_character,
blob_storage_container = character_or_null,
report_date = S7::class_character,
reference_date = S7::class_character,
production_date = S7::class_character
reference_date = S7::class_character
)
)

Expand All @@ -116,6 +115,8 @@ Data <- S7::new_class( # nolint: object_name_linter
#' date. Formatted as "YYYY-MM-DD".
#' @param max_reference_date A string representing the maximum reference
#' date. Formatted as "YYYY-MM-DD".
#' @param production_date A string representing the production date.
#' Formatted as "YYYY-MM-DD".
#' @param disease A string specifying the disease being modeled.
#' @param geo_value A string specifying the geographic value, usually a state.
#' @param geo_type A string specifying the geographic type, usually "state".
Expand Down Expand Up @@ -146,6 +147,7 @@ Config <- S7::new_class( # nolint: object_name_linter
min_reference_date = S7::class_character,
max_reference_date = S7::class_character,
report_date = S7::class_character,
production_date = S7::class_character,
disease = S7::class_character,
geo_value = S7::class_character,
geo_type = S7::class_character,
Expand Down
4 changes: 4 additions & 0 deletions man/Config.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions man/Data.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions tests/testthat/data/sample_config_no_exclusion.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"min_reference_date": "2023-01-02",
"max_reference_date": "2023-01-07",
"report_date": "2023-10-28",
"production_date": "2024-10-28",
"quantile_width": [0.5, 0.95],
"model": "EpiNow2_test",
"parameters": {
Expand Down
1 change: 1 addition & 0 deletions tests/testthat/data/sample_config_with_exclusion.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"min_reference_date": "2023-01-02",
"max_reference_date": "2023-01-07",
"report_date": "2023-10-28",
"production_date": "2024-10-28",
"quantile_width": [0.5, 0.95],
"model": "EpiNow2_test",
"parameters": {
Expand Down
6 changes: 5 additions & 1 deletion tests/testthat/test-pipeline.R
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,11 @@ test_that("Runs on config from generator as of 2024-11-26", {
expect_pipeline_files_written(
output_dir,
config@job_id,
config@task_id
config@task_id,
# Do not check for log output here, bc logs get created in
# `orchestrate_pipeline()`, and this test only calls `execute_model_logic()`
# which gets called after the log files have been created.
check_logs = FALSE
)
})

Expand Down

0 comments on commit ae484eb

Please sign in to comment.