diff --git a/R/generate_pkg-setup.R b/R/generate_pkg-setup.R index 7354a2a..035e6a9 100644 --- a/R/generate_pkg-setup.R +++ b/R/generate_pkg-setup.R @@ -32,11 +32,9 @@ .read_config <- function(config_file = "_beekeeper.yml") { config <- yaml::read_yaml(config_file) - return(.stabilize_config(config)) # nocov + return(.stabilize_config(config)) } -# covr doesn't see the line above and a bunch below for some reason. -# nocov start .stabilize_config <- function(config) { config$api_title <- stbl::stabilize_character_scalar(config$api_title) config$api_abbr <- stbl::stabilize_character_scalar(config$api_abbr) @@ -49,7 +47,6 @@ ) return(config) } -# nocov end .read_api_definition <- function(pkg_dir, rapid_file) { readRDS( diff --git a/R/sysdata.rda b/R/sysdata.rda index 9698cd2..b812982 100644 Binary files a/R/sysdata.rda and b/R/sysdata.rda differ diff --git a/data-raw/oas_format_registry.R b/data-raw/oas_format_registry.R index e765afe..405da66 100644 --- a/data-raw/oas_format_registry.R +++ b/data-raw/oas_format_registry.R @@ -40,47 +40,48 @@ oas_format_registry <- # nectar re-exports from stbl, and adds HTTP-specific wrappers to_r = dplyr::case_when( ## Null - .data$type == "null" ~ "stabilize_null", + .data$type == "null" ~ "todo_to_null", ## Numbers - .data$format == "int64" ~ "stabilize_int64", - stringr::str_detect(.data$format, "int") ~ "stabilize_int", - stringr::str_detect(.data$type, "int") ~ "stabilize_int", - .data$type == "number" ~ "stabilize_dbl", - stringr::str_detect(.data$format, "decimal") ~ "stabilize_dbl", + .data$format == "int64" ~ "todo_to_int64_scalar", + stringr::str_detect(.data$format, "int") ~ "to_int_scalar", + stringr::str_detect(.data$type, "int") ~ "to_int_scalar", + .data$type == "number" ~ "to_dbl_scalar", + stringr::str_detect(.data$format, "decimal") ~ "to_dbl_scalar", ## Dates and times - .data$format %in% c("date", "http-date") ~ "stabilize_date", - .data$format == "date-time" ~ "stabilize_datetime", - .data$format == "duration" ~ "stabilize_duration", - .data$format == "time" ~ "stabilize_time", + .data$format %in% c("date", "http-date") ~ "todo_to_date_scalar", + .data$format == "date-time" ~ "todo_to_datetime_scalar", + .data$format == "duration" ~ "todo_to_duration_scalar", + .data$format == "time" ~ "todo_to_time_scalar", ## Binary - .data$format %in% c("byte", "sf-binary") ~ "stabilize_base64_to_chr", - .data$format == "binary" ~ "stabilize_binary_to_raw", - .data$format == "base64url" ~ "stabilize_base64url_to_chr", + .data$format %in% + c("byte", "sf-binary") ~ "todo_stabilize_base64_to_chr_scalar", + .data$format == "binary" ~ "todo_stabilize_binary_to_raw", + .data$format == "base64url" ~ "todo_stabilize_base64url_to_chr_scalar", ## Logical - .data$format == "sf-boolean" ~ "stabilize_structured_lgl", - .data$type == "boolean" ~ "stabilize_lgl", + .data$format == "sf-boolean" ~ "todo_to_structured_lgl_scalar", + .data$type == "boolean" ~ "to_lgl_scalar", ## Specific Strings - .data$format == "uuid" ~ "stabilize_uuid", + .data$format == "uuid" ~ "todo_to_uuid_scalar", # TODO: Add more specific string formats. - .default = "stabilize_chr" + .default = "to_chr_scalar" ), r_class_name = dplyr::replace_values( .data$to_r, - "stabilize_base64_to_chr" ~ "character", - "stabilize_base64url_to_chr" ~ "character", - "stabilize_binary_to_raw" ~ "raw", - "stabilize_chr" ~ "character", - "stabilize_date" ~ "Date", - "stabilize_datetime" ~ "POSIXct", - "stabilize_dbl" ~ "double", - "stabilize_duration" ~ "Duration", - "stabilize_int" ~ "integer", - "stabilize_int64" ~ "integer64", - "stabilize_lgl" ~ "logical", - "stabilize_null" ~ "NULL", - "stabilize_structured_lgl" ~ "logical", - "stabilize_time" ~ "hms", - "stabilize_uuid" ~ "UUID" + "todo_stabilize_base64_to_chr_scalar" ~ "character", + "todo_stabilize_base64url_to_chr_scalar" ~ "character", + "todo_stabilize_binary_to_raw" ~ "raw", + "to_chr_scalar" ~ "character", + "todo_to_date_scalar" ~ "Date", + "todo_to_datetime_scalar" ~ "POSIXct", + "to_dbl_scalar" ~ "double", + "todo_to_duration_scalar" ~ "Duration", + "to_int_scalar" ~ "integer", + "todo_to_int64_scalar" ~ "integer64", + "to_lgl_scalar" ~ "logical", + "todo_to_null" ~ "NULL", + "todo_to_structured_lgl_scalar" ~ "logical", + "todo_to_time_scalar" ~ "hms", + "todo_to_uuid_scalar" ~ "UUID" ), r_class_package = dplyr::recode_values( .data$r_class_name,