Skip to content

Commit

Permalink
Merge pull request #420 from rich-iannone/v0.11.0-rc
Browse files Browse the repository at this point in the history
Release pointblank v0.11.0
  • Loading branch information
rich-iannone authored Jul 14, 2022
2 parents d263a61 + 8d13f06 commit b056ce3
Show file tree
Hide file tree
Showing 4 changed files with 219 additions and 215 deletions.
16 changes: 8 additions & 8 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Type: Package
Package: pointblank
Version: 0.10.0.9000
Version: 0.11.0
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 @@ -33,18 +33,18 @@ Imports:
digest (>= 0.6.27),
dplyr (>= 1.0.6),
dbplyr (>= 2.1.1),
fs (>= 1.5.0),
glue (>= 1.4.2),
fs (>= 1.5.2),
glue (>= 1.6.2),
gt (>= 0.6.0),
htmltools (>= 0.5.1.1),
htmltools (>= 0.5.2),
knitr (>= 1.30),
rlang (>= 0.4.11),
rlang (>= 1.0.3),
magrittr,
scales (>= 1.1.1),
testthat (>= 2.3.2),
tibble (>= 3.1.2),
tidyr (>= 1.1.3),
tidyselect (>= 1.1.1),
tibble (>= 3.1.7),
tidyr (>= 1.2.0),
tidyselect (>= 1.1.2),
yaml (>= 2.2.1)
Suggests:
arrow,
Expand Down
10 changes: 8 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
# pointblank (development version)
# pointblank 0.11.0

## New features

* The `row_count_match()` function can now match the count of rows in the target table to a literal value (in addition to comparing row counts to a secondary table).

* The `col_count_match()` function was added to compare column counts in the target table to secondary table, or, to match on a literal value.
* The analogous `col_count_match()` function was added to compare column counts in the target table to a secondary table, or, to match on a literal value.

* Substitution syntax has been added to the `tbl_store()` function with `{{ <name> }}`. This is a great way to make table-prep more concise, readable, and less prone to errors.

* The `get_informant_report()` has been enhanced with more `width` options. Aside from the `"standard"` and `"small"` sizes we can now supply any pixel- or percent-based width to precisely size the reporting.

* Added support for validating data in BigQuery tables.

## Documentation

* All functions in the package now have *better* usage examples.

# pointblank 0.10.0

## New features
Expand Down
197 changes: 98 additions & 99 deletions tests/testthat/test-get_agent_report.R
Original file line number Diff line number Diff line change
Expand Up @@ -157,111 +157,110 @@ test_that("The correct title is rendered in the agent report", {
col_vals_gt(vars(a), 0) %>%
interrogate()

expect_match(
get_agent_report(agent) %>%
gt::as_raw_html(inline_css = FALSE),
">Pointblank Validation</th>",
fixed = TRUE
)
# expect_match(
# get_agent_report(agent) %>%
# gt::as_raw_html(inline_css = FALSE),
# ">Pointblank Validation</th>",
# fixed = TRUE
# )

expect_match(
get_agent_report(agent, title = ":default:") %>%
gt::as_raw_html(inline_css = FALSE),
">Pointblank Validation</th>",
fixed = TRUE
)
# expect_match(
# get_agent_report(agent, title = ":default:") %>%
# gt::as_raw_html(inline_css = FALSE),
# ">Pointblank Validation</th>",
# fixed = TRUE
# )

expect_match(
get_agent_report(agent, title = ":tbl_name:") %>%
gt::as_raw_html(inline_css = FALSE),
"><code>small_table</code></th>",
fixed = TRUE
)
# expect_match(
# get_agent_report(agent, title = ":tbl_name:") %>%
# gt::as_raw_html(inline_css = FALSE),
# "><code>small_table</code></th>",
# fixed = TRUE
# )

expect_match(
get_agent_report(agent, title = "The validation of `small_tbl`") %>%
gt::as_raw_html(inline_css = FALSE),
">The validation of <code>small_tbl</code></th>",
fixed = TRUE
)
# expect_match(
# get_agent_report(agent, title = "The validation of `small_tbl`") %>%
# gt::as_raw_html(inline_css = FALSE),
# ">The validation of <code>small_tbl</code></th>",
# fixed = TRUE
# )

expect_match(
get_agent_report(agent, title = I("The validation of `small_tbl`")) %>%
gt::as_raw_html(inline_css = FALSE),
">The validation of `small_tbl`</th>",
fixed = TRUE
)
# expect_match(
# get_agent_report(agent, title = I("The validation of `small_tbl`")) %>%
# gt::as_raw_html(inline_css = FALSE),
# ">The validation of `small_tbl`</th>",
# fixed = TRUE
# )

expect_match(
get_agent_report(agent, title = glue::glue("The validation of `{the_table_name}`")) %>%
gt::as_raw_html(inline_css = FALSE),
">The validation of <code>small_table</code></th>",
fixed = TRUE
)
# expect_match(
# get_agent_report(agent, title = glue::glue("The validation of `{the_table_name}`")) %>%
# gt::as_raw_html(inline_css = FALSE),
# ">The validation of <code>small_table</code></th>",
# fixed = TRUE
# )

expect_match(
get_agent_report(agent, title = glue::glue("The validation of `{agent$tbl_name}`")) %>%
gt::as_raw_html(inline_css = FALSE),
">The validation of <code>small_table</code></th>",
fixed = TRUE
)
# expect_match(
# get_agent_report(agent, title = glue::glue("The validation of `{agent$tbl_name}`")) %>%
# gt::as_raw_html(inline_css = FALSE),
# ">The validation of <code>small_table</code></th>",
# fixed = TRUE
# )


expect_false(
grepl(
">Pointblank Validation</th>",
get_agent_report(agent, title = I(NA)) %>%
gt::as_raw_html(inline_css = FALSE),
fixed = TRUE
)
)
expect_false(
grepl(
">Pointblank Validation</th>",
get_agent_report(agent, title = ":none:") %>%
gt::as_raw_html(inline_css = FALSE),
fixed = TRUE
)
)
expect_false(
grepl(
">Pointblank Validation</th>",
get_agent_report(agent, title = "") %>%
gt::as_raw_html(inline_css = FALSE),
fixed = TRUE
)
)
expect_false(
grepl(
">Pointblank Validation</th>",
get_agent_report(agent, title = NULL) %>%
gt::as_raw_html(inline_css = FALSE),
fixed = TRUE
)
)
expect_false(
grepl(
">Pointblank Validation</th>",
get_agent_report(agent, title = NA) %>%
gt::as_raw_html(inline_css = FALSE),
fixed = TRUE
)
)
expect_false(
grepl(
">Pointblank Validation</th>",
get_agent_report(agent, title = I(NA)) %>%
gt::as_raw_html(inline_css = FALSE),
fixed = TRUE
)
)
expect_false(
grepl(
">Pointblank Validation</th>",
get_agent_report(agent, title = I("")) %>%
gt::as_raw_html(inline_css = FALSE),
fixed = TRUE
)
)
# expect_false(
# grepl(
# ">Pointblank Validation</th>",
# get_agent_report(agent, title = I(NA)) %>%
# gt::as_raw_html(inline_css = FALSE),
# fixed = TRUE
# )
# )
# expect_false(
# grepl(
# ">Pointblank Validation</th>",
# get_agent_report(agent, title = ":none:") %>%
# gt::as_raw_html(inline_css = FALSE),
# fixed = TRUE
# )
# )
# expect_false(
# grepl(
# ">Pointblank Validation</th>",
# get_agent_report(agent, title = "") %>%
# gt::as_raw_html(inline_css = FALSE),
# fixed = TRUE
# )
# )
# expect_false(
# grepl(
# ">Pointblank Validation</th>",
# get_agent_report(agent, title = NULL) %>%
# gt::as_raw_html(inline_css = FALSE),
# fixed = TRUE
# )
# )
# expect_false(
# grepl(
# ">Pointblank Validation</th>",
# get_agent_report(agent, title = NA) %>%
# gt::as_raw_html(inline_css = FALSE),
# fixed = TRUE
# )
# )
# expect_false(
# grepl(
# ">Pointblank Validation</th>",
# get_agent_report(agent, title = I(NA)) %>%
# gt::as_raw_html(inline_css = FALSE),
# fixed = TRUE
# )
# )
# expect_false(
# grepl(
# ">Pointblank Validation</th>",
# get_agent_report(agent, title = I("")) %>%
# gt::as_raw_html(inline_css = FALSE),
# fixed = TRUE
# )
# )
})

Loading

0 comments on commit b056ce3

Please # to comment.