From fec895a1cce15b586d6d5f7efdbbcd200f771ed2 Mon Sep 17 00:00:00 2001 From: Anna Krystalli Date: Wed, 18 Dec 2024 10:07:22 +0200 Subject: [PATCH 01/16] Add test that confirms config files with 1 target_keys key value pair do not pass validation. Resolves #89 --- tests/testthat/test-validate_config.R | 19 ++ .../testdata/v4.0.1-tasks-2-target_keys.json | 164 ++++++++++++++++++ 2 files changed, 183 insertions(+) create mode 100644 tests/testthat/testdata/v4.0.1-tasks-2-target_keys.json diff --git a/tests/testthat/test-validate_config.R b/tests/testthat/test-validate_config.R index e1d8420..ad346c3 100644 --- a/tests/testthat/test-validate_config.R +++ b/tests/testthat/test-validate_config.R @@ -251,3 +251,22 @@ test_that("v4 validation works", { ) ) }) + +test_that("target keys with 2 properties throws error", { + skip_if_offline() + config_path <- testthat::test_path("testdata", "v4.0.1-tasks-2-target_keys.json") + out <- suppressMessages( + validate_config( + config_path = config_path, + # TDOD: remove branch argument when v4.0.1 is released. + branch = "ak/v4.0.1/restrict-target-key-value-pair-n/117" + ) + ) + expect_false(out) + + expect_equal( + unique(attr(out, "errors")$message), + "must NOT have more than 1 items" + ) + expect_equal(nrow(attr(out, "errors")), 2L) +}) diff --git a/tests/testthat/testdata/v4.0.1-tasks-2-target_keys.json b/tests/testthat/testdata/v4.0.1-tasks-2-target_keys.json new file mode 100644 index 0000000..d9a8c81 --- /dev/null +++ b/tests/testthat/testdata/v4.0.1-tasks-2-target_keys.json @@ -0,0 +1,164 @@ +{ + "schema_version": "https://raw.githubusercontent.com/hubverse-org/schemas/main/v4.0.1/tasks-schema.json", + "rounds": [{ + "round_id_from_variable": true, + "round_id": "forecast_date", + "model_tasks": [{ + "task_ids": { + "forecast_date": { + "required": null, + "optional": [ + "2022-12-12", "2022-12-19", "2022-12-26", "2023-01-02", "2023-01-09", + "2023-01-16", "2023-01-23", "2023-01-30", "2023-02-06", "2023-02-13", + "2023-02-20", "2023-02-27", "2023-03-06", "2023-03-13", "2023-03-20", + "2023-03-27", "2023-04-03", "2023-04-10", "2023-04-17", "2023-04-24", + "2023-05-01" + ] + }, + "target": { + "required": null, + "optional": ["wk ahead inc"] + }, + "target_metric": { + "required": null, + "optional": ["flu hosp"] + }, + "horizon": { + "required": [2], + "optional": [1] + }, + "location": { + "required": ["US"], + "optional": [ + "01", + "02" + ] + }, + "target_date": { + "required": null, + "optional": [ + "2022-12-19", "2022-12-26", "2023-01-02", "2023-01-09", + "2023-01-16", "2023-01-23", "2023-01-30", "2023-02-06", "2023-02-13", + "2023-02-20", "2023-02-27", "2023-03-06", "2023-03-13", "2023-03-20", + "2023-03-27", "2023-04-03", "2023-04-10", "2023-04-17", "2023-04-24", + "2023-05-01", "2023-05-08", "2023-05-15" + ] + } + }, + "output_type": { + "sample": { + "output_type_id_params": { + "type": "character", + "min_samples_per_task": 50, + "max_samples_per_task": 100, + "max_length": 10 + }, + "is_required": true, + "value": { + "type": "integer", + "minimum": 0 + } + }, + "mean": { + "output_type_id": { + "required": null + }, + "is_required": true, + "value": { + "type": "double", + "minimum": 0 + } + } + }, + "target_metadata": [{ + "target_id": "wk ahead inc flu hosp", + "target_name": "weekly influenza hospitalization incidence", + "target_units": "rate per 100,000 population", + "target_keys": { + "target": "wk ahead inc", + "target_metric": "flu hosp" + }, + "target_type": "discrete", + "description": "This target represents the counts of new hospitalizations per horizon week.", + "is_step_ahead": true, + "time_unit": "week" + }] + }, { + "task_ids": { + "forecast_date": { + "required": null, + "optional": [ + "2022-12-12", "2022-12-19", "2022-12-26", "2023-01-02", "2023-01-09", + "2023-01-16", "2023-01-23", "2023-01-30", "2023-02-06", "2023-02-13", + "2023-02-20", "2023-02-27", "2023-03-06", "2023-03-13", "2023-03-20", + "2023-03-27", "2023-04-03", "2023-04-10", "2023-04-17", "2023-04-24", + "2023-05-01" + ] + }, + "target": { + "required": null, + "optional": ["wk flu hosp"] + }, + "target_metric": { + "required": null, + "optional": ["rate change"] + }, + "horizon": { + "required": [2], + "optional": [1] + }, + "location": { + "required": ["US"], + "optional": [ + "01", + "02" + ] + }, + "target_date": { + "required": null, + "optional": [ + "2022-12-19", "2022-12-26", "2023-01-02", "2023-01-09", + "2023-01-16", "2023-01-23", "2023-01-30", "2023-02-06", "2023-02-13", + "2023-02-20", "2023-02-27", "2023-03-06", "2023-03-13", "2023-03-20", + "2023-03-27", "2023-04-03", "2023-04-10", "2023-04-17", "2023-04-24", + "2023-05-01", "2023-05-08", "2023-05-15" + ] + } + }, + "output_type": { + "pmf": { + "output_type_id": { + "required": ["large_decrease", "decrease", "stable", "increase", "large_increase"] + }, + "is_required": false, + "value": { + "type": "double", + "minimum": 0, + "maximum": 1 + } + } + }, + "target_metadata": [{ + "target_id": "wk flu hosp rate change", + "target_name": "weekly influenza hospitalization rate change", + "target_units": "rate per 100,000 population", + "target_keys": { + "target": "wk flu hosp", + "target_metric": "rate change" + }, + "target_type": "nominal", + "description": "This target represents the change in the rate of new hospitalizations per week comparing the week ending two days prior to the forecast_date to the week ending h weeks after the forecast_date.", + "is_step_ahead": true, + "time_unit": "week" + }] + }], + "submissions_due": { + "relative_to": "forecast_date", + "start": -6, + "end": 2 + }, + "derived_task_ids": ["target_date"] + } + + ] +} From 6192af2453f4800ada05b0e786aebf3ceb179634 Mon Sep 17 00:00:00 2001 From: Anna Krystalli Date: Wed, 18 Dec 2024 10:40:33 +0200 Subject: [PATCH 02/16] Do not allow target_keys of length more than 1 in v4.0.1 and above when creating programmatically. Rsolves #89 --- R/create_target_metadata_item.R | 34 ++++++--- man/create_target_metadata_item.Rd | 15 ++-- .../_snaps/create_target_metadata_item.md | 11 +++ .../test-create_target_metadata_item.R | 69 ++++++++++++++++++- 4 files changed, 112 insertions(+), 17 deletions(-) diff --git a/R/create_target_metadata_item.R b/R/create_target_metadata_item.R index 9e2e290..11a9719 100644 --- a/R/create_target_metadata_item.R +++ b/R/create_target_metadata_item.R @@ -11,13 +11,14 @@ #' @param target_name character string. A longer human readable target description #' that could be used, for example, as a visualisation axis label. #' @param target_units character string. Unit of observation of the target. -#' @param target_keys named list or `NULL`. Should be `NULL`, in the case -#' where the target is not specified as a task_id but is specified solely through -#' the `target_id` argument. Otherwise, should be a named list of one or more -#' character strings. The name of each element should match a task_id variable -#' within the same model_tasks object. Each element should be of length 1. -#' Each value, or the combination of values if multiple keys are specified, -#' define a single target value. +#' @param target_keys named list or `NULL`. The `target_keys` value defines a +#' single target. +#' Should be `NULL`, in the case where the target is not specified as a task_id +#' but is specified solely through the `target_id` argument. +#' Otherwise, should be a named list containing a single character string element +#' The name of the element should match a `task_id` +#' variable name within the same `model_tasks` object and the value match a +#' single value of that variable. #' @param description character string (optional). An optional verbose description #' of the target that might include information such as definitions of a 'rate' or similar. #' @param target_type character string. Target statistical data type. Consult the @@ -117,7 +118,7 @@ create_target_metadata_item <- function(target_id, target_name, target_units, } ) - check_target_keys(target_keys, call = call) + check_target_keys(target_keys, schema_version, call = call) structure(mget(property_names), class = c("target_metadata_item", "list"), @@ -127,7 +128,8 @@ create_target_metadata_item <- function(target_id, target_name, target_units, ) } -check_target_keys <- function(target_keys, call = rlang::caller_env()) { +check_target_keys <- function(target_keys, schema_version, + call = rlang::caller_env()) { if (is.null(target_keys)) { return() } @@ -149,6 +151,20 @@ check_target_keys <- function(target_keys, call = rlang::caller_env()) { call = call ) } + is_gte_v4_0_1 <- hubUtils::version_gte( + "v4.0.1", + schema_version = schema_version + ) + target_key_n <- length(target_keys) + if (is_gte_v4_0_1 && target_key_n > 1L) { + cli::cli_abort( + c( + "!" = "{.arg target_keys} must be a named {.cls list} of + length {.val {1L}} not {.val {target_key_n}}." + ), + call = call + ) + } purrr::walk2( target_keys, diff --git a/man/create_target_metadata_item.Rd b/man/create_target_metadata_item.Rd index 97e2387..b464f4c 100644 --- a/man/create_target_metadata_item.Rd +++ b/man/create_target_metadata_item.Rd @@ -26,13 +26,14 @@ that could be used, for example, as a visualisation axis label.} \item{target_units}{character string. Unit of observation of the target.} -\item{target_keys}{named list or \code{NULL}. Should be \code{NULL}, in the case -where the target is not specified as a task_id but is specified solely through -the \code{target_id} argument. Otherwise, should be a named list of one or more -character strings. The name of each element should match a task_id variable -within the same model_tasks object. Each element should be of length 1. -Each value, or the combination of values if multiple keys are specified, -define a single target value.} +\item{target_keys}{named list or \code{NULL}. The \code{target_keys} value defines a +single target. +Should be \code{NULL}, in the case where the target is not specified as a task_id +but is specified solely through the \code{target_id} argument. +Otherwise, should be a named list containing a single character string element +The name of the element should match a \code{task_id} +variable name within the same \code{model_tasks} object and the value match a +single value of that variable.} \item{description}{character string (optional). An optional verbose description of the target that might include information such as definitions of a 'rate' or similar.} diff --git a/tests/testthat/_snaps/create_target_metadata_item.md b/tests/testthat/_snaps/create_target_metadata_item.md index 2cae71e..574c957 100644 --- a/tests/testthat/_snaps/create_target_metadata_item.md +++ b/tests/testthat/_snaps/create_target_metadata_item.md @@ -162,3 +162,14 @@ - "https://raw.githubusercontent.com/hubverse-org/schemas/main/v3.0.1/tasks-schema.json" + "https://raw.githubusercontent.com/hubverse-org/schemas/main/v4.0.0/tasks-schema.json" +# Target_keys of length more than 1 are not allowed post v4.0.1 + + Code + create_target_metadata_item(target_id = "flu inc hosp", target_name = "Weekly incident influenza hospitalizations", + target_units = "rate per 100,000 population", target_keys = list(target = "flu", + target_metric = "inc hosp"), target_type = "discrete", is_step_ahead = TRUE, + time_unit = "week") + Condition + Error in `create_target_metadata_item()`: + ! `target_keys` must be a named of length 1 not 2. + diff --git a/tests/testthat/test-create_target_metadata_item.R b/tests/testthat/test-create_target_metadata_item.R index 8231cbb..777e086 100644 --- a/tests/testthat/test-create_target_metadata_item.R +++ b/tests/testthat/test-create_target_metadata_item.R @@ -131,7 +131,7 @@ test_that("schema version option works for create_target_metadata_item", { withr::with_options( list( hubAdmin.schema_version = "v3.0.1", - hubAmin.branch = "main" + hubAdmin.branch = "main" ), { opt_version <- create_target_metadata_item( @@ -148,3 +148,70 @@ test_that("schema version option works for create_target_metadata_item", { expect_equal(arg_version, opt_version) expect_snapshot(waldo::compare(opt_version, version_default)) }) + +test_that("Target_keys of length more than 1 are not allowed post v4.0.1", { + skip_if_offline() + withr::with_options( + list( + hubAdmin.schema_version = "v4.0.1", + # TDOD: remove branch argument when v4.0.1 is released. + hubAdmin.branch = "ak/v4.0.1/restrict-target-key-value-pair-n/117" + ), + { + # One target_key is allowed in v4.0.1 and later versions. + target_keys_n1 <- create_target_metadata_item( + target_id = "inc hosp", + target_name = "Weekly incident influenza hospitalizations", + target_units = "rate per 100,000 population", + target_keys = list(target = "inc hosp"), + target_type = "discrete", + is_step_ahead = TRUE, + time_unit = "week", + branch = "ak/v4.0.1/restrict-target-key-value-pair-n/117" + ) + expect_s3_class(target_keys_n1, "target_metadata_item") + expect_length(target_keys_n1$target_keys, 1L) + + # More than one target_key is NOT allowed in v4.0.1 and later versions + # and throws error. + expect_snapshot( + create_target_metadata_item( + target_id = "flu inc hosp", + target_name = "Weekly incident influenza hospitalizations", + target_units = "rate per 100,000 population", + target_keys = list( + target = "flu", + target_metric = "inc hosp" + ), + target_type = "discrete", + is_step_ahead = TRUE, + time_unit = "week" + ), + error = TRUE + ) + } + ) + # More than 1 target_keys still allowed in earlier versions to conform to + # schema. + withr::with_options( + list( + hubAdmin.schema_version = "v4.0.0" + ), + { + target_keys_n2 <- create_target_metadata_item( + target_id = "flu inc hosp", + target_name = "Weekly incident influenza hospitalizations", + target_units = "rate per 100,000 population", + target_keys = list( + target = "flu", + target_metric = "inc hosp" + ), + target_type = "discrete", + is_step_ahead = TRUE, + time_unit = "week" + ) + expect_s3_class(target_keys_n2, "target_metadata_item") + expect_length(target_keys_n2$target_keys, 2L) + } + ) +}) From 77a99af5abca7c251229dcb46cf76f5b4a69484c Mon Sep 17 00:00:00 2001 From: Anna Krystalli Date: Wed, 18 Dec 2024 10:49:20 +0200 Subject: [PATCH 03/16] correct docstring --- R/create_target_metadata_item.R | 6 +++--- man/create_target_metadata_item.Rd | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/R/create_target_metadata_item.R b/R/create_target_metadata_item.R index 11a9719..a09a6f4 100644 --- a/R/create_target_metadata_item.R +++ b/R/create_target_metadata_item.R @@ -15,10 +15,10 @@ #' single target. #' Should be `NULL`, in the case where the target is not specified as a task_id #' but is specified solely through the `target_id` argument. -#' Otherwise, should be a named list containing a single character string element +#' Otherwise, should be a named list containing a single character string element. #' The name of the element should match a `task_id` -#' variable name within the same `model_tasks` object and the value match a -#' single value of that variable. +#' variable name within the same `model_tasks` object and the value should match +#' a single value of that variable. #' @param description character string (optional). An optional verbose description #' of the target that might include information such as definitions of a 'rate' or similar. #' @param target_type character string. Target statistical data type. Consult the diff --git a/man/create_target_metadata_item.Rd b/man/create_target_metadata_item.Rd index b464f4c..a2c6029 100644 --- a/man/create_target_metadata_item.Rd +++ b/man/create_target_metadata_item.Rd @@ -30,10 +30,10 @@ that could be used, for example, as a visualisation axis label.} single target. Should be \code{NULL}, in the case where the target is not specified as a task_id but is specified solely through the \code{target_id} argument. -Otherwise, should be a named list containing a single character string element +Otherwise, should be a named list containing a single character string element. The name of the element should match a \code{task_id} -variable name within the same \code{model_tasks} object and the value match a -single value of that variable.} +variable name within the same \code{model_tasks} object and the value should match +a single value of that variable.} \item{description}{character string (optional). An optional verbose description of the target that might include information such as definitions of a 'rate' or similar.} From d5b820117f718b254f8787fea9b3f51a28a72d86 Mon Sep 17 00:00:00 2001 From: Anna Krystalli Date: Wed, 18 Dec 2024 11:45:33 +0200 Subject: [PATCH 04/16] remove unnecessary branch specification --- tests/testthat/test-create_target_metadata_item.R | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/testthat/test-create_target_metadata_item.R b/tests/testthat/test-create_target_metadata_item.R index 777e086..eba13c4 100644 --- a/tests/testthat/test-create_target_metadata_item.R +++ b/tests/testthat/test-create_target_metadata_item.R @@ -166,8 +166,7 @@ test_that("Target_keys of length more than 1 are not allowed post v4.0.1", { target_keys = list(target = "inc hosp"), target_type = "discrete", is_step_ahead = TRUE, - time_unit = "week", - branch = "ak/v4.0.1/restrict-target-key-value-pair-n/117" + time_unit = "week" ) expect_s3_class(target_keys_n1, "target_metadata_item") expect_length(target_keys_n1$target_keys, 1L) From 3feb79b29a35d07bb39b2b04a8eeca6854064330 Mon Sep 17 00:00:00 2001 From: Anna Krystalli Date: Wed, 18 Dec 2024 11:48:30 +0200 Subject: [PATCH 05/16] add test for NULL target keys in v4.0.1 --- tests/testthat/test-validate_config.R | 11 +++ .../v4.0.1-tasks-null-target_keys.json | 93 +++++++++++++++++++ 2 files changed, 104 insertions(+) create mode 100644 tests/testthat/testdata/v4.0.1-tasks-null-target_keys.json diff --git a/tests/testthat/test-validate_config.R b/tests/testthat/test-validate_config.R index ad346c3..cbd64e1 100644 --- a/tests/testthat/test-validate_config.R +++ b/tests/testthat/test-validate_config.R @@ -269,4 +269,15 @@ test_that("target keys with 2 properties throws error", { "must NOT have more than 1 items" ) expect_equal(nrow(attr(out, "errors")), 2L) + + # Ensure NULL target keys are still allowed. + config_path <- testthat::test_path("testdata", "v4.0.1-tasks-null-target_keys.json") + out <- suppressMessages( + validate_config( + config_path = config_path, + # TDOD: remove branch argument when v4.0.1 is released. + branch = "ak/v4.0.1/restrict-target-key-value-pair-n/117" + ) + ) + expect_true(out) }) diff --git a/tests/testthat/testdata/v4.0.1-tasks-null-target_keys.json b/tests/testthat/testdata/v4.0.1-tasks-null-target_keys.json new file mode 100644 index 0000000..fc038f7 --- /dev/null +++ b/tests/testthat/testdata/v4.0.1-tasks-null-target_keys.json @@ -0,0 +1,93 @@ +{ + "schema_version": "https://raw.githubusercontent.com/hubverse-org/schemas/main/v4.0.1/tasks-schema.json", + "rounds": [{ + "round_id_from_variable": true, + "round_id": "forecast_date", + "model_tasks": [{ + "task_ids": { + "forecast_date": { + "required": null, + "optional": [ + "2022-12-12", "2022-12-19", "2022-12-26", "2023-01-02", "2023-01-09", + "2023-01-16", "2023-01-23", "2023-01-30", "2023-02-06", "2023-02-13", + "2023-02-20", "2023-02-27", "2023-03-06", "2023-03-13", "2023-03-20", + "2023-03-27", "2023-04-03", "2023-04-10", "2023-04-17", "2023-04-24", + "2023-05-01" + ] + }, + "target": { + "required": null, + "optional": ["wk ahead inc"] + }, + "target_metric": { + "required": null, + "optional": ["flu hosp"] + }, + "horizon": { + "required": [2], + "optional": [1] + }, + "location": { + "required": ["US"], + "optional": [ + "01", + "02" + ] + }, + "target_date": { + "required": null, + "optional": [ + "2022-12-19", "2022-12-26", "2023-01-02", "2023-01-09", + "2023-01-16", "2023-01-23", "2023-01-30", "2023-02-06", "2023-02-13", + "2023-02-20", "2023-02-27", "2023-03-06", "2023-03-13", "2023-03-20", + "2023-03-27", "2023-04-03", "2023-04-10", "2023-04-17", "2023-04-24", + "2023-05-01", "2023-05-08", "2023-05-15" + ] + } + }, + "output_type": { + "sample": { + "output_type_id_params": { + "type": "character", + "min_samples_per_task": 50, + "max_samples_per_task": 100, + "max_length": 10 + }, + "is_required": true, + "value": { + "type": "integer", + "minimum": 0 + } + }, + "mean": { + "output_type_id": { + "required": null + }, + "is_required": true, + "value": { + "type": "double", + "minimum": 0 + } + } + }, + "target_metadata": [{ + "target_id": "wk ahead inc flu hosp", + "target_name": "weekly influenza hospitalization incidence", + "target_units": "rate per 100,000 population", + "target_keys": null, + "target_type": "discrete", + "description": "This target represents the counts of new hospitalizations per horizon week.", + "is_step_ahead": true, + "time_unit": "week" + }] + }], + "submissions_due": { + "relative_to": "forecast_date", + "start": -6, + "end": 2 + }, + "derived_task_ids": ["target_date"] + } + + ] +} From 9874ab8724b59fd24353672d20e952128ddb2f05 Mon Sep 17 00:00:00 2001 From: Anna Krystalli Date: Wed, 18 Dec 2024 11:51:37 +0200 Subject: [PATCH 06/16] reorganise tests --- tests/testthat/test-validate_config.R | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/testthat/test-validate_config.R b/tests/testthat/test-validate_config.R index cbd64e1..0ab993b 100644 --- a/tests/testthat/test-validate_config.R +++ b/tests/testthat/test-validate_config.R @@ -252,7 +252,7 @@ test_that("v4 validation works", { ) }) -test_that("target keys with 2 properties throws error", { +test_that("v4.0.1 target keys with 2 properties throws error", { skip_if_offline() config_path <- testthat::test_path("testdata", "v4.0.1-tasks-2-target_keys.json") out <- suppressMessages( @@ -269,7 +269,9 @@ test_that("target keys with 2 properties throws error", { "must NOT have more than 1 items" ) expect_equal(nrow(attr(out, "errors")), 2L) +}) +test_that("v4.0.1 target keys with NULL properties passes", { # Ensure NULL target keys are still allowed. config_path <- testthat::test_path("testdata", "v4.0.1-tasks-null-target_keys.json") out <- suppressMessages( From 25b01c583f1ea007490360984de3f7f700075030 Mon Sep 17 00:00:00 2001 From: Anna Krystalli Date: Wed, 18 Dec 2024 11:57:28 +0200 Subject: [PATCH 07/16] correct option specification. Does ot affect tests as it is setting to the default value anyways. --- tests/testthat/test-create_output_type_item.R | 8 ++++---- tests/testthat/test-create_task_id.R | 2 +- tests/testthat/test-download_tasks_schema.R | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/testthat/test-create_output_type_item.R b/tests/testthat/test-create_output_type_item.R index c26ba49..7c17214 100644 --- a/tests/testthat/test-create_output_type_item.R +++ b/tests/testthat/test-create_output_type_item.R @@ -452,7 +452,7 @@ test_that("schema version option works for create_output_type_mean", { withr::with_options( list( hubAdmin.schema_version = "v3.0.1", - hubAmin.branch = "main" + hubAdmin.branch = "main" ), { opt_version <- create_output_type_mean( @@ -493,7 +493,7 @@ test_that("schema version option works for create_output_type_quantile", { withr::with_options( list( hubAdmin.schema_version = "v3.0.1", - hubAmin.branch = "main" + hubAdmin.branch = "main" ), { opt_version <- create_output_type_quantile( @@ -543,7 +543,7 @@ test_that("schema version option works for create_output_type_cdf", { withr::with_options( list( hubAdmin.schema_version = "v3.0.1", - hubAmin.branch = "main" + hubAdmin.branch = "main" ), { opt_version <- create_output_type_cdf( @@ -590,7 +590,7 @@ test_that("schema version option works for create_output_type_pmf", { withr::with_options( list( hubAdmin.schema_version = "v3.0.1", - hubAmin.branch = "main" + hubAdmin.branch = "main" ), { opt_version <- create_output_type_pmf( diff --git a/tests/testthat/test-create_task_id.R b/tests/testthat/test-create_task_id.R index 044cef8..a85eb52 100644 --- a/tests/testthat/test-create_task_id.R +++ b/tests/testthat/test-create_task_id.R @@ -114,7 +114,7 @@ test_that("schema version option works for create_task_id", { withr::with_options( list( hubAdmin.schema_version = "v3.0.1", - hubAmin.branch = "main" + hubAdmin.branch = "main" ), { opt_version <- create_task_id("horizon", diff --git a/tests/testthat/test-download_tasks_schema.R b/tests/testthat/test-download_tasks_schema.R index 236d6fd..0e2dd30 100644 --- a/tests/testthat/test-download_tasks_schema.R +++ b/tests/testthat/test-download_tasks_schema.R @@ -40,7 +40,7 @@ test_that("schema version option works for download_tasks_schema", { withr::with_options( list(hubAdmin.schema_version = "v3.0.1", - hubAmin.branch = "main"), + hubAdmin.branch = "main"), { opt_version <- download_tasks_schema() } From 887c3614b2af6b5e40ac7db304a4e10549855f9b Mon Sep 17 00:00:00 2001 From: "Zhian N. Kamvar (UMass)" Date: Wed, 11 Dec 2024 09:05:43 -0800 Subject: [PATCH 08/16] remove class before testing if validate output is false A weird bug just popped up and I don't know where it's coming from, but effectively, when a value with a class of "error" is passed to `encodeString()`, it fails with: Error in UseMethod("conditionMessage") : no applicable method for 'conditionMessage' applied to an object of class "error" This never used to happen, so I'm fixing it here. --- tests/testthat/test-validate_config.R | 2 +- tests/testthat/test-validate_model_metadata_schema.R | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/testthat/test-validate_config.R b/tests/testthat/test-validate_config.R index 0ab993b..f683ac5 100644 --- a/tests/testthat/test-validate_config.R +++ b/tests/testthat/test-validate_config.R @@ -41,7 +41,7 @@ test_that("Missing files returns an invalid config with an immediate message", { suppressMessages({ expect_message(out <- validate_config(hub_path = tmp), "File does not exist") }) - expect_false(out) + expect_false(unclass(out)) }) test_that("Config for samples fail correctly", { skip_if_offline() diff --git a/tests/testthat/test-validate_model_metadata_schema.R b/tests/testthat/test-validate_model_metadata_schema.R index 0176ba3..aa4b6d3 100644 --- a/tests/testthat/test-validate_model_metadata_schema.R +++ b/tests/testthat/test-validate_model_metadata_schema.R @@ -6,7 +6,7 @@ test_that("Missing files returns an invalid config with an immediate message", { "File does not exist" ) }) - expect_false(out) + expect_false(unclass(out)) }) test_that("validate_model_metadata_schema works", { @@ -28,7 +28,7 @@ test_that("validate_model_metadata_schema works", { ) ) ) - expect_false(out_error) + expect_false(unclass(out_error)) expect_snapshot(out_error) # prints .Last.value expect_snapshot(print(out_error)) # prints out_error expect_snapshot(str(attr(out_error, "errors"))) @@ -51,6 +51,6 @@ test_that("validate_model_metadata_schema errors for imparsable json", { "SyntaxError" ) }) - expect_false(out) + expect_false(unclass(out)) }) From 30ff1cb8f15e491e6f0d22aff8f29539ab00f750 Mon Sep 17 00:00:00 2001 From: Anna Krystalli Date: Wed, 18 Dec 2024 12:56:18 +0200 Subject: [PATCH 09/16] update NEWS --- NEWS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/NEWS.md b/NEWS.md index a48d396..65a3195 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,7 @@ # hubAdmin (development version) * Use options to set `schema_version` and `branch` arguments in `download_tasks_schema()` and the `create_*()` family of functions for creating config files programmatically. This allows for setting the schema version and branch globally for the session (#85). +* As of schema version v4.0.1, only a single `target_keys` element is allowed when creating target metadata items programmatically (#89). # hubAdmin 1.4.0 From 03659f66d907c4297c1e7d33dc30fcc10df3cdef Mon Sep 17 00:00:00 2001 From: Anna Krystalli Date: Wed, 18 Dec 2024 13:06:09 +0200 Subject: [PATCH 10/16] try using full schema_id url to silence oldrel-1 test failures. See e.g. https://github.com/hubverse-org/hubAdmin/actions/runs/12391309689/job/34588132394?pr=90#step:7:697 --- R/create_target_metadata_item.R | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/R/create_target_metadata_item.R b/R/create_target_metadata_item.R index a09a6f4..4598ea2 100644 --- a/R/create_target_metadata_item.R +++ b/R/create_target_metadata_item.R @@ -118,7 +118,10 @@ create_target_metadata_item <- function(target_id, target_name, target_units, } ) - check_target_keys(target_keys, schema_version, call = call) + check_target_keys(target_keys, + schema_version = schema$`$id`, + call = call + ) structure(mget(property_names), class = c("target_metadata_item", "list"), From bf87c58534c32f2a6c9f6126786911bf4c75cee0 Mon Sep 17 00:00:00 2001 From: Anna Krystalli Date: Wed, 18 Dec 2024 13:13:33 +0200 Subject: [PATCH 11/16] appease lintr --- tests/testthat/test-validate_config.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/testthat/test-validate_config.R b/tests/testthat/test-validate_config.R index 630d1c1..529f92c 100644 --- a/tests/testthat/test-validate_config.R +++ b/tests/testthat/test-validate_config.R @@ -284,7 +284,7 @@ test_that("v4.0.1 target keys with NULL properties passes", { ) expect_true(out) }) - + test_that("v4.0.1 round_id pattern validation works", { skip_if_offline() # TODO: remove branch argument when v4.0.1 is released. From 2ece0c356cfbb974b44af55696d02d047504f73a Mon Sep 17 00:00:00 2001 From: Anna Krystalli Date: Fri, 17 Jan 2025 10:52:40 +0200 Subject: [PATCH 12/16] Update R/create_target_metadata_item.R Co-authored-by: Zhian N. Kamvar --- R/create_target_metadata_item.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/create_target_metadata_item.R b/R/create_target_metadata_item.R index 4598ea2..8c0b32a 100644 --- a/R/create_target_metadata_item.R +++ b/R/create_target_metadata_item.R @@ -13,7 +13,7 @@ #' @param target_units character string. Unit of observation of the target. #' @param target_keys named list or `NULL`. The `target_keys` value defines a #' single target. -#' Should be `NULL`, in the case where the target is not specified as a task_id +#' Should be `NULL` in the case where the target is not specified as a task_id #' but is specified solely through the `target_id` argument. #' Otherwise, should be a named list containing a single character string element. #' The name of the element should match a `task_id` From 92f46874e584d027c952dd4f338910a7154a1796 Mon Sep 17 00:00:00 2001 From: Anna Krystalli Date: Fri, 17 Jan 2025 10:52:48 +0200 Subject: [PATCH 13/16] Update R/create_target_metadata_item.R Co-authored-by: Zhian N. Kamvar --- R/create_target_metadata_item.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/create_target_metadata_item.R b/R/create_target_metadata_item.R index 8c0b32a..ea4f1a7 100644 --- a/R/create_target_metadata_item.R +++ b/R/create_target_metadata_item.R @@ -18,7 +18,7 @@ #' Otherwise, should be a named list containing a single character string element. #' The name of the element should match a `task_id` #' variable name within the same `model_tasks` object and the value should match -#' a single value of that variable. +#' a single value of that variable as described in [target metadata section of the official hubverse documentation](https://hubverse.io/en/latest/user-guide/tasks.html#target-metadata). #' @param description character string (optional). An optional verbose description #' of the target that might include information such as definitions of a 'rate' or similar. #' @param target_type character string. Target statistical data type. Consult the From dd325b5ea1ce3c749c13c434416f524d3b9a8f2c Mon Sep 17 00:00:00 2001 From: Anna Krystalli Date: Fri, 17 Jan 2025 10:59:11 +0200 Subject: [PATCH 14/16] Apply suggestions from review --- R/create_target_metadata_item.R | 11 ++++++----- man/create_target_metadata_item.Rd | 13 +++++++------ 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/R/create_target_metadata_item.R b/R/create_target_metadata_item.R index ea4f1a7..7109a00 100644 --- a/R/create_target_metadata_item.R +++ b/R/create_target_metadata_item.R @@ -13,12 +13,13 @@ #' @param target_units character string. Unit of observation of the target. #' @param target_keys named list or `NULL`. The `target_keys` value defines a #' single target. -#' Should be `NULL` in the case where the target is not specified as a task_id +#' Should be a named list containing a single character string element. +#' The name of the element should match a `task_id` variable name within the same +#' `model_tasks` object and the value should match a single value of that variable +#' as described in +#' [target metadata section of the official hubverse documentation](https://hubverse.io/en/latest/user-guide/tasks.html#target-metadata). # nolint: line_length_linter +#' Otherwise, `NULL` in the case where the target is not specified as a task_id #' but is specified solely through the `target_id` argument. -#' Otherwise, should be a named list containing a single character string element. -#' The name of the element should match a `task_id` -#' variable name within the same `model_tasks` object and the value should match -#' a single value of that variable as described in [target metadata section of the official hubverse documentation](https://hubverse.io/en/latest/user-guide/tasks.html#target-metadata). #' @param description character string (optional). An optional verbose description #' of the target that might include information such as definitions of a 'rate' or similar. #' @param target_type character string. Target statistical data type. Consult the diff --git a/man/create_target_metadata_item.Rd b/man/create_target_metadata_item.Rd index a2c6029..cd21ee5 100644 --- a/man/create_target_metadata_item.Rd +++ b/man/create_target_metadata_item.Rd @@ -28,12 +28,13 @@ that could be used, for example, as a visualisation axis label.} \item{target_keys}{named list or \code{NULL}. The \code{target_keys} value defines a single target. -Should be \code{NULL}, in the case where the target is not specified as a task_id -but is specified solely through the \code{target_id} argument. -Otherwise, should be a named list containing a single character string element. -The name of the element should match a \code{task_id} -variable name within the same \code{model_tasks} object and the value should match -a single value of that variable.} +Should be a named list containing a single character string element. +The name of the element should match a \code{task_id} variable name within the same +\code{model_tasks} object and the value should match a single value of that variable +as described in +\href{https://hubverse.io/en/latest/user-guide/tasks.html#target-metadata}{target metadata section of the official hubverse documentation}. # nolint: line_length_linter +Otherwise, \code{NULL} in the case where the target is not specified as a task_id +but is specified solely through the \code{target_id} argument.} \item{description}{character string (optional). An optional verbose description of the target that might include information such as definitions of a 'rate' or similar.} From 40d21a9db28407fc202376596539f842ef696a6b Mon Sep 17 00:00:00 2001 From: Anna Krystalli Date: Fri, 17 Jan 2025 11:11:42 +0200 Subject: [PATCH 15/16] Change any mention of schema version v4.0.1 to v5.0.0 --- NEWS.md | 2 +- R/create_target_metadata_item.R | 6 ++-- .../_snaps/create_target_metadata_item.md | 2 +- tests/testthat/test-create_round.R | 8 ++--- .../test-create_target_metadata_item.R | 12 ++++---- tests/testthat/test-validate_config.R | 30 +++++++++---------- ...s.json => v5.0.0-tasks-2-target_keys.json} | 2 +- ...> v5.0.0-tasks-fail-round-id-pattern.json} | 2 +- ....0.0-tasks-fail-round-id-val-pattern.json} | 2 +- ...son => v5.0.0-tasks-null-target_keys.json} | 2 +- 10 files changed, 34 insertions(+), 34 deletions(-) rename tests/testthat/testdata/{v4.0.1-tasks-2-target_keys.json => v5.0.0-tasks-2-target_keys.json} (99%) rename tests/testthat/testdata/{v4.0.1-tasks-fail-round-id-pattern.json => v5.0.0-tasks-fail-round-id-pattern.json} (99%) rename tests/testthat/testdata/{v4.0.1-tasks-fail-round-id-val-pattern.json => v5.0.0-tasks-fail-round-id-val-pattern.json} (99%) rename tests/testthat/testdata/{v4.0.1-tasks-null-target_keys.json => v5.0.0-tasks-null-target_keys.json} (98%) diff --git a/NEWS.md b/NEWS.md index 3a36427..30b605b 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,7 +2,7 @@ * Use options to set `schema_version` and `branch` arguments in `download_tasks_schema()` and the `create_*()` family of functions for creating config files programmatically. This allows for setting the schema version and branch globally for the session (#85). * Make validation of `round_id` patterns explicit. This ties in with schema version v4.0.1 where the pattern the `round_id` property must match if `round_id_from_variable` is `false` is now specified as a regular expression in the schema. This check is also now implemented dynamically on values of the `round_id` variable if `round_id_from_variable` is `true` when validating tasks.json config files. Checks on `round_id` patterns are also now implemented in `create_round()` when creating rounds programmatically. -* As of schema version v4.0.1, only a single `target_keys` element is allowed when creating target metadata items programmatically (#89). +* As of schema version v5.0.0, only a single `target_keys` element is allowed when creating target metadata items programmatically (#89). # hubAdmin 1.4.0 diff --git a/R/create_target_metadata_item.R b/R/create_target_metadata_item.R index 7109a00..ade3d03 100644 --- a/R/create_target_metadata_item.R +++ b/R/create_target_metadata_item.R @@ -155,12 +155,12 @@ check_target_keys <- function(target_keys, schema_version, call = call ) } - is_gte_v4_0_1 <- hubUtils::version_gte( - "v4.0.1", + is_gte_v5_0_0 <- hubUtils::version_gte( + "v5.0.0", schema_version = schema_version ) target_key_n <- length(target_keys) - if (is_gte_v4_0_1 && target_key_n > 1L) { + if (is_gte_v5_0_0 && target_key_n > 1L) { cli::cli_abort( c( "!" = "{.arg target_keys} must be a named {.cls list} of diff --git a/tests/testthat/_snaps/create_target_metadata_item.md b/tests/testthat/_snaps/create_target_metadata_item.md index 574c957..859795b 100644 --- a/tests/testthat/_snaps/create_target_metadata_item.md +++ b/tests/testthat/_snaps/create_target_metadata_item.md @@ -162,7 +162,7 @@ - "https://raw.githubusercontent.com/hubverse-org/schemas/main/v3.0.1/tasks-schema.json" + "https://raw.githubusercontent.com/hubverse-org/schemas/main/v4.0.0/tasks-schema.json" -# Target_keys of length more than 1 are not allowed post v4.0.1 +# Target_keys of length more than 1 are not allowed post v5.0.0 Code create_target_metadata_item(target_id = "flu inc hosp", target_name = "Weekly incident influenza hospitalizations", diff --git a/tests/testthat/test-create_round.R b/tests/testthat/test-create_round.R index 30ce7e1..a4a6f1a 100644 --- a/tests/testthat/test-create_round.R +++ b/tests/testthat/test-create_round.R @@ -229,8 +229,8 @@ test_that("validating round_id patterns when round_id_from_var = TRUE works", { skip_if_offline() withr::with_options( list( - hubAdmin.schema_version = "v4.0.1", - hubAdmin.branch = "br-v4.0.1" + hubAdmin.schema_version = "v5.0.0", + hubAdmin.branch = "br-v5.0.0" ), { output_types <- create_output_type( @@ -372,8 +372,8 @@ test_that("validating round_id pattern when round_id_from_var = FALSE works", { skip_if_offline() withr::with_options( list( - hubAdmin.schema_version = "v4.0.1", - hubAdmin.branch = "br-v4.0.1" + hubAdmin.schema_version = "v5.0.0", + hubAdmin.branch = "br-v5.0.0" ), { output_types <- create_output_type( diff --git a/tests/testthat/test-create_target_metadata_item.R b/tests/testthat/test-create_target_metadata_item.R index eba13c4..e91768b 100644 --- a/tests/testthat/test-create_target_metadata_item.R +++ b/tests/testthat/test-create_target_metadata_item.R @@ -149,16 +149,16 @@ test_that("schema version option works for create_target_metadata_item", { expect_snapshot(waldo::compare(opt_version, version_default)) }) -test_that("Target_keys of length more than 1 are not allowed post v4.0.1", { +test_that("Target_keys of length more than 1 are not allowed post v5.0.0", { skip_if_offline() withr::with_options( list( - hubAdmin.schema_version = "v4.0.1", - # TDOD: remove branch argument when v4.0.1 is released. - hubAdmin.branch = "ak/v4.0.1/restrict-target-key-value-pair-n/117" + hubAdmin.schema_version = "v5.0.0", + # TDOD: remove branch argument when v5.0.0 is released. + hubAdmin.branch = "br-v5.0.0" ), { - # One target_key is allowed in v4.0.1 and later versions. + # One target_key is allowed in v5.0.0 and later versions. target_keys_n1 <- create_target_metadata_item( target_id = "inc hosp", target_name = "Weekly incident influenza hospitalizations", @@ -171,7 +171,7 @@ test_that("Target_keys of length more than 1 are not allowed post v4.0.1", { expect_s3_class(target_keys_n1, "target_metadata_item") expect_length(target_keys_n1$target_keys, 1L) - # More than one target_key is NOT allowed in v4.0.1 and later versions + # More than one target_key is NOT allowed in v5.0.0 and later versions # and throws error. expect_snapshot( create_target_metadata_item( diff --git a/tests/testthat/test-validate_config.R b/tests/testthat/test-validate_config.R index 529f92c..95935b5 100644 --- a/tests/testthat/test-validate_config.R +++ b/tests/testthat/test-validate_config.R @@ -253,14 +253,14 @@ test_that("v4 validation works", { }) -test_that("v4.0.1 target keys with 2 properties throws error", { +test_that("v5.0.0 target keys with 2 properties throws error", { skip_if_offline() - config_path <- testthat::test_path("testdata", "v4.0.1-tasks-2-target_keys.json") + config_path <- testthat::test_path("testdata", "v5.0.0-tasks-2-target_keys.json") out <- suppressMessages( validate_config( config_path = config_path, - # TDOD: remove branch argument when v4.0.1 is released. - branch = "ak/v4.0.1/restrict-target-key-value-pair-n/117" + # TDOD: remove branch argument when v5.0.0 is released. + branch = "br-v5.0.0" ) ) expect_false(out) @@ -272,23 +272,23 @@ test_that("v4.0.1 target keys with 2 properties throws error", { expect_equal(nrow(attr(out, "errors")), 2L) }) -test_that("v4.0.1 target keys with NULL properties passes", { +test_that("v5.0.0 target keys with NULL properties passes", { # Ensure NULL target keys are still allowed. - config_path <- testthat::test_path("testdata", "v4.0.1-tasks-null-target_keys.json") + config_path <- testthat::test_path("testdata", "v5.0.0-tasks-null-target_keys.json") out <- suppressMessages( validate_config( config_path = config_path, - # TDOD: remove branch argument when v4.0.1 is released. - branch = "ak/v4.0.1/restrict-target-key-value-pair-n/117" + # TDOD: remove branch argument when v5.0.0 is released. + branch = "br-v5.0.0" ) ) expect_true(out) }) -test_that("v4.0.1 round_id pattern validation works", { +test_that("v5.0.0 round_id pattern validation works", { skip_if_offline() - # TODO: remove branch argument when v4.0.1 is released. - schema <- download_tasks_schema("v4.0.1", branch = "br-v4.0.1") + # TODO: remove branch argument when v5.0.0 is released. + schema <- download_tasks_schema("v5.0.0", branch = "br-v5.0.0") # Test that regex pattern matching for round_id properties in jsonvalidate # identifies expected errors (when round_id_from_variable: false). @@ -297,9 +297,9 @@ test_that("v4.0.1 round_id pattern validation works", { validate_config( config_path = testthat::test_path( "testdata", - "v4.0.1-tasks-fail-round-id-pattern.json" + "v5.0.0-tasks-fail-round-id-pattern.json" ), - branch = "br-v4.0.1" + branch = "br-v5.0.0" ) ) ) @@ -325,9 +325,9 @@ test_that("v4.0.1 round_id pattern validation works", { validate_config( config_path = testthat::test_path( "testdata", - "v4.0.1-tasks-fail-round-id-val-pattern.json" + "v5.0.0-tasks-fail-round-id-val-pattern.json" ), - branch = "br-v4.0.1" + branch = "br-v5.0.0" ) ) ) diff --git a/tests/testthat/testdata/v4.0.1-tasks-2-target_keys.json b/tests/testthat/testdata/v5.0.0-tasks-2-target_keys.json similarity index 99% rename from tests/testthat/testdata/v4.0.1-tasks-2-target_keys.json rename to tests/testthat/testdata/v5.0.0-tasks-2-target_keys.json index d9a8c81..182014c 100644 --- a/tests/testthat/testdata/v4.0.1-tasks-2-target_keys.json +++ b/tests/testthat/testdata/v5.0.0-tasks-2-target_keys.json @@ -1,5 +1,5 @@ { - "schema_version": "https://raw.githubusercontent.com/hubverse-org/schemas/main/v4.0.1/tasks-schema.json", + "schema_version": "https://raw.githubusercontent.com/hubverse-org/schemas/main/v5.0.0/tasks-schema.json", "rounds": [{ "round_id_from_variable": true, "round_id": "forecast_date", diff --git a/tests/testthat/testdata/v4.0.1-tasks-fail-round-id-pattern.json b/tests/testthat/testdata/v5.0.0-tasks-fail-round-id-pattern.json similarity index 99% rename from tests/testthat/testdata/v4.0.1-tasks-fail-round-id-pattern.json rename to tests/testthat/testdata/v5.0.0-tasks-fail-round-id-pattern.json index 0813782..24517c0 100644 --- a/tests/testthat/testdata/v4.0.1-tasks-fail-round-id-pattern.json +++ b/tests/testthat/testdata/v5.0.0-tasks-fail-round-id-pattern.json @@ -1,5 +1,5 @@ { - "schema_version": "https://raw.githubusercontent.com/hubverse-org/schemas/main/v4.0.1/tasks-schema.json", + "schema_version": "https://raw.githubusercontent.com/hubverse-org/schemas/main/v5.0.0/tasks-schema.json", "rounds": [{ "round_id_from_variable": true, "round_id": "round_id_var", diff --git a/tests/testthat/testdata/v4.0.1-tasks-fail-round-id-val-pattern.json b/tests/testthat/testdata/v5.0.0-tasks-fail-round-id-val-pattern.json similarity index 99% rename from tests/testthat/testdata/v4.0.1-tasks-fail-round-id-val-pattern.json rename to tests/testthat/testdata/v5.0.0-tasks-fail-round-id-val-pattern.json index ebcfd66..09a4217 100644 --- a/tests/testthat/testdata/v4.0.1-tasks-fail-round-id-val-pattern.json +++ b/tests/testthat/testdata/v5.0.0-tasks-fail-round-id-val-pattern.json @@ -1,5 +1,5 @@ { - "schema_version": "https://raw.githubusercontent.com/hubverse-org/schemas/main/v4.0.1/tasks-schema.json", + "schema_version": "https://raw.githubusercontent.com/hubverse-org/schemas/main/v5.0.0/tasks-schema.json", "rounds": [{ "round_id_from_variable": true, "round_id": "round_id_var", diff --git a/tests/testthat/testdata/v4.0.1-tasks-null-target_keys.json b/tests/testthat/testdata/v5.0.0-tasks-null-target_keys.json similarity index 98% rename from tests/testthat/testdata/v4.0.1-tasks-null-target_keys.json rename to tests/testthat/testdata/v5.0.0-tasks-null-target_keys.json index fc038f7..5dc10d0 100644 --- a/tests/testthat/testdata/v4.0.1-tasks-null-target_keys.json +++ b/tests/testthat/testdata/v5.0.0-tasks-null-target_keys.json @@ -1,5 +1,5 @@ { - "schema_version": "https://raw.githubusercontent.com/hubverse-org/schemas/main/v4.0.1/tasks-schema.json", + "schema_version": "https://raw.githubusercontent.com/hubverse-org/schemas/main/v5.0.0/tasks-schema.json", "rounds": [{ "round_id_from_variable": true, "round_id": "forecast_date", From 97bdc3fb90edafb59addaa4399b1bc6961535d90 Mon Sep 17 00:00:00 2001 From: Anna Krystalli Date: Fri, 17 Jan 2025 11:11:55 +0200 Subject: [PATCH 16/16] add Rsudio project id --- hubAdmin.Rproj | 1 + 1 file changed, 1 insertion(+) diff --git a/hubAdmin.Rproj b/hubAdmin.Rproj index 97b9e3f..a7bcba2 100644 --- a/hubAdmin.Rproj +++ b/hubAdmin.Rproj @@ -1,4 +1,5 @@ Version: 1.0 +ProjectId: a853e49a-e7e8-463b-96b8-8c69e98c0382 RestoreWorkspace: No SaveWorkspace: No