-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add test for NULL target keys in v4.0.1
- Loading branch information
1 parent
d5b8201
commit 3feb79b
Showing
2 changed files
with
104 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
93 changes: 93 additions & 0 deletions
93
tests/testthat/testdata/v4.0.1-tasks-null-target_keys.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"] | ||
} | ||
|
||
] | ||
} |