From 5834e75e2ab9a9d3f4f94cbcdedd5bef5fb6bfca Mon Sep 17 00:00:00 2001 From: Anna Krystalli Date: Wed, 28 Feb 2024 17:12:13 +0200 Subject: [PATCH 1/5] upgrade to split hubUtils (v0.0.1) --- DESCRIPTION | 12 ++++++++---- R/check_config_hub_valid.R | 2 +- R/check_metadata_file_exists.R | 2 +- R/check_tbl_col_types.R | 2 +- R/check_tbl_colnames.R | 2 +- R/check_tbl_value_col.R | 4 ++-- R/check_tbl_values.R | 2 +- R/check_tbl_values_required.R | 6 +++--- R/opt_check_metadata_team_max_model_n.R | 2 +- R/opt_check_tbl_col_timediff.R | 2 +- R/opt_check_tbl_horizon_timediff.R | 2 +- R/read_model_out_file.R | 10 +++++----- man/check_config_hub_valid.Rd | 4 ++-- man/check_file_exists.Rd | 4 ++-- man/check_file_format.Rd | 4 ++-- man/check_file_read.Rd | 4 ++-- man/check_metadata_file_exists.Rd | 4 ++-- man/check_metadata_file_name.Rd | 4 ++-- man/check_metadata_matches_schema.Rd | 4 ++-- man/check_metadata_schema_exists.Rd | 4 ++-- man/check_submission_metadata_file_exists.Rd | 4 ++-- man/check_submission_time.Rd | 4 ++-- man/check_tbl_col_types.Rd | 4 ++-- man/check_tbl_colnames.Rd | 4 ++-- man/check_tbl_match_round_id.Rd | 4 ++-- man/check_tbl_rows_unique.Rd | 4 ++-- man/check_tbl_unique_round_id.Rd | 4 ++-- man/check_tbl_value_col.Rd | 4 ++-- man/check_tbl_values.Rd | 4 ++-- man/check_tbl_values_required.Rd | 4 ++-- man/check_valid_round_id.Rd | 4 ++-- man/check_valid_round_id_col.Rd | 4 ++-- man/opt_check_metadata_team_max_model_n.Rd | 4 ++-- man/opt_check_tbl_col_timediff.Rd | 4 ++-- man/opt_check_tbl_counts_lt_popn.Rd | 4 ++-- man/opt_check_tbl_horizon_timediff.Rd | 4 ++-- man/read_model_out_file.Rd | 4 ++-- man/validate_model_data.Rd | 4 ++-- man/validate_model_file.Rd | 4 ++-- man/validate_model_metadata.Rd | 4 ++-- man/validate_pr.Rd | 4 ++-- man/validate_submission.Rd | 4 ++-- man/validate_submission_time.Rd | 4 ++-- tests/testthat/test-check_config_hub_valid.R | 2 +- tests/testthat/test-check_tbl_col_types.R | 2 +- tests/testthat/test-check_tbl_value_col_ascending.R | 2 +- tests/testthat/test-opt_check_tbl_col_timediff.R | 4 ++-- tests/testthat/test-opt_check_tbl_horizon_timediff.R | 4 ++-- 48 files changed, 95 insertions(+), 91 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 44e9c02a..0a64744a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -37,7 +37,9 @@ Imports: dplyr, fs, gh, - hubUtils (>= 0.0.0.9016), + hubAdmin, + hubData, + hubUtils (>= 0.0.1), jsonlite, jsonvalidate, lubridate, @@ -58,13 +60,15 @@ Suggests: testthis, withr Remotes: - Infectious-Disease-Modeling-Hubs/hubUtils, + Infectious-Disease-Modeling-Hubs/hubUtils#143, + Infectious-Disease-Modeling-Hubs/hubData#1, + Infectious-Disease-Modeling-Hubs/hubAdmin#1, assignUser/octolog Config/testthat/edition: 3 -Config/Needs/website:pkgdown, Infectious-Disease-Modeling-Hubs/hubStyle +Config/Needs/website: pkgdown, Infectious-Disease-Modeling-Hubs/hubStyle Encoding: UTF-8 Roxygen: list(markdown = TRUE) -RoxygenNote: 7.2.3 +RoxygenNote: 7.3.1 URL: https://github.com/Infectious-Disease-Modeling-Hubs/hubValidations, https://infectious-disease-modeling-hubs.github.io/hubValidations/ BugReports: https://github.com/Infectious-Disease-Modeling-Hubs/hubValidations/issues diff --git a/R/check_config_hub_valid.R b/R/check_config_hub_valid.R index c53a546c..e8d5ad43 100644 --- a/R/check_config_hub_valid.R +++ b/R/check_config_hub_valid.R @@ -6,7 +6,7 @@ #' #' @export check_config_hub_valid <- function(hub_path) { - valid_config <- hubUtils::validate_hub_config(hub_path) %>% + valid_config <- hubAdmin::validate_hub_config(hub_path) %>% suppressMessages() %>% suppressWarnings() diff --git a/R/check_metadata_file_exists.R b/R/check_metadata_file_exists.R index fbe49a49..e66e673f 100644 --- a/R/check_metadata_file_exists.R +++ b/R/check_metadata_file_exists.R @@ -2,7 +2,7 @@ #' #' @param file_path character string. Path to the file being validated relative to #' the hub's model-metadata directory. -#' @inheritParams hubUtils::connect_hub +#' @inheritParams hubData::connect_hub #' #' @inherit check_valid_round_id return #' diff --git a/R/check_tbl_col_types.R b/R/check_tbl_col_types.R index 4a5678e3..fa4011db 100644 --- a/R/check_tbl_col_types.R +++ b/R/check_tbl_col_types.R @@ -13,7 +13,7 @@ check_tbl_col_types <- function(tbl, file_path, hub_path) { config_tasks <- hubUtils::read_config(hub_path, "tasks") - schema <- hubUtils::create_hub_schema(config_tasks, + schema <- hubData::create_hub_schema(config_tasks, partitions = NULL, r_schema = TRUE )[names(tbl)] diff --git a/R/check_tbl_colnames.R b/R/check_tbl_colnames.R index aede0b11..4702487c 100644 --- a/R/check_tbl_colnames.R +++ b/R/check_tbl_colnames.R @@ -7,7 +7,7 @@ #' @param round_id character string. The round identifier. #' @param file_path character string. Path to the file being validated relative to #' the hub's model-output directory. -#' @inheritParams hubUtils::connect_hub +#' @inheritParams hubData::connect_hub #' @return #' Depending on whether validation has succeeded, one of: #' - `` condition class object. diff --git a/R/check_tbl_value_col.R b/R/check_tbl_value_col.R index 37c42dd7..89e3c80f 100644 --- a/R/check_tbl_value_col.R +++ b/R/check_tbl_value_col.R @@ -9,11 +9,11 @@ check_tbl_value_col <- function(tbl, round_id, file_path, hub_path) { config_tasks <- hubUtils::read_config(hub_path, "tasks") - tbl[, names(tbl) != "value"] <- hubUtils::coerce_to_character( + tbl[, names(tbl) != "value"] <- hubData::coerce_to_character( tbl[, names(tbl) != "value"] ) - full <- hubUtils::expand_model_out_val_grid( + full <- hubData::expand_model_out_val_grid( config_tasks, round_id = round_id, required_vals_only = FALSE, diff --git a/R/check_tbl_values.R b/R/check_tbl_values.R index db44d0a3..2ead6b5b 100644 --- a/R/check_tbl_values.R +++ b/R/check_tbl_values.R @@ -11,7 +11,7 @@ check_tbl_values <- function(tbl, round_id, file_path, hub_path) { # working with larger files but currently arrow does not match NAs as dplyr # does, returning false positives for mean & median rows which contain NA in # output type ID column. - accepted_vals <- hubUtils::expand_model_out_val_grid( + accepted_vals <- hubData::expand_model_out_val_grid( config_tasks = config_tasks, round_id = round_id, all_character = TRUE diff --git a/R/check_tbl_values_required.R b/R/check_tbl_values_required.R index 93a22a07..9a349721 100644 --- a/R/check_tbl_values_required.R +++ b/R/check_tbl_values_required.R @@ -8,7 +8,7 @@ check_tbl_values_required <- function(tbl, round_id, file_path, hub_path) { tbl[["value"]] <- NULL config_tasks <- hubUtils::read_config(hub_path, "tasks") - req <- hubUtils::expand_model_out_val_grid( + req <- hubData::expand_model_out_val_grid( config_tasks, round_id = round_id, required_vals_only = TRUE, @@ -16,7 +16,7 @@ check_tbl_values_required <- function(tbl, round_id, file_path, hub_path) { bind_model_tasks = FALSE ) - full <- hubUtils::expand_model_out_val_grid( + full <- hubData::expand_model_out_val_grid( config_tasks, round_id = round_id, required_vals_only = FALSE, @@ -41,7 +41,7 @@ check_tbl_values_required <- function(tbl, round_id, file_path, hub_path) { if (check) { details <- NULL } else { - missing_df <- hubUtils::coerce_to_hub_schema(missing_df, config_tasks) + missing_df <- hubData::coerce_to_hub_schema(missing_df, config_tasks) details <- cli::format_inline("See {.var missing} attribute for details.") } diff --git a/R/opt_check_metadata_team_max_model_n.R b/R/opt_check_metadata_team_max_model_n.R index b71254d3..2358db78 100644 --- a/R/opt_check_metadata_team_max_model_n.R +++ b/R/opt_check_metadata_team_max_model_n.R @@ -14,7 +14,7 @@ opt_check_metadata_team_max_model_n <- function(file_path, hub_path, n_max = 2L) file_path, file_type = "model_metadata" )$team_abbr - all_model_meta <- hubUtils::load_model_metadata(hub_path) + all_model_meta <- hubData::load_model_metadata(hub_path) team_models <- all_model_meta[["model_abbr"]][all_model_meta[["team_abbr"]] == team_abbr] n_models <- length(team_models) diff --git a/R/opt_check_tbl_col_timediff.R b/R/opt_check_tbl_col_timediff.R index c5b318eb..dbcf9957 100644 --- a/R/opt_check_tbl_col_timediff.R +++ b/R/opt_check_tbl_col_timediff.R @@ -19,7 +19,7 @@ opt_check_tbl_col_timediff <- function(tbl, file_path, hub_path, checkmate::assert_choice(t1_colname, choices = names(tbl)) config_tasks <- hubUtils::read_config(hub_path, "tasks") - schema <- hubUtils::create_hub_schema(config_tasks, + schema <- hubData::create_hub_schema(config_tasks, partitions = NULL, r_schema = TRUE ) diff --git a/R/opt_check_tbl_horizon_timediff.R b/R/opt_check_tbl_horizon_timediff.R index 5955db98..d696c5b3 100644 --- a/R/opt_check_tbl_horizon_timediff.R +++ b/R/opt_check_tbl_horizon_timediff.R @@ -25,7 +25,7 @@ opt_check_tbl_horizon_timediff <- function(tbl, file_path, hub_path, t0_colname, checkmate::assert_choice(horizon_colname, choices = names(tbl)) config_tasks <- hubUtils::read_config(hub_path, "tasks") - schema <- hubUtils::create_hub_schema(config_tasks, + schema <- hubData::create_hub_schema(config_tasks, partitions = NULL, r_schema = TRUE ) diff --git a/R/read_model_out_file.R b/R/read_model_out_file.R index e2d8c6ea..67633cd4 100644 --- a/R/read_model_out_file.R +++ b/R/read_model_out_file.R @@ -42,12 +42,12 @@ read_model_out_file <- function(file_path, hub_path = ".", parquet = { if (coerce_types == "hub") { arrow::read_parquet(full_path) %>% - hubUtils::coerce_to_hub_schema( + hubData::coerce_to_hub_schema( config_tasks = hubUtils::read_config(hub_path, "tasks") ) } else if (coerce_types == "chr") { arrow::read_parquet(full_path) %>% - hubUtils::coerce_to_character() + hubData::coerce_to_character() } else { arrow::read_parquet(full_path) } @@ -55,12 +55,12 @@ read_model_out_file <- function(file_path, hub_path = ".", arrow = { if (coerce_types == "hub") { arrow::read_feather(full_path) %>% - hubUtils::coerce_to_hub_schema( + hubData::coerce_to_hub_schema( config_tasks = hubUtils::read_config(hub_path, "tasks") ) } else if (coerce_types == "chr") { arrow::read_feather(full_path) %>% - hubUtils::coerce_to_character() + hubData::coerce_to_character() } else { arrow::read_feather(full_path) } @@ -72,7 +72,7 @@ read_model_out_file <- function(file_path, hub_path = ".", create_model_out_schema <- function(hub_path, col_types = c("hub", "chr")) { col_types <- rlang::arg_match(col_types) - schema <- hubUtils::create_hub_schema( + schema <- hubData::create_hub_schema( config_tasks = hubUtils::read_config(hub_path, "tasks"), partitions = NULL ) diff --git a/man/check_config_hub_valid.Rd b/man/check_config_hub_valid.Rd index 0da090e3..0565212a 100644 --- a/man/check_config_hub_valid.Rd +++ b/man/check_config_hub_valid.Rd @@ -8,8 +8,8 @@ check_config_hub_valid(hub_path) } \arguments{ \item{hub_path}{Either a character string path to a local Modeling Hub directory -or an object of class \verb{} created using functions \code{\link[hubUtils:s3_bucket]{s3_bucket()}} -or \code{\link[hubUtils:gs_bucket]{gs_bucket()}} by providing a string S3 or GCS bucket name or path to a +or an object of class \verb{} created using functions \code{\link[hubData:s3_bucket]{s3_bucket()}} +or \code{\link[hubData:gs_bucket]{gs_bucket()}} by providing a string S3 or GCS bucket name or path to a Modeling Hub directory stored in the cloud. For more details consult the \href{https://arrow.apache.org/docs/r/articles/fs.html}{Using cloud storage (S3, GCS)} diff --git a/man/check_file_exists.Rd b/man/check_file_exists.Rd index d447e66b..868a5d00 100644 --- a/man/check_file_exists.Rd +++ b/man/check_file_exists.Rd @@ -15,8 +15,8 @@ check_file_exists( the hub's model-output directory.} \item{hub_path}{Either a character string path to a local Modeling Hub directory -or an object of class \verb{} created using functions \code{\link[hubUtils:s3_bucket]{s3_bucket()}} -or \code{\link[hubUtils:gs_bucket]{gs_bucket()}} by providing a string S3 or GCS bucket name or path to a +or an object of class \verb{} created using functions \code{\link[hubData:s3_bucket]{s3_bucket()}} +or \code{\link[hubData:gs_bucket]{gs_bucket()}} by providing a string S3 or GCS bucket name or path to a Modeling Hub directory stored in the cloud. For more details consult the \href{https://arrow.apache.org/docs/r/articles/fs.html}{Using cloud storage (S3, GCS)} diff --git a/man/check_file_format.Rd b/man/check_file_format.Rd index 4d57956a..b32f0d63 100644 --- a/man/check_file_format.Rd +++ b/man/check_file_format.Rd @@ -11,8 +11,8 @@ check_file_format(file_path, hub_path, round_id) the hub's model-output directory.} \item{hub_path}{Either a character string path to a local Modeling Hub directory -or an object of class \verb{} created using functions \code{\link[hubUtils:s3_bucket]{s3_bucket()}} -or \code{\link[hubUtils:gs_bucket]{gs_bucket()}} by providing a string S3 or GCS bucket name or path to a +or an object of class \verb{} created using functions \code{\link[hubData:s3_bucket]{s3_bucket()}} +or \code{\link[hubData:gs_bucket]{gs_bucket()}} by providing a string S3 or GCS bucket name or path to a Modeling Hub directory stored in the cloud. For more details consult the \href{https://arrow.apache.org/docs/r/articles/fs.html}{Using cloud storage (S3, GCS)} diff --git a/man/check_file_read.Rd b/man/check_file_read.Rd index d8f42b62..842c6a86 100644 --- a/man/check_file_read.Rd +++ b/man/check_file_read.Rd @@ -11,8 +11,8 @@ check_file_read(file_path, hub_path = ".") the hub's model-output directory.} \item{hub_path}{Either a character string path to a local Modeling Hub directory -or an object of class \verb{} created using functions \code{\link[hubUtils:s3_bucket]{s3_bucket()}} -or \code{\link[hubUtils:gs_bucket]{gs_bucket()}} by providing a string S3 or GCS bucket name or path to a +or an object of class \verb{} created using functions \code{\link[hubData:s3_bucket]{s3_bucket()}} +or \code{\link[hubData:gs_bucket]{gs_bucket()}} by providing a string S3 or GCS bucket name or path to a Modeling Hub directory stored in the cloud. For more details consult the \href{https://arrow.apache.org/docs/r/articles/fs.html}{Using cloud storage (S3, GCS)} diff --git a/man/check_metadata_file_exists.Rd b/man/check_metadata_file_exists.Rd index af5d43ca..371ace4e 100644 --- a/man/check_metadata_file_exists.Rd +++ b/man/check_metadata_file_exists.Rd @@ -8,8 +8,8 @@ check_metadata_file_exists(hub_path = ".", file_path) } \arguments{ \item{hub_path}{Either a character string path to a local Modeling Hub directory -or an object of class \verb{} created using functions \code{\link[hubUtils:s3_bucket]{s3_bucket()}} -or \code{\link[hubUtils:gs_bucket]{gs_bucket()}} by providing a string S3 or GCS bucket name or path to a +or an object of class \verb{} created using functions \code{\link[hubData:s3_bucket]{s3_bucket()}} +or \code{\link[hubData:gs_bucket]{gs_bucket()}} by providing a string S3 or GCS bucket name or path to a Modeling Hub directory stored in the cloud. For more details consult the \href{https://arrow.apache.org/docs/r/articles/fs.html}{Using cloud storage (S3, GCS)} diff --git a/man/check_metadata_file_name.Rd b/man/check_metadata_file_name.Rd index 4d6fdc2b..6618f75d 100644 --- a/man/check_metadata_file_name.Rd +++ b/man/check_metadata_file_name.Rd @@ -12,8 +12,8 @@ check_metadata_file_name(file_path, hub_path = ".") the hub's model-metadata directory.} \item{hub_path}{Either a character string path to a local Modeling Hub directory -or an object of class \verb{} created using functions \code{\link[hubUtils:s3_bucket]{s3_bucket()}} -or \code{\link[hubUtils:gs_bucket]{gs_bucket()}} by providing a string S3 or GCS bucket name or path to a +or an object of class \verb{} created using functions \code{\link[hubData:s3_bucket]{s3_bucket()}} +or \code{\link[hubData:gs_bucket]{gs_bucket()}} by providing a string S3 or GCS bucket name or path to a Modeling Hub directory stored in the cloud. For more details consult the \href{https://arrow.apache.org/docs/r/articles/fs.html}{Using cloud storage (S3, GCS)} diff --git a/man/check_metadata_matches_schema.Rd b/man/check_metadata_matches_schema.Rd index 3785078b..cb0e76aa 100644 --- a/man/check_metadata_matches_schema.Rd +++ b/man/check_metadata_matches_schema.Rd @@ -11,8 +11,8 @@ check_metadata_matches_schema(file_path, hub_path = ".") the hub's model-metadata directory.} \item{hub_path}{Either a character string path to a local Modeling Hub directory -or an object of class \verb{} created using functions \code{\link[hubUtils:s3_bucket]{s3_bucket()}} -or \code{\link[hubUtils:gs_bucket]{gs_bucket()}} by providing a string S3 or GCS bucket name or path to a +or an object of class \verb{} created using functions \code{\link[hubData:s3_bucket]{s3_bucket()}} +or \code{\link[hubData:gs_bucket]{gs_bucket()}} by providing a string S3 or GCS bucket name or path to a Modeling Hub directory stored in the cloud. For more details consult the \href{https://arrow.apache.org/docs/r/articles/fs.html}{Using cloud storage (S3, GCS)} diff --git a/man/check_metadata_schema_exists.Rd b/man/check_metadata_schema_exists.Rd index 532e1109..712b0f8f 100644 --- a/man/check_metadata_schema_exists.Rd +++ b/man/check_metadata_schema_exists.Rd @@ -8,8 +8,8 @@ check_metadata_schema_exists(hub_path = ".") } \arguments{ \item{hub_path}{Either a character string path to a local Modeling Hub directory -or an object of class \verb{} created using functions \code{\link[hubUtils:s3_bucket]{s3_bucket()}} -or \code{\link[hubUtils:gs_bucket]{gs_bucket()}} by providing a string S3 or GCS bucket name or path to a +or an object of class \verb{} created using functions \code{\link[hubData:s3_bucket]{s3_bucket()}} +or \code{\link[hubData:gs_bucket]{gs_bucket()}} by providing a string S3 or GCS bucket name or path to a Modeling Hub directory stored in the cloud. For more details consult the \href{https://arrow.apache.org/docs/r/articles/fs.html}{Using cloud storage (S3, GCS)} diff --git a/man/check_submission_metadata_file_exists.Rd b/man/check_submission_metadata_file_exists.Rd index 701596ae..05208199 100644 --- a/man/check_submission_metadata_file_exists.Rd +++ b/man/check_submission_metadata_file_exists.Rd @@ -11,8 +11,8 @@ check_submission_metadata_file_exists(file_path, hub_path = ".") the hub's model-output directory.} \item{hub_path}{Either a character string path to a local Modeling Hub directory -or an object of class \verb{} created using functions \code{\link[hubUtils:s3_bucket]{s3_bucket()}} -or \code{\link[hubUtils:gs_bucket]{gs_bucket()}} by providing a string S3 or GCS bucket name or path to a +or an object of class \verb{} created using functions \code{\link[hubData:s3_bucket]{s3_bucket()}} +or \code{\link[hubData:gs_bucket]{gs_bucket()}} by providing a string S3 or GCS bucket name or path to a Modeling Hub directory stored in the cloud. For more details consult the \href{https://arrow.apache.org/docs/r/articles/fs.html}{Using cloud storage (S3, GCS)} diff --git a/man/check_submission_time.Rd b/man/check_submission_time.Rd index a66c746f..899b798f 100644 --- a/man/check_submission_time.Rd +++ b/man/check_submission_time.Rd @@ -12,8 +12,8 @@ check_submission_time( } \arguments{ \item{hub_path}{Either a character string path to a local Modeling Hub directory -or an object of class \verb{} created using functions \code{\link[hubUtils:s3_bucket]{s3_bucket()}} -or \code{\link[hubUtils:gs_bucket]{gs_bucket()}} by providing a string S3 or GCS bucket name or path to a +or an object of class \verb{} created using functions \code{\link[hubData:s3_bucket]{s3_bucket()}} +or \code{\link[hubData:gs_bucket]{gs_bucket()}} by providing a string S3 or GCS bucket name or path to a Modeling Hub directory stored in the cloud. For more details consult the \href{https://arrow.apache.org/docs/r/articles/fs.html}{Using cloud storage (S3, GCS)} diff --git a/man/check_tbl_col_types.Rd b/man/check_tbl_col_types.Rd index a1a7909e..e5dbaae8 100644 --- a/man/check_tbl_col_types.Rd +++ b/man/check_tbl_col_types.Rd @@ -13,8 +13,8 @@ check_tbl_col_types(tbl, file_path, hub_path) the hub's model-output directory.} \item{hub_path}{Either a character string path to a local Modeling Hub directory -or an object of class \verb{} created using functions \code{\link[hubUtils:s3_bucket]{s3_bucket()}} -or \code{\link[hubUtils:gs_bucket]{gs_bucket()}} by providing a string S3 or GCS bucket name or path to a +or an object of class \verb{} created using functions \code{\link[hubData:s3_bucket]{s3_bucket()}} +or \code{\link[hubData:gs_bucket]{gs_bucket()}} by providing a string S3 or GCS bucket name or path to a Modeling Hub directory stored in the cloud. For more details consult the \href{https://arrow.apache.org/docs/r/articles/fs.html}{Using cloud storage (S3, GCS)} diff --git a/man/check_tbl_colnames.Rd b/man/check_tbl_colnames.Rd index ec954922..1eefc461 100644 --- a/man/check_tbl_colnames.Rd +++ b/man/check_tbl_colnames.Rd @@ -15,8 +15,8 @@ check_tbl_colnames(tbl, round_id, file_path, hub_path = ".") the hub's model-output directory.} \item{hub_path}{Either a character string path to a local Modeling Hub directory -or an object of class \verb{} created using functions \code{\link[hubUtils:s3_bucket]{s3_bucket()}} -or \code{\link[hubUtils:gs_bucket]{gs_bucket()}} by providing a string S3 or GCS bucket name or path to a +or an object of class \verb{} created using functions \code{\link[hubData:s3_bucket]{s3_bucket()}} +or \code{\link[hubData:gs_bucket]{gs_bucket()}} by providing a string S3 or GCS bucket name or path to a Modeling Hub directory stored in the cloud. For more details consult the \href{https://arrow.apache.org/docs/r/articles/fs.html}{Using cloud storage (S3, GCS)} diff --git a/man/check_tbl_match_round_id.Rd b/man/check_tbl_match_round_id.Rd index 29b8bf7c..9fbff1a3 100644 --- a/man/check_tbl_match_round_id.Rd +++ b/man/check_tbl_match_round_id.Rd @@ -13,8 +13,8 @@ check_tbl_match_round_id(tbl, file_path, hub_path, round_id_col = NULL) the hub's model-output directory.} \item{hub_path}{Either a character string path to a local Modeling Hub directory -or an object of class \verb{} created using functions \code{\link[hubUtils:s3_bucket]{s3_bucket()}} -or \code{\link[hubUtils:gs_bucket]{gs_bucket()}} by providing a string S3 or GCS bucket name or path to a +or an object of class \verb{} created using functions \code{\link[hubData:s3_bucket]{s3_bucket()}} +or \code{\link[hubData:gs_bucket]{gs_bucket()}} by providing a string S3 or GCS bucket name or path to a Modeling Hub directory stored in the cloud. For more details consult the \href{https://arrow.apache.org/docs/r/articles/fs.html}{Using cloud storage (S3, GCS)} diff --git a/man/check_tbl_rows_unique.Rd b/man/check_tbl_rows_unique.Rd index ce51c343..6d4a5759 100644 --- a/man/check_tbl_rows_unique.Rd +++ b/man/check_tbl_rows_unique.Rd @@ -13,8 +13,8 @@ check_tbl_rows_unique(tbl, file_path, hub_path) the hub's model-output directory.} \item{hub_path}{Either a character string path to a local Modeling Hub directory -or an object of class \verb{} created using functions \code{\link[hubUtils:s3_bucket]{s3_bucket()}} -or \code{\link[hubUtils:gs_bucket]{gs_bucket()}} by providing a string S3 or GCS bucket name or path to a +or an object of class \verb{} created using functions \code{\link[hubData:s3_bucket]{s3_bucket()}} +or \code{\link[hubData:gs_bucket]{gs_bucket()}} by providing a string S3 or GCS bucket name or path to a Modeling Hub directory stored in the cloud. For more details consult the \href{https://arrow.apache.org/docs/r/articles/fs.html}{Using cloud storage (S3, GCS)} diff --git a/man/check_tbl_unique_round_id.Rd b/man/check_tbl_unique_round_id.Rd index 0f9c53a3..07b635bb 100644 --- a/man/check_tbl_unique_round_id.Rd +++ b/man/check_tbl_unique_round_id.Rd @@ -13,8 +13,8 @@ check_tbl_unique_round_id(tbl, file_path, hub_path, round_id_col = NULL) the hub's model-output directory.} \item{hub_path}{Either a character string path to a local Modeling Hub directory -or an object of class \verb{} created using functions \code{\link[hubUtils:s3_bucket]{s3_bucket()}} -or \code{\link[hubUtils:gs_bucket]{gs_bucket()}} by providing a string S3 or GCS bucket name or path to a +or an object of class \verb{} created using functions \code{\link[hubData:s3_bucket]{s3_bucket()}} +or \code{\link[hubData:gs_bucket]{gs_bucket()}} by providing a string S3 or GCS bucket name or path to a Modeling Hub directory stored in the cloud. For more details consult the \href{https://arrow.apache.org/docs/r/articles/fs.html}{Using cloud storage (S3, GCS)} diff --git a/man/check_tbl_value_col.Rd b/man/check_tbl_value_col.Rd index d6503cdc..36dc8cfb 100644 --- a/man/check_tbl_value_col.Rd +++ b/man/check_tbl_value_col.Rd @@ -15,8 +15,8 @@ check_tbl_value_col(tbl, round_id, file_path, hub_path) the hub's model-output directory.} \item{hub_path}{Either a character string path to a local Modeling Hub directory -or an object of class \verb{} created using functions \code{\link[hubUtils:s3_bucket]{s3_bucket()}} -or \code{\link[hubUtils:gs_bucket]{gs_bucket()}} by providing a string S3 or GCS bucket name or path to a +or an object of class \verb{} created using functions \code{\link[hubData:s3_bucket]{s3_bucket()}} +or \code{\link[hubData:gs_bucket]{gs_bucket()}} by providing a string S3 or GCS bucket name or path to a Modeling Hub directory stored in the cloud. For more details consult the \href{https://arrow.apache.org/docs/r/articles/fs.html}{Using cloud storage (S3, GCS)} diff --git a/man/check_tbl_values.Rd b/man/check_tbl_values.Rd index 3c664ae8..19229251 100644 --- a/man/check_tbl_values.Rd +++ b/man/check_tbl_values.Rd @@ -15,8 +15,8 @@ check_tbl_values(tbl, round_id, file_path, hub_path) the hub's model-output directory.} \item{hub_path}{Either a character string path to a local Modeling Hub directory -or an object of class \verb{} created using functions \code{\link[hubUtils:s3_bucket]{s3_bucket()}} -or \code{\link[hubUtils:gs_bucket]{gs_bucket()}} by providing a string S3 or GCS bucket name or path to a +or an object of class \verb{} created using functions \code{\link[hubData:s3_bucket]{s3_bucket()}} +or \code{\link[hubData:gs_bucket]{gs_bucket()}} by providing a string S3 or GCS bucket name or path to a Modeling Hub directory stored in the cloud. For more details consult the \href{https://arrow.apache.org/docs/r/articles/fs.html}{Using cloud storage (S3, GCS)} diff --git a/man/check_tbl_values_required.Rd b/man/check_tbl_values_required.Rd index 587851f0..084df7c2 100644 --- a/man/check_tbl_values_required.Rd +++ b/man/check_tbl_values_required.Rd @@ -16,8 +16,8 @@ check_tbl_values_required(tbl, round_id, file_path, hub_path) the hub's model-output directory.} \item{hub_path}{Either a character string path to a local Modeling Hub directory -or an object of class \verb{} created using functions \code{\link[hubUtils:s3_bucket]{s3_bucket()}} -or \code{\link[hubUtils:gs_bucket]{gs_bucket()}} by providing a string S3 or GCS bucket name or path to a +or an object of class \verb{} created using functions \code{\link[hubData:s3_bucket]{s3_bucket()}} +or \code{\link[hubData:gs_bucket]{gs_bucket()}} by providing a string S3 or GCS bucket name or path to a Modeling Hub directory stored in the cloud. For more details consult the \href{https://arrow.apache.org/docs/r/articles/fs.html}{Using cloud storage (S3, GCS)} diff --git a/man/check_valid_round_id.Rd b/man/check_valid_round_id.Rd index bda03eaf..2913cd0e 100644 --- a/man/check_valid_round_id.Rd +++ b/man/check_valid_round_id.Rd @@ -13,8 +13,8 @@ check_valid_round_id(round_id, file_path, hub_path = ".") the hub's model-output directory.} \item{hub_path}{Either a character string path to a local Modeling Hub directory -or an object of class \verb{} created using functions \code{\link[hubUtils:s3_bucket]{s3_bucket()}} -or \code{\link[hubUtils:gs_bucket]{gs_bucket()}} by providing a string S3 or GCS bucket name or path to a +or an object of class \verb{} created using functions \code{\link[hubData:s3_bucket]{s3_bucket()}} +or \code{\link[hubData:gs_bucket]{gs_bucket()}} by providing a string S3 or GCS bucket name or path to a Modeling Hub directory stored in the cloud. For more details consult the \href{https://arrow.apache.org/docs/r/articles/fs.html}{Using cloud storage (S3, GCS)} diff --git a/man/check_valid_round_id_col.Rd b/man/check_valid_round_id_col.Rd index 33bd25d8..324e1475 100644 --- a/man/check_valid_round_id_col.Rd +++ b/man/check_valid_round_id_col.Rd @@ -14,8 +14,8 @@ check_valid_round_id_col(tbl, file_path, hub_path, round_id_col = NULL) the hub's model-output directory.} \item{hub_path}{Either a character string path to a local Modeling Hub directory -or an object of class \verb{} created using functions \code{\link[hubUtils:s3_bucket]{s3_bucket()}} -or \code{\link[hubUtils:gs_bucket]{gs_bucket()}} by providing a string S3 or GCS bucket name or path to a +or an object of class \verb{} created using functions \code{\link[hubData:s3_bucket]{s3_bucket()}} +or \code{\link[hubData:gs_bucket]{gs_bucket()}} by providing a string S3 or GCS bucket name or path to a Modeling Hub directory stored in the cloud. For more details consult the \href{https://arrow.apache.org/docs/r/articles/fs.html}{Using cloud storage (S3, GCS)} diff --git a/man/opt_check_metadata_team_max_model_n.Rd b/man/opt_check_metadata_team_max_model_n.Rd index dbcf72d0..75b32e28 100644 --- a/man/opt_check_metadata_team_max_model_n.Rd +++ b/man/opt_check_metadata_team_max_model_n.Rd @@ -12,8 +12,8 @@ opt_check_metadata_team_max_model_n(file_path, hub_path, n_max = 2L) the hub's model-metadata directory.} \item{hub_path}{Either a character string path to a local Modeling Hub directory -or an object of class \verb{} created using functions \code{\link[hubUtils:s3_bucket]{s3_bucket()}} -or \code{\link[hubUtils:gs_bucket]{gs_bucket()}} by providing a string S3 or GCS bucket name or path to a +or an object of class \verb{} created using functions \code{\link[hubData:s3_bucket]{s3_bucket()}} +or \code{\link[hubData:gs_bucket]{gs_bucket()}} by providing a string S3 or GCS bucket name or path to a Modeling Hub directory stored in the cloud. For more details consult the \href{https://arrow.apache.org/docs/r/articles/fs.html}{Using cloud storage (S3, GCS)} diff --git a/man/opt_check_tbl_col_timediff.Rd b/man/opt_check_tbl_col_timediff.Rd index 70b9183b..2e647808 100644 --- a/man/opt_check_tbl_col_timediff.Rd +++ b/man/opt_check_tbl_col_timediff.Rd @@ -20,8 +20,8 @@ opt_check_tbl_col_timediff( the hub's model-output directory.} \item{hub_path}{Either a character string path to a local Modeling Hub directory -or an object of class \verb{} created using functions \code{\link[hubUtils:s3_bucket]{s3_bucket()}} -or \code{\link[hubUtils:gs_bucket]{gs_bucket()}} by providing a string S3 or GCS bucket name or path to a +or an object of class \verb{} created using functions \code{\link[hubData:s3_bucket]{s3_bucket()}} +or \code{\link[hubData:gs_bucket]{gs_bucket()}} by providing a string S3 or GCS bucket name or path to a Modeling Hub directory stored in the cloud. For more details consult the \href{https://arrow.apache.org/docs/r/articles/fs.html}{Using cloud storage (S3, GCS)} diff --git a/man/opt_check_tbl_counts_lt_popn.Rd b/man/opt_check_tbl_counts_lt_popn.Rd index a7e4702a..a381c681 100644 --- a/man/opt_check_tbl_counts_lt_popn.Rd +++ b/man/opt_check_tbl_counts_lt_popn.Rd @@ -21,8 +21,8 @@ opt_check_tbl_counts_lt_popn( the hub's model-output directory.} \item{hub_path}{Either a character string path to a local Modeling Hub directory -or an object of class \verb{} created using functions \code{\link[hubUtils:s3_bucket]{s3_bucket()}} -or \code{\link[hubUtils:gs_bucket]{gs_bucket()}} by providing a string S3 or GCS bucket name or path to a +or an object of class \verb{} created using functions \code{\link[hubData:s3_bucket]{s3_bucket()}} +or \code{\link[hubData:gs_bucket]{gs_bucket()}} by providing a string S3 or GCS bucket name or path to a Modeling Hub directory stored in the cloud. For more details consult the \href{https://arrow.apache.org/docs/r/articles/fs.html}{Using cloud storage (S3, GCS)} diff --git a/man/opt_check_tbl_horizon_timediff.Rd b/man/opt_check_tbl_horizon_timediff.Rd index 287801c9..732fa342 100644 --- a/man/opt_check_tbl_horizon_timediff.Rd +++ b/man/opt_check_tbl_horizon_timediff.Rd @@ -22,8 +22,8 @@ opt_check_tbl_horizon_timediff( the hub's model-output directory.} \item{hub_path}{Either a character string path to a local Modeling Hub directory -or an object of class \verb{} created using functions \code{\link[hubUtils:s3_bucket]{s3_bucket()}} -or \code{\link[hubUtils:gs_bucket]{gs_bucket()}} by providing a string S3 or GCS bucket name or path to a +or an object of class \verb{} created using functions \code{\link[hubData:s3_bucket]{s3_bucket()}} +or \code{\link[hubData:gs_bucket]{gs_bucket()}} by providing a string S3 or GCS bucket name or path to a Modeling Hub directory stored in the cloud. For more details consult the \href{https://arrow.apache.org/docs/r/articles/fs.html}{Using cloud storage (S3, GCS)} diff --git a/man/read_model_out_file.Rd b/man/read_model_out_file.Rd index a91020e9..2b1272c7 100644 --- a/man/read_model_out_file.Rd +++ b/man/read_model_out_file.Rd @@ -15,8 +15,8 @@ read_model_out_file( the hub's model-output directory.} \item{hub_path}{Either a character string path to a local Modeling Hub directory -or an object of class \verb{} created using functions \code{\link[hubUtils:s3_bucket]{s3_bucket()}} -or \code{\link[hubUtils:gs_bucket]{gs_bucket()}} by providing a string S3 or GCS bucket name or path to a +or an object of class \verb{} created using functions \code{\link[hubData:s3_bucket]{s3_bucket()}} +or \code{\link[hubData:gs_bucket]{gs_bucket()}} by providing a string S3 or GCS bucket name or path to a Modeling Hub directory stored in the cloud. For more details consult the \href{https://arrow.apache.org/docs/r/articles/fs.html}{Using cloud storage (S3, GCS)} diff --git a/man/validate_model_data.Rd b/man/validate_model_data.Rd index fbcd143a..2ff2eb60 100644 --- a/man/validate_model_data.Rd +++ b/man/validate_model_data.Rd @@ -13,8 +13,8 @@ validate_model_data( } \arguments{ \item{hub_path}{Either a character string path to a local Modeling Hub directory -or an object of class \verb{} created using functions \code{\link[hubUtils:s3_bucket]{s3_bucket()}} -or \code{\link[hubUtils:gs_bucket]{gs_bucket()}} by providing a string S3 or GCS bucket name or path to a +or an object of class \verb{} created using functions \code{\link[hubData:s3_bucket]{s3_bucket()}} +or \code{\link[hubData:gs_bucket]{gs_bucket()}} by providing a string S3 or GCS bucket name or path to a Modeling Hub directory stored in the cloud. For more details consult the \href{https://arrow.apache.org/docs/r/articles/fs.html}{Using cloud storage (S3, GCS)} diff --git a/man/validate_model_file.Rd b/man/validate_model_file.Rd index ac778f30..e7626910 100644 --- a/man/validate_model_file.Rd +++ b/man/validate_model_file.Rd @@ -8,8 +8,8 @@ validate_model_file(hub_path, file_path, validations_cfg_path = NULL) } \arguments{ \item{hub_path}{Either a character string path to a local Modeling Hub directory -or an object of class \verb{} created using functions \code{\link[hubUtils:s3_bucket]{s3_bucket()}} -or \code{\link[hubUtils:gs_bucket]{gs_bucket()}} by providing a string S3 or GCS bucket name or path to a +or an object of class \verb{} created using functions \code{\link[hubData:s3_bucket]{s3_bucket()}} +or \code{\link[hubData:gs_bucket]{gs_bucket()}} by providing a string S3 or GCS bucket name or path to a Modeling Hub directory stored in the cloud. For more details consult the \href{https://arrow.apache.org/docs/r/articles/fs.html}{Using cloud storage (S3, GCS)} diff --git a/man/validate_model_metadata.Rd b/man/validate_model_metadata.Rd index 92e8e926..cc7e49bb 100644 --- a/man/validate_model_metadata.Rd +++ b/man/validate_model_metadata.Rd @@ -13,8 +13,8 @@ validate_model_metadata( } \arguments{ \item{hub_path}{Either a character string path to a local Modeling Hub directory -or an object of class \verb{} created using functions \code{\link[hubUtils:s3_bucket]{s3_bucket()}} -or \code{\link[hubUtils:gs_bucket]{gs_bucket()}} by providing a string S3 or GCS bucket name or path to a +or an object of class \verb{} created using functions \code{\link[hubData:s3_bucket]{s3_bucket()}} +or \code{\link[hubData:gs_bucket]{gs_bucket()}} by providing a string S3 or GCS bucket name or path to a Modeling Hub directory stored in the cloud. For more details consult the \href{https://arrow.apache.org/docs/r/articles/fs.html}{Using cloud storage (S3, GCS)} diff --git a/man/validate_pr.Rd b/man/validate_pr.Rd index 1760473c..578f4560 100644 --- a/man/validate_pr.Rd +++ b/man/validate_pr.Rd @@ -18,8 +18,8 @@ validate_pr( } \arguments{ \item{hub_path}{Either a character string path to a local Modeling Hub directory -or an object of class \verb{} created using functions \code{\link[hubUtils:s3_bucket]{s3_bucket()}} -or \code{\link[hubUtils:gs_bucket]{gs_bucket()}} by providing a string S3 or GCS bucket name or path to a +or an object of class \verb{} created using functions \code{\link[hubData:s3_bucket]{s3_bucket()}} +or \code{\link[hubData:gs_bucket]{gs_bucket()}} by providing a string S3 or GCS bucket name or path to a Modeling Hub directory stored in the cloud. For more details consult the \href{https://arrow.apache.org/docs/r/articles/fs.html}{Using cloud storage (S3, GCS)} diff --git a/man/validate_submission.Rd b/man/validate_submission.Rd index 07fb4778..9f243eb0 100644 --- a/man/validate_submission.Rd +++ b/man/validate_submission.Rd @@ -16,8 +16,8 @@ validate_submission( } \arguments{ \item{hub_path}{Either a character string path to a local Modeling Hub directory -or an object of class \verb{} created using functions \code{\link[hubUtils:s3_bucket]{s3_bucket()}} -or \code{\link[hubUtils:gs_bucket]{gs_bucket()}} by providing a string S3 or GCS bucket name or path to a +or an object of class \verb{} created using functions \code{\link[hubData:s3_bucket]{s3_bucket()}} +or \code{\link[hubData:gs_bucket]{gs_bucket()}} by providing a string S3 or GCS bucket name or path to a Modeling Hub directory stored in the cloud. For more details consult the \href{https://arrow.apache.org/docs/r/articles/fs.html}{Using cloud storage (S3, GCS)} diff --git a/man/validate_submission_time.Rd b/man/validate_submission_time.Rd index bb021d8f..5ba24ca5 100644 --- a/man/validate_submission_time.Rd +++ b/man/validate_submission_time.Rd @@ -12,8 +12,8 @@ validate_submission_time( } \arguments{ \item{hub_path}{Either a character string path to a local Modeling Hub directory -or an object of class \verb{} created using functions \code{\link[hubUtils:s3_bucket]{s3_bucket()}} -or \code{\link[hubUtils:gs_bucket]{gs_bucket()}} by providing a string S3 or GCS bucket name or path to a +or an object of class \verb{} created using functions \code{\link[hubData:s3_bucket]{s3_bucket()}} +or \code{\link[hubData:gs_bucket]{gs_bucket()}} by providing a string S3 or GCS bucket name or path to a Modeling Hub directory stored in the cloud. For more details consult the \href{https://arrow.apache.org/docs/r/articles/fs.html}{Using cloud storage (S3, GCS)} diff --git a/tests/testthat/test-check_config_hub_valid.R b/tests/testthat/test-check_config_hub_valid.R index 3661d517..ed063c60 100644 --- a/tests/testthat/test-check_config_hub_valid.R +++ b/tests/testthat/test-check_config_hub_valid.R @@ -14,7 +14,7 @@ test_that("check_config_hub_valid works", { mockery::stub( check_config_hub_valid, - "hubUtils::validate_hub_config", + "hubAdmin::validate_hub_config", list( admin = TRUE, tasks = FALSE diff --git a/tests/testthat/test-check_tbl_col_types.R b/tests/testthat/test-check_tbl_col_types.R index ea35ad46..99398abb 100644 --- a/tests/testthat/test-check_tbl_col_types.R +++ b/tests/testthat/test-check_tbl_col_types.R @@ -9,7 +9,7 @@ test_that("check_tbl_col_types works", { mockery::stub( check_tbl_col_types, - "hubUtils::create_hub_schema", + "hubData::create_hub_schema", c( origin_date = "character", target = "character", horizon = "double", location = "character", age_group = "character", output_type = "character", diff --git a/tests/testthat/test-check_tbl_value_col_ascending.R b/tests/testthat/test-check_tbl_value_col_ascending.R index 092b3c7a..eec0fec2 100644 --- a/tests/testthat/test-check_tbl_value_col_ascending.R +++ b/tests/testthat/test-check_tbl_value_col_ascending.R @@ -20,7 +20,7 @@ test_that("check_tbl_value_col_ascending works when output type IDs not ordered" tbl <- arrow::read_csv_arrow( test_path("testdata/files/2024-01-10-ISI-NotOrdered.csv") ) %>% - hubUtils::coerce_to_character() + hubData::coerce_to_character() file_path <- "ISI-NotOrdered/2024-01-10-ISI-NotOrdered.csv" expect_snapshot( check_tbl_value_col_ascending(tbl, file_path) diff --git a/tests/testthat/test-opt_check_tbl_col_timediff.R b/tests/testthat/test-opt_check_tbl_col_timediff.R index fa05761f..70bdb449 100644 --- a/tests/testthat/test-opt_check_tbl_col_timediff.R +++ b/tests/testthat/test-opt_check_tbl_col_timediff.R @@ -13,7 +13,7 @@ test_that("opt_check_tbl_col_timediff works", { ) ) - tbl_chr <- hubUtils::coerce_to_character(tbl) + tbl_chr <- hubData::coerce_to_character(tbl) expect_snapshot( opt_check_tbl_col_timediff(tbl_chr, file_path, hub_path, t0_colname = "forecast_date", @@ -73,7 +73,7 @@ test_that("opt_check_tbl_col_timediff fails correctly", { ) mockery::stub( opt_check_tbl_col_timediff, - "hubUtils::create_hub_schema", + "hubData::create_hub_schema", schema, 2 ) diff --git a/tests/testthat/test-opt_check_tbl_horizon_timediff.R b/tests/testthat/test-opt_check_tbl_horizon_timediff.R index 085b5932..4102e4a7 100644 --- a/tests/testthat/test-opt_check_tbl_horizon_timediff.R +++ b/tests/testthat/test-opt_check_tbl_horizon_timediff.R @@ -11,7 +11,7 @@ test_that("opt_check_tbl_horizon_timediff works", { ) ) - tbl_chr <- hubUtils::coerce_to_character(tbl) + tbl_chr <- hubData::coerce_to_character(tbl) expect_snapshot( opt_check_tbl_horizon_timediff(tbl_chr, file_path, hub_path, t0_colname = "forecast_date", @@ -74,7 +74,7 @@ test_that("opt_check_tbl_horizon_timediff fails correctly", { ) mockery::stub( opt_check_tbl_horizon_timediff, - "hubUtils::create_hub_schema", + "hubData::create_hub_schema", schema, 2 ) From 8f504ec41c26ce510f67e0ac682bd2491c29ca08 Mon Sep 17 00:00:00 2001 From: Anna Krystalli Date: Wed, 28 Feb 2024 17:12:25 +0200 Subject: [PATCH 2/5] remove placeholder method --- R/hub_validations_methods.R | 5 ----- 1 file changed, 5 deletions(-) diff --git a/R/hub_validations_methods.R b/R/hub_validations_methods.R index 64bd3f67..17203c0c 100644 --- a/R/hub_validations_methods.R +++ b/R/hub_validations_methods.R @@ -73,11 +73,6 @@ validate_internal_class <- function(x, class = c( invisible(TRUE) } -summary.hub_validations <- function(x, ...) { - # TODO - NULL -} - # TODO: Code to consider implementing more hierarchical printing of messages. # Currently not implemented as pr_hub_validations class not implemented. #' Print results of `validate_pr()` function as a bullet list From 84ce7102ef4b5fb7c624777bcab917ad063b4b5b Mon Sep 17 00:00:00 2001 From: Anna Krystalli Date: Wed, 28 Feb 2024 17:12:47 +0200 Subject: [PATCH 3/5] Bump to v0.0.1 --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 0a64744a..89d6b768 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: hubValidations Title: Testing framework for hubverse hub validations -Version: 0.0.0.9008 +Version: 0.0.1 Authors@R: c( person( given = "Anna", From 4054306cc604b4665ae1de24b616cfe614e37954 Mon Sep 17 00:00:00 2001 From: Anna Krystalli Date: Wed, 28 Feb 2024 18:43:25 +0200 Subject: [PATCH 4/5] Add any::tzdb to silence windows warning --- .github/workflows/R-CMD-check.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 74d8c974..7c220bc4 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -41,7 +41,7 @@ jobs: - uses: r-lib/actions/setup-r-dependencies@v2 with: - extra-packages: any::rcmdcheck + extra-packages: any::rcmdcheck, any::tzdb needs: check - uses: r-lib/actions/check-r-package@v2 From 7f6dc2a4a3aada4907995cb4bd7400297680265d Mon Sep 17 00:00:00 2001 From: Anna Krystalli Date: Thu, 29 Feb 2024 15:55:33 +0200 Subject: [PATCH 5/5] Suppress message showing up on windows --- tests/testthat/_snaps/check_file_read.md | 4 ++-- tests/testthat/test-check_file_read.R | 16 ++++++++++------ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/tests/testthat/_snaps/check_file_read.md b/tests/testthat/_snaps/check_file_read.md index ecafb161..2c0cd756 100644 --- a/tests/testthat/_snaps/check_file_read.md +++ b/tests/testthat/_snaps/check_file_read.md @@ -1,8 +1,8 @@ # check_file_read works Code - check_file_read(file_path = "team1-goodmodel/2022-10-08-team1-goodmodel.csv", - hub_path = hub_path) + suppressMessages(check_file_read(file_path = "team1-goodmodel/2022-10-08-team1-goodmodel.csv", + hub_path = hub_path)) Output Message: diff --git a/tests/testthat/test-check_file_read.R b/tests/testthat/test-check_file_read.R index 1471fb39..52f6bb50 100644 --- a/tests/testthat/test-check_file_read.R +++ b/tests/testthat/test-check_file_read.R @@ -2,15 +2,19 @@ test_that("check_file_read works", { hub_path <- system.file("testhubs/simple", package = "hubValidations") expect_snapshot( - check_file_read( - file_path = "team1-goodmodel/2022-10-08-team1-goodmodel.csv", - hub_path = hub_path + suppressMessages( + check_file_read( + file_path = "team1-goodmodel/2022-10-08-team1-goodmodel.csv", + hub_path = hub_path + ) ) ) expect_s3_class( - check_file_read( - file_path = "team1-goodmodel/2022-10-15-team1-goodmodel.csv", - hub_path = hub_path + suppressMessages( + check_file_read( + file_path = "team1-goodmodel/2022-10-15-team1-goodmodel.csv", + hub_path = hub_path + ) ), c("check_error", "hub_check", "rlang_error", "error", "condition") )