Create new or convert list to hub_validations
S3 class object
Source: R/new_hub_validations.R
new_hub_validations.Rd
Create new or convert list to hub_validations
S3 class object
Arguments
- ...
named elements to be included. Each element must be an object which inherits from class
<hub_check>
.- x
a list of named elements. Each element must be an object which inherits from class
<hub_check>
.
Functions
new_hub_validations()
: Create new<hub_validations>
S3 class objectas_hub_validations()
: Convert list to<hub_validations>
S3 class object
Examples
new_hub_validations()
#> ::notice ::Empty <hub_validations>
hub_path <- system.file("testhubs/simple", package = "hubValidations")
file_path <- "team1-goodmodel/2022-10-08-team1-goodmodel.csv"
new_hub_validations(
file_exists = check_file_exists(file_path, hub_path),
file_name = check_file_name(file_path)
)
#> ::notice ::✔ 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.
x <- list(
file_exists = check_file_exists(file_path, hub_path),
file_name = check_file_name(file_path)
)
as_hub_validations(x)
#> ::notice ::✔ 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.