Package: hubValidations 0.8.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_0.8.0.tar.gz
hubValidations_0.8.0.zip(r-4.5)hubValidations_0.8.0.zip(r-4.4)hubValidations_0.8.0.zip(r-4.3)
hubValidations_0.8.0.tgz(r-4.4-any)hubValidations_0.8.0.tgz(r-4.3-any)
hubValidations_0.8.0.tar.gz(r-4.5-noble)hubValidations_0.8.0.tar.gz(r-4.4-noble)
hubValidations_0.8.0.tgz(r-4.4-emscripten)hubValidations_0.8.0.tgz(r-4.3-emscripten)
hubValidations.pdf |hubValidations.html
hubValidations/json (API)
NEWS

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

Peer review:

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

On CRAN:

hubverse

4.42 score 1 stars 1 packages 21 scripts 66 exports 95 dependencies

Last updated 20 days agofrom:1573182348 (on v0.8.0). Checks:OK: 5 NOTE: 2. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 01 2024
R-4.5-winNOTENov 01 2024
R-4.5-linuxNOTENov 01 2024
R-4.4-winOKNov 01 2024
R-4.4-macOKNov 01 2024
R-4.3-winOKNov 01 2024
R-4.3-macOKNov 01 2024

Exports:%>%as_hub_validationscapture_check_cndcapture_check_infocapture_exec_errorcapture_exec_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_tbl_col_typescheck_tbl_colnamescheck_tbl_match_round_idcheck_tbl_rows_uniquecheck_tbl_spl_compound_taskid_setcheck_tbl_spl_compound_tidcheck_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_colcombinecreate_custom_checkexpand_model_out_gridget_tbl_compound_taskid_setis_any_erroris_erroris_exec_erroris_exec_warnis_failureis_infois_successmatch_tbl_to_model_tasknew_hub_validationsnot_passopt_check_metadata_team_max_model_nopt_check_tbl_col_timediffopt_check_tbl_counts_lt_popnopt_check_tbl_horizon_timediffparse_file_nameread_model_out_filesubmission_tmpltry_checkvalidate_model_datavalidate_model_filevalidate_model_metadatavalidate_prvalidate_submissionvalidate_submission_time

Dependencies:arrowaskpassassertthatbackportsbase64encbase64urlbigDbitbit64bitopsbslibcachemcheckmateclicliprcolorspacecommonmarkconfigcpp11crayoncurldata.tabledigestdplyrevaluatefansifarverfastmapfontawesomefsgenericsghgitcredsgluegthighrhmshtmltoolshtmlwidgetshttrhttr2hubAdminhubDatahubUtilsinijquerylibjsonlitejsonvalidatejuicyjuiceknitrlabelinglifecyclelubridatemagrittrmarkdownmemoisemimeMMWRweekmunsellopensslpillarpkgconfigprettyunitsprogresspurrrR6rappdirsRColorBrewerRcppreactablereactRreadrrlangrmarkdownsassscalesstringistringrsystibbletidyselecttimechangetinytextzdbutf8V8vctrsviridisLitevroomwhiskerwithrxfunxml2yamlzoltr

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
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 a 'hub_validations' S3 objectcheck_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 model data column data typescheck_tbl_col_types
Check column names of model output datacheck_tbl_colnames
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 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 'hub_validations' S3 class objectscombine
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
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
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 'validate_pr()' function as a bullet listprint.pr_hub_validations
Read a model output fileread_model_out_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