diff --git a/DESCRIPTION b/DESCRIPTION index 32ff7edeb..58b185bbb 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Type: Package Package: pointblank -Version: 0.11.3.9000 +Version: 0.11.4 Title: Data Validation and Organization of Metadata for Local and Remote Tables Description: Validate data in data frames, 'tibble' objects, 'Spark' 'DataFrames', and database tables. Validation pipelines can be made using @@ -35,7 +35,7 @@ Imports: dbplyr (>= 2.3.0), fs (>= 1.6.0), glue (>= 1.6.2), - gt (>= 0.8.0), + gt (>= 0.9.0), htmltools (>= 0.5.4), knitr (>= 1.42), rlang (>= 1.0.3), diff --git a/NEWS.md b/NEWS.md index 563e6b794..3e5ee4460 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,6 @@ -# pointblank (development version) +# pointblank 0.11.4 + +* Fixes issue with gt `0.9.0` compatibility. # pointblank 0.11.3 diff --git a/R/utils.R b/R/utils.R index 9990ce1b2..6ba70963c 100644 --- a/R/utils.R +++ b/R/utils.R @@ -107,9 +107,12 @@ safely_transformer <- function(otherwise = NA) { } } -glue_safely <- function(..., - .otherwise = NA, - .envir = parent.frame()) { +glue_safely <- function( + ..., + .otherwise = NA, + .envir = parent.frame() +) { + as.character( glue::glue( ..., @@ -178,8 +181,7 @@ get_all_cols <- function(agent) { agent$col_names } -materialize_table <- function(tbl, - check = TRUE) { +materialize_table <- function(tbl, check = TRUE) { if (is.null(tbl)) { stop("A table must be provided.", call. = FALSE) @@ -1010,18 +1012,20 @@ get_tbl_information_arrow <- function(tbl) { # nocov end -pb_fmt_number <- function(x, - decimals = 2, - n_sigfig = NULL, - drop_trailing_zeros = FALSE, - drop_trailing_dec_mark = TRUE, - use_seps = TRUE, - scale_by = 1, - suffixing = FALSE, - pattern = "{x}", - sep_mark = ",", - dec_mark = ".", - locale = NULL) { +pb_fmt_number <- function( + x, + decimals = 2, + n_sigfig = NULL, + drop_trailing_zeros = FALSE, + drop_trailing_dec_mark = TRUE, + use_seps = TRUE, + scale_by = 1, + suffixing = FALSE, + pattern = "{x}", + sep_mark = ",", + dec_mark = ".", + locale = NULL +) { if (is.null(x)) return(NULL) @@ -1048,9 +1052,11 @@ pb_fmt_number <- function(x, ))$`_formats`[[1]][[1]][[1]])(x) } -add_icon_img <- function(icon, - height = 30, - v_align = "middle") { +add_icon_img <- function( + icon, + height = 30, + v_align = "middle" +) { file <- system.file( @@ -1084,9 +1090,11 @@ add_icon_img <- function(icon, gsub("\\s\\s+", " ", htmltools::HTML(as.character(img))) } -add_icon_svg <- function(icon, - height = 30, - v_align = "middle") { +add_icon_svg <- function( + icon, + height = 30, + v_align = "middle" +) { file <- system.file( @@ -1111,18 +1119,21 @@ add_icon_svg <- function(icon, as.character() } -tidy_gsub <- function(x, - pattern, - replacement, - fixed = FALSE) { - +tidy_gsub <- function( + x, + pattern, + replacement, + fixed = FALSE +) { gsub(pattern, replacement, x, fixed = fixed) } -capture_formula <- function(formula, - separate = TRUE, - remove_whitespace = TRUE, - oneline = TRUE) { +capture_formula <- function( + formula, + separate = TRUE, + remove_whitespace = TRUE, + oneline = TRUE +) { # TODO: add option to use `htmltools::htmlEscape()` @@ -1162,14 +1173,16 @@ capture_function <- function(fn, escape = TRUE) { output } -pb_str_catalog <- function(item_vector, - limit = 5, - sep = ",", - and_or = NULL, - oxford = TRUE, - as_code = TRUE, - quot_str = NULL, - lang = NULL) { +pb_str_catalog <- function( + item_vector, + limit = 5, + sep = ",", + and_or = NULL, + oxford = TRUE, + as_code = TRUE, + quot_str = NULL, + lang = NULL +) { if (is.null(lang)) lang <- "en" @@ -1302,8 +1315,10 @@ pb_str_catalog <- function(item_vector, } } -pb_str_summary <- function(column, - type) { +pb_str_summary <- function( + column, + type +) { if (type == "5num") { @@ -1408,9 +1423,11 @@ pb_str_summary <- function(column, summary_str } -generate_number <- function(number, - color, - title) { +generate_number <- function( + number, + color, + title +) { number <- as.character(number) @@ -1438,8 +1455,10 @@ generate_number <- function(number, ) } -pb_quantile_stats <- function(data_column, - quantile) { +pb_quantile_stats <- function( + data_column, + quantile +) { if (is_tbl_spark(data_column)) { @@ -1537,10 +1556,12 @@ pb_min_max_stats <- function(data_column) { as.list() } -cli_bullet_msg <- function(msg, - bullet = cli::symbol$bullet, - color = NULL, - .envir = parent.frame()) { +cli_bullet_msg <- function( + msg, + bullet = cli::symbol$bullet, + color = NULL, + .envir = parent.frame() +) { msg <- glue::glue_collapse(msg, "\n") msg <- glue::glue(msg, .envir = .envir) @@ -1555,10 +1576,11 @@ cli_bullet_msg <- function(msg, rlang::inform(msg) } -cli_ident <- function(x, - initial = " ", - indent = initial) { - +cli_ident <- function( + x, + initial = " ", + indent = initial +) { paste0(initial, gsub("\n", paste0("\n", indent), x)) } diff --git a/README.md b/README.md index 8729f2176..bcb8ff068 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@
CRAN status -License: MIT +License: MIT R build status Linting Coverage status @@ -15,7 +15,7 @@ Monthly Downloads Total Downloads -[![RStudio community](https://img.shields.io/badge/RStudio%20Cloud-pointblank%20Test%20Drive-blue?style=social&logo=rstudio&logoColor=75AADB)](https://rstudio.cloud/project/3411822) +[![Posit Cloud](https://img.shields.io/badge/Posit%20Cloud-pointblank%20Test%20Drive-blue?style=social&logo=rstudio&logoColor=75AADB)](https://rstudio.cloud/project/3411822) Contributor Covenant diff --git a/index.md b/index.md index aaa69c5e5..2985db492 100644 --- a/index.md +++ b/index.md @@ -2,14 +2,15 @@ CRAN status +License: MIT R build status Linting -Coverage status +Coverage status Best Practices The project has reached a stable, usable state and is being actively developed. Monthly Downloads Total Downloads -[![RStudio community](https://img.shields.io/badge/RStudio%20Cloud-pointblank%20Test%20Drive-blue?style=social&logo=rstudio&logoColor=75AADB)](https://rstudio.cloud/project/3411822) +[![Posit Cloud](https://img.shields.io/badge/Posit%20Cloud-pointblank%20Test%20Drive-blue?style=social&logo=rstudio&logoColor=75AADB)](https://rstudio.cloud/project/3411822) Contributor Covenant