Skip to content

Commit

Permalink
Merge pull request #472 from rich-iannone/v0.11.4-rc
Browse files Browse the repository at this point in the history
Release pointblank v0.11.4
  • Loading branch information
rich-iannone authored Apr 25, 2023
2 parents d92d7e2 + 23ba988 commit 47834e5
Show file tree
Hide file tree
Showing 5 changed files with 87 additions and 62 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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),
Expand Down
4 changes: 3 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# pointblank (development version)
# pointblank 0.11.4

* Fixes issue with gt `0.9.0` compatibility.

# pointblank 0.11.3

Expand Down
132 changes: 77 additions & 55 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -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(
...,
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)

Expand All @@ -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(
Expand Down Expand Up @@ -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(
Expand All @@ -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()`

Expand Down Expand Up @@ -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"

Expand Down Expand Up @@ -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") {

Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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)) {

Expand Down Expand Up @@ -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)
Expand All @@ -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))
}

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<br />
<!-- badges: start -->
<a href="https://cran.r-project.org/package=pointblank"><img src="https://www.r-pkg.org/badges/version/pointblank" alt="CRAN status" /></a>
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT" /></a>
<a href="https://opensource.org/license/mit/"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT" /></a>
<a href="https://github.com/rich-iannone/pointblank/actions"><img src="https://github.com/rich-iannone/pointblank/workflows/R-CMD-check/badge.svg" alt="R build status" /></a>
<a href="https://github.com/rich-iannone/pointblank/actions"><img src="https://github.com/rich-iannone/pointblank/workflows/lint/badge.svg" alt="Linting" /></a>
<a href="https://app.codecov.io/gh/rich-iannone/pointblank?branch=main"><img src="https://codecov.io/gh/rich-iannone/pointblank/branch/main/graph/badge.svg" alt="Coverage status" /></a>
Expand All @@ -15,7 +15,7 @@
<a href="https://CRAN.R-project.org/package=pointblank"><img src="https://cranlogs.r-pkg.org/badges/pointblank" alt="Monthly Downloads"></a>
<a href="https://CRAN.R-project.org/package=pointblank"><img src="https://cranlogs.r-pkg.org/badges/grand-total/pointblank" alt="Total Downloads"></a>

[![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)

<a href="https://www.contributor-covenant.org/version/2/0/code_of_conduct/"><img src="https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg" alt="Contributor Covenant" /></a>
<!-- badges: end -->
Expand Down
5 changes: 3 additions & 2 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@

<!-- badges: start -->
<a href="https://cran.r-project.org/package=pointblank"><img src="https://www.r-pkg.org/badges/version/pointblank" alt="CRAN status" /></a>
<a href="https://opensource.org/license/mit/"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT" /></a>
<a href="https://github.com/rich-iannone/pointblank/actions"><img src="https://github.com/rich-iannone/pointblank/workflows/R-CMD-check/badge.svg" alt="R build status" /></a>
<a href="https://github.com/rich-iannone/pointblank/actions"><img src="https://github.com/rich-iannone/pointblank/workflows/lint/badge.svg" alt="Linting" /></a>
<a href="https://codecov.io/gh/rich-iannone/pointblank?branch=master"><img src="https://codecov.io/gh/rich-iannone/pointblank/branch/master/graph/badge.svg" alt="Coverage status" /></a>
<a href="https://app.codecov.io/gh/rich-iannone/pointblank?branch=main"><img src="https://codecov.io/gh/rich-iannone/pointblank/branch/main/graph/badge.svg" alt="Coverage status" /></a>
<a href="https://bestpractices.coreinfrastructure.org/projects/4310"><img src="https://bestpractices.coreinfrastructure.org/projects/4310/badge" alt="Best Practices"></a>
<a href="https://www.repostatus.org/#active"><img src="https://www.repostatus.org/badges/latest/active.svg" alt="The project has reached a stable, usable state and is being actively developed." /></a>
<a href="https://CRAN.R-project.org/package=pointblank"><img src="https://cranlogs.r-pkg.org/badges/pointblank" alt="Monthly Downloads"></a>
<a href="https://CRAN.R-project.org/package=pointblank"><img src="https://cranlogs.r-pkg.org/badges/grand-total/pointblank" alt="Total Downloads"></a>
[![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)
<a href="https://www.contributor-covenant.org/version/2/0/code_of_conduct/"><img src="https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg" alt="Contributor Covenant" /></a>
<!-- badges: end -->

Expand Down

0 comments on commit 47834e5

Please sign in to comment.