diff --git a/articles/custom-functions.html b/articles/custom-functions.html index c21d394c..9879639b 100644 --- a/articles/custom-functions.html +++ b/articles/custom-functions.html @@ -224,16 +224,15 @@
validate_model_data()
validation function which checks the
content of the model data submission files.
-:
- default:
- validate_model_data:
- horizon_timediff: "opt_check_tbl_horizon_timediff"
- fn: "hubValidations"
- pkg:
- args: "forecast_date"
- t0_colname: "target_end_date"
- t1_colname: "horizon"
- horizon_colname: !expr lubridate::weeks() timediff
+default:
+ validate_model_data:
+ horizon_timediff:
+ fn: "opt_check_tbl_horizon_timediff"
+ pkg: "hubValidations"
+ args:
+ t0_colname: "forecast_date"
+ t1_colname: "target_end_date"
The above configuration file relies on default values for arguments
horizon_colname
("horizon"
) and
timediff
(lubridate::weeks()
). We can use the
diff --git a/pkgdown.yml b/pkgdown.yml
index 5acecbf2..4ae23dff 100644
--- a/pkgdown.yml
+++ b/pkgdown.yml
@@ -3,7 +3,7 @@ pkgdown: 2.0.7
pkgdown_sha: ~
articles:
custom-functions: custom-functions.html
-last_built: 2023-09-28T10:29Z
+last_built: 2023-09-28T10:40Z
urls:
reference: https://infectious-disease-modeling-hubs.github.io/hubValidations/reference
article: https://infectious-disease-modeling-hubs.github.io/hubValidations/articles
diff --git a/reference/validate_pr.html b/reference/validate_pr.html
index 96f5cb86..e223d385 100644
--- a/reference/validate_pr.html
+++ b/reference/validate_pr.html
@@ -114,7 +114,14 @@
if (FALSE) {
+validate_pr(
+ hub_path = ".",
+ gh_repo = "Infectious-Disease-Modeling-Hubs/ci-testhub-simple",
+ pr_number = 3
+)
+}
+
hub_path <- system.file("testhubs/simple", package = "hubValidations")
file_path <- "team1-goodmodel/2022-10-08-team1-goodmodel.csv"
validate_submission(hub_path, file_path)
-#> ::notice ::✔ simple: All hub config files are valid.%0A✔ 2022-10-08-team1-goodmodel.csv: File exists at path%0A model-output/team1-goodmodel/2022-10-08-team1-goodmodel.csv.%0A✔ 2022-10-08-team1-goodmodel.csv: File name "2022-10-08-team1-goodmodel.csv" is%0A valid.%0A✔ 2022-10-08-team1-goodmodel.csv: File directory name matches `model_id`%0A metadata in file name.%0A✔ 2022-10-08-team1-goodmodel.csv: `round_id` is valid.%0A✔ 2022-10-08-team1-goodmodel.csv: File is accepted hub format.%0A✔ 2022-10-08-team1-goodmodel.csv: Metadata file exists at path%0A model-metadata/team1-goodmodel.yaml.%0A✔ 2022-10-08-team1-goodmodel.csv: File could be read successfully.%0A✔ 2022-10-08-team1-goodmodel.csv: `round_id_col` name is valid.%0A✔ 2022-10-08-team1-goodmodel.csv: `round_id` column "origin_date" contains a%0A single, unique round ID value.%0A✔ 2022-10-08-team1-goodmodel.csv: All `round_id_col` "origin_date" values match%0A submission `round_id` from file name.%0A✔ 2022-10-08-team1-goodmodel.csv: Column names are consistent with expected%0A round task IDs and std column names.%0A✔ 2022-10-08-team1-goodmodel.csv: Column data types match hub schema.%0A✔ 2022-10-08-team1-goodmodel.csv: Data rows contain valid value combinations%0A✔ 2022-10-08-team1-goodmodel.csv: All combinations of task ID%0A column/`output_type`/`output_type_id` values are unique.%0A✔ 2022-10-08-team1-goodmodel.csv: Required task ID/output type/output type ID%0A combinations all present.%0A✔ 2022-10-08-team1-goodmodel.csv: Values in column `value` all valid with%0A respect to modeling task config.%0A✔ 2022-10-08-team1-goodmodel.csv: Values in `value` column are non-decreasing%0A as output_type_ids increase for all unique task ID value/output type%0A combinations of quantile or cdf output types.%0Aℹ 2022-10-08-team1-goodmodel.csv: No pmf output types to check for sum of 1.%0A Check skipped.%0A! 2022-10-08-team1-goodmodel.csv: Submission time must be within accepted%0A submission window for round. Current time 2023-09-28 10:29:34.449662 is%0A outside window 2022-10-02 EDT--2022-10-09 23:59:59 EDT.
+#> ::notice ::✔ simple: All hub config files are valid.%0A✔ 2022-10-08-team1-goodmodel.csv: File exists at path%0A model-output/team1-goodmodel/2022-10-08-team1-goodmodel.csv.%0A✔ 2022-10-08-team1-goodmodel.csv: File name "2022-10-08-team1-goodmodel.csv" is%0A valid.%0A✔ 2022-10-08-team1-goodmodel.csv: File directory name matches `model_id`%0A metadata in file name.%0A✔ 2022-10-08-team1-goodmodel.csv: `round_id` is valid.%0A✔ 2022-10-08-team1-goodmodel.csv: File is accepted hub format.%0A✔ 2022-10-08-team1-goodmodel.csv: Metadata file exists at path%0A model-metadata/team1-goodmodel.yaml.%0A✔ 2022-10-08-team1-goodmodel.csv: File could be read successfully.%0A✔ 2022-10-08-team1-goodmodel.csv: `round_id_col` name is valid.%0A✔ 2022-10-08-team1-goodmodel.csv: `round_id` column "origin_date" contains a%0A single, unique round ID value.%0A✔ 2022-10-08-team1-goodmodel.csv: All `round_id_col` "origin_date" values match%0A submission `round_id` from file name.%0A✔ 2022-10-08-team1-goodmodel.csv: Column names are consistent with expected%0A round task IDs and std column names.%0A✔ 2022-10-08-team1-goodmodel.csv: Column data types match hub schema.%0A✔ 2022-10-08-team1-goodmodel.csv: Data rows contain valid value combinations%0A✔ 2022-10-08-team1-goodmodel.csv: All combinations of task ID%0A column/`output_type`/`output_type_id` values are unique.%0A✔ 2022-10-08-team1-goodmodel.csv: Required task ID/output type/output type ID%0A combinations all present.%0A✔ 2022-10-08-team1-goodmodel.csv: Values in column `value` all valid with%0A respect to modeling task config.%0A✔ 2022-10-08-team1-goodmodel.csv: Values in `value` column are non-decreasing%0A as output_type_ids increase for all unique task ID value/output type%0A combinations of quantile or cdf output types.%0Aℹ 2022-10-08-team1-goodmodel.csv: No pmf output types to check for sum of 1.%0A Check skipped.%0A! 2022-10-08-team1-goodmodel.csv: Submission time must be within accepted%0A submission window for round. Current time 2023-09-28 10:40:38.832158 is%0A outside window 2022-10-02 EDT--2022-10-09 23:59:59 EDT.