Package: hubValidations 2.1.0

Anna Krystalli

hubValidations: Testing framework for hubverse hub validations

This package aims at providing a simple interface to run validations on data and metadata submitted to a hubverse modeling hub. Validation tests can be run at different levels (single file, single folder, whole repository) and locally as well as part of a continuous integration workflow.

Authors:Anna Krystalli [aut, cre], Evan Ray [aut], Hugo Gruson [aut], Zhian N. Kamvar [ctb], Consortium of Infectious Disease Modeling Hubs [cph]

hubValidations_2.1.0.tar.gz
hubValidations_2.1.0.zip(r-4.7)hubValidations_2.1.0.zip(r-4.6)hubValidations_2.1.0.zip(r-4.5)
hubValidations_2.1.0.tgz(r-4.6-any)hubValidations_2.1.0.tgz(r-4.5-any)
hubValidations_2.1.0.tar.gz(r-4.7-any)hubValidations_2.1.0.tar.gz(r-4.6-any)
hubValidations_2.1.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
hubValidations/json (API)
NEWS

# Install 'hubValidations' in R:
install.packages('hubValidations', repos = c('https://hubverse-org.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/hubverse-org/hubvalidations/issues

Pkgdown/docs site:https://hubverse-org.github.io

On CRAN:

Conda:

hubverse

5.66 score 4 stars 1 packages 58 scripts 104 exports 92 dependencies

Last updated from:fd6729fb86 (on v2.1.0). Checks:7 ERROR, 2 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64ERROR332
source / vignettesOK243
linux-release-x86_64ERROR228
macos-release-arm64ERROR225
macos-oldrel-arm64ERROR181
windows-develERROR996
windows-releaseERROR283
windows-oldrelERROR313
wasm-releaseOK260

Exports:%>%as_hub_validationsas_hub_validations_collectionas_target_validationsas_target_validations_collectioncapture_check_cndcapture_check_infocapture_exec_errorcapture_exec_warningcapture_validation_warningcheck_config_hub_validcheck_file_existscheck_file_formatcheck_file_locationcheck_file_ncheck_file_namecheck_file_readcheck_for_errorscheck_metadata_file_existscheck_metadata_file_extcheck_metadata_file_locationcheck_metadata_file_namecheck_metadata_matches_schemacheck_metadata_schema_existscheck_submission_metadata_file_existscheck_submission_timecheck_target_dataset_existscheck_target_dataset_file_ext_uniquecheck_target_dataset_rows_uniquecheck_target_dataset_uniquecheck_target_file_ext_validcheck_target_file_namecheck_target_file_readcheck_target_tbl_colnamescheck_target_tbl_coltypescheck_target_tbl_oracle_valuecheck_target_tbl_output_type_idscheck_target_tbl_rows_uniquecheck_target_tbl_ts_targetscheck_target_tbl_valuescheck_tbl_col_typescheck_tbl_colnamescheck_tbl_derived_task_id_valscheck_tbl_match_round_idcheck_tbl_rows_uniquecheck_tbl_spl_compound_taskid_setcheck_tbl_spl_compound_tidcheck_tbl_spl_mt_uniquecheck_tbl_spl_ncheck_tbl_spl_non_compound_tidcheck_tbl_unique_round_idcheck_tbl_value_colcheck_tbl_value_col_ascendingcheck_tbl_value_col_sum1check_tbl_valuescheck_tbl_values_requiredcheck_valid_round_idcheck_valid_round_id_colcoerce_to_hub_schemacombinecreate_custom_checkcreate_hub_schemaexpand_model_out_gridextract_hive_partitionsget_config_derived_task_idsget_hub_derived_task_idsget_target_task_idget_tbl_compound_taskid_setis_any_erroris_erroris_exec_erroris_exec_warnis_failureis_hive_partitioned_pathis_infois_successmatch_tbl_to_model_tasknew_hub_validationsnew_hub_validations_collectionnew_target_validationsnew_target_validations_collectionnot_passopt_check_metadata_team_max_model_nopt_check_tbl_col_timediffopt_check_tbl_counts_lt_popnopt_check_tbl_horizon_timediffparse_file_nameread_configread_config_fileread_model_out_fileread_target_filesubmission_tmpltry_checkvalidate_model_datavalidate_model_filevalidate_model_metadatavalidate_prvalidate_submissionvalidate_submission_timevalidate_target_datavalidate_target_datasetvalidate_target_filevalidate_target_prvalidate_target_submission

Dependencies:arrowaskpassassertthatbackportsbase64encbase64urlbigDbitbit64bitopsbslibcachemcheckmateclicliprcommonmarkconfigcpp11crayoncurldata.tabledigestdplyrevaluatefarverfastmapfontawesomefsgenericsgitcredsgluegthighrhmshtmltoolshtmlwidgetshttrhttr2hubAdminhubDatahubUtilsinijquerylibjsonlitejsonvalidatejuicyjuiceknitrlabelinglifecyclelitedownlubridatemagrittrmarkdownmemoisemimeMMWRweekopensslpillarpkgconfigprettyunitsprogresspurrrR6rappdirsRColorBrewerRcppreactablereactRreadrrlangrmarkdownsassscalesstringistringrsystibbletidyselecttimechangetinytextzdbutf8V8vctrsviridisLitevroomwhiskerwithrxfunxml2yamlzoltr

Readme and manuals

Help Manual

Help pageTopics
Capture a condition of the result of validation check.capture_check_cnd
Capture a simple info message conditioncapture_check_info
Capture an execution error conditioncapture_exec_error
Capture an execution warning conditioncapture_exec_warning
Capture a validation warning conditioncapture_validation_warning
Check hub correctly configuredcheck_config_hub_valid
Check file exists at the file path specifiedcheck_file_exists
Check file format is accepted by hub.check_file_format
Check file is being submitted to the correct foldercheck_file_location
Check number of files submitted per round does not exceed the allowed number of submissions per team.check_file_n
Check a model output file name can be correctly parsed.check_file_name
Check file can be read successfullycheck_file_read
Raise conditions stored in validation objectscheck_for_errors
Check whether a metadata schema file existscheck_metadata_file_exists
Check file is being submitted to the correct foldercheck_metadata_file_ext
Check that the metadata file is being submitted to the correct foldercheck_metadata_file_location
Check whether the file name of a metadata file matches the model_id or combination of team_abbr and model_abbr specified within the metadata filecheck_metadata_file_name
Check whether a metadata file matches the schema provided by the hubcheck_metadata_matches_schema
Check whether a metadata schema file existscheck_metadata_schema_exists
Check whether a metadata file for the given model existscheck_submission_metadata_file_exists
Checks submission is within the valid submission window for a given round.check_submission_time
Check target dataset can be detected for a given target typecheck_target_dataset_exists
Check that all files of a given target type share a single unique file formatcheck_target_dataset_file_ext_unique
Check target dataset rows are all uniquecheck_target_dataset_rows_unique
Check that a single unique target dataset exists for a given target type.check_target_dataset_unique
Check that a target data file has a valid extension.check_target_file_ext_valid
Check that a hive-partitioned target data file name can be correctly parsed.check_target_file_name
Check target file can be read successfullycheck_target_file_read
Check that a target data file has the correct column names according to target typecheck_target_tbl_colnames
Check that a target data file has the correct column types according to target typecheck_target_tbl_coltypes
Check that oracle values in an oracle output target data file are validcheck_target_tbl_oracle_value
Check that output type ID values in a target data file are valid and completecheck_target_tbl_output_type_ids
Check target data rows are all uniquecheck_target_tbl_rows_unique
Check that targets in a time-series target data file are validcheck_target_tbl_ts_targets
Check that task ID columns in a target data file have valid task ID valuescheck_target_tbl_values
Check model data column data typescheck_tbl_col_types
Check column names of model output datacheck_tbl_colnames
Check derived task ID columns contain valid valuescheck_tbl_derived_task_id_vals
Check model output data tbl round ID matches submission round ID.check_tbl_match_round_id
Check model data rows are all uniquecheck_tbl_rows_unique
Check model output data tbl sample compound task id sets for each modeling task match or are coarser than the expected set defined in the config.check_tbl_spl_compound_taskid_set
Check model output data tbl samples contain single unique values for each compound task ID within individual samplescheck_tbl_spl_compound_tid
Check that individual sample output_type_ids do not span multiple model taskscheck_tbl_spl_mt_unique
Check model output data tbl samples contain the appropriate number of samples for a given compound idx.check_tbl_spl_n
Check model output data tbl samples contain single unique combination of non-compound task ID values across all samplescheck_tbl_spl_non_compound_tid
Check model output data tbl contains a single unique round ID.check_tbl_unique_round_id
Check output type values of model output data against configcheck_tbl_value_col
Check that 'quantile' and 'cdf' output type values of model output data are non-descendingcheck_tbl_value_col_ascending
Check that 'pmf' output type values of model output data sum to 1.check_tbl_value_col_sum1
Check model output data tbl contains valid value combinationscheck_tbl_values
Check all required task ID/output type/output type ID value combinations present in model data.check_tbl_values_required
Check whether the 'round_id' determined for the submission is validcheck_valid_round_id
Check that any round_id_col name provided or extracted from the hub config is valid.check_valid_round_id_col
Concatenate validation objectscombine combine.hub_validations_collection
Create a custom validation check function template file.create_custom_check
Create expanded grid of valid task ID and output type value combinationsexpand_model_out_grid
Get hub configuration fields from a <config> class objectget_config_derived_task_ids
Get Unique Target Task IDget_target_task_id
Detect the compound_taskid_set for a tbl for each modeling task in a given round.get_tbl_compound_taskid_set
Get status of a hub checkis_any_error is_error is_exec_error is_exec_warn is_failure is_info is_success not_pass
Match model output 'tbl' data to their model tasks in 'config_tasks'.match_tbl_to_model_task
Create new or convert list to 'hub_validations' S3 class objectas_hub_validations new_hub_validations
Create new or convert list to 'hub_validations_collection' S3 class objectas_hub_validations_collection new_hub_validations_collection
Create new or convert list to 'target_validations' S3 class objectas_target_validations new_target_validations
Create new or convert list to 'target_validations_collection' S3 class objectas_target_validations_collection new_target_validations_collection
Check that submitting team does not exceed maximum number of allowed models per teamopt_check_metadata_team_max_model_n
Check time difference between values in two date columns equal a defined period.opt_check_tbl_col_timediff
Check that predicted values per location are less than total location population.opt_check_tbl_counts_lt_popn
Check time difference between values in two date columns equals a defined time period defined by values in a horizon columnopt_check_tbl_horizon_timediff
Parse model output file metadata from file nameparse_file_name
Print results of 'validate_...()' function as a bullet listprint.hub_validations
Print results of multi-file validation as a hierarchical bullet listprint.hub_validations_collection
Read a model output fileread_model_out_file
Read a single target data fileread_target_file
Create a model output submission file templatesubmission_tmpl
Wrap check expression in try to capture check execution errorstry_check
Validate the contents of a submitted model data filevalidate_model_data
Valid file level properties of a submitted model output file.validate_model_file
Valid properties of a metadata file.validate_model_metadata
Validate Pull Requestvalidate_pr
Validate a submitted model data file.validate_submission
Validate a submitted model data file submission time.validate_submission_time
Validate the contents of a submitted target data file.validate_target_data
Validate dataset level properties of a given target typevalidate_target_dataset
Validate file level properties of a target data file.validate_target_file
Validate Target Data Pull Requestvalidate_target_pr
Validate a submitted target data file.validate_target_submission