diff --git a/R/v3-schema-utils.R b/R/v3-schema-utils.R index d85b608..0e6fe13 100644 --- a/R/v3-schema-utils.R +++ b/R/v3-schema-utils.R @@ -2,7 +2,7 @@ #' #' @param config List representation of the JSON config file. #' -#' @return Logical, whether the config list representation is using v3.0.0 schema. +#' @return Logical, whether the config list representation is using v3.0.0 schema or greater. #' @export #' #' @examples @@ -12,14 +12,14 @@ #' is_v3_config(config) is_v3_config <- function(config) { checkmate::assert_list(config) - extract_schema_version(config$schema_version) >= "v3.0.0" + version_gte("v3.0.0", config = config) } #' Is config file using v3.0.0 schema? #' #' @param config_path Path to the config file. #' -#' @return Logical, whether the config file is using v3.0.0 schema. +#' @return Logical, whether the config file is using v3.0.0 schema or greater. #' @export #' #' @examples @@ -27,15 +27,14 @@ is_v3_config <- function(config) { #' is_v3_config_file(config_path) is_v3_config_file <- function(config_path) { checkmate::assert_file_exists(config_path) - config <- read_config_file(config_path) - extract_schema_version(config$schema_version) >= "v3.0.0" + version_gte("v3.0.0", config_path = config_path) } #' Is hub configured using v3.0.0 schema? #' #' @inheritParams read_config #' -#' @return Logical, whether the hub is configured using v3.0.0 schema. +#' @return Logical, whether the hub is configured using v3.0.0 schema or greater. #' @export #' #' @examples diff --git a/man/is_v3_config.Rd b/man/is_v3_config.Rd index bdfbd21..a42faea 100644 --- a/man/is_v3_config.Rd +++ b/man/is_v3_config.Rd @@ -10,7 +10,7 @@ is_v3_config(config) \item{config}{List representation of the JSON config file.} } \value{ -Logical, whether the config list representation is using v3.0.0 schema. +Logical, whether the config list representation is using v3.0.0 schema or greater. } \description{ Is config list representation using v3.0.0 schema? diff --git a/man/is_v3_config_file.Rd b/man/is_v3_config_file.Rd index 7b70fcb..215a8fb 100644 --- a/man/is_v3_config_file.Rd +++ b/man/is_v3_config_file.Rd @@ -10,7 +10,7 @@ is_v3_config_file(config_path) \item{config_path}{Path to the config file.} } \value{ -Logical, whether the config file is using v3.0.0 schema. +Logical, whether the config file is using v3.0.0 schema or greater. } \description{ Is config file using v3.0.0 schema? diff --git a/man/is_v3_hub.Rd b/man/is_v3_hub.Rd index dade838..9c7ef73 100644 --- a/man/is_v3_hub.Rd +++ b/man/is_v3_hub.Rd @@ -19,7 +19,7 @@ in the \code{arrow} package.} \code{"model-metadata-schema"}. Default is \code{"tasks"}.} } \value{ -Logical, whether the hub is configured using v3.0.0 schema. +Logical, whether the hub is configured using v3.0.0 schema or greater. } \description{ Is hub configured using v3.0.0 schema? diff --git a/man/subset_task_id_cols.Rd b/man/subset_task_id_cols.Rd index 1407442..4225302 100644 --- a/man/subset_task_id_cols.Rd +++ b/man/subset_task_id_cols.Rd @@ -3,7 +3,7 @@ \name{subset_task_id_cols} \alias{subset_task_id_cols} \alias{subset_std_cols} -\title{Subset a \code{model_out_tbl} or submission \code{tbl} to only include task_id columns} +\title{Subset a \code{model_out_tbl} or submission \code{tbl}.} \usage{ subset_task_id_cols(model_out_tbl) @@ -26,7 +26,7 @@ task_id columns). } } \description{ -Subset a \code{model_out_tbl} or submission \code{tbl} to only include task_id columns +Subset a \code{model_out_tbl} or submission \code{tbl}. } \section{Functions}{ \itemize{