rstudio / pointblank

Data quality assessment and metadata reporting for data frames and database tables
https://rstudio.github.io/pointblank/
Other
880 stars 56 forks source link

`title` argument of `get_agent_report()` doesn't work with `size = "small"` #456

Closed Aariq closed 9 months ago

Aariq commented 1 year ago

Prework

Description

The get_agent_report(agent, title = "a custom title", size = "small) does not change the default title of the table.

Reproducible example

library(pointblank)
tbl <- dplyr::tibble(a = c(5, 7, 8, 5))
agent <-
  create_agent(
    tbl = tbl,
    tbl_name = "small_table",
    label = "An example."
  ) %>%
  col_vals_gt(columns = vars(a), value = 4) %>%
  interrogate()

get_agent_report(
  agent = agent,
  title = "a custom title",
  size = "small"
)

get_agent_report(
  agent = agent,
  title = "a custom title",
  size = "standard"
)

Expected result

In this example, both the standard and small tables should have the title "a custom title".

Session info

End the reproducible example with a call to sessionInfo() in the same session (e.g. reprex(session_info = TRUE)) and include the output.

``` R version 4.2.0 (2022-04-22) Platform: x86_64-apple-darwin17.0 (64-bit) Running under: macOS 13.1 Matrix products: default LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] stats graphics grDevices datasets utils methods base other attached packages: [1] slider_0.2.2 arrow_10.0.0 pointblank_0.11.2.9000 lubridate_1.9.0 [5] timechange_0.1.1 fabletools_0.3.2.9000 forcats_0.5.2 stringr_1.4.1 [9] dplyr_1.0.10 purrr_0.3.5 readr_2.1.3 tidyr_1.2.1 [13] tibble_3.1.8 ggplot2_3.4.0 tidyverse_1.3.2 targets_0.14.0 loaded via a namespace (and not attached): [1] fs_1.5.2 blastula_0.3.2 bit64_4.0.5 httr_1.4.4 [5] tools_4.2.0 backports_1.4.1 utf8_1.2.2 R6_2.5.1 [9] DBI_1.1.3 colorspace_2.0-3 withr_2.5.0 tidyselect_1.2.0 [13] processx_3.7.0 bit_4.0.4 compiler_4.2.0 cli_3.4.1 [17] rvest_1.0.3 gt_0.8.0 xml2_1.3.3 sass_0.4.2 [21] scales_1.2.1 callr_3.7.3 commonmark_1.8.1 digest_0.6.29 [25] rmarkdown_2.17 tsibble_1.1.3 pkgconfig_2.0.3 htmltools_0.5.3 [29] dbplyr_2.2.1 fastmap_1.1.0 highr_0.9 rlang_1.0.6 [33] readxl_1.4.1 rstudioapi_0.14 farver_2.1.1 generics_0.1.3 [37] jsonlite_1.8.2 googlesheets4_1.0.1 distributional_0.3.1.9000 magrittr_2.0.3 [41] Rcpp_1.0.9 munsell_0.5.0 fansi_1.0.3 clipr_0.8.0 [45] lifecycle_1.0.3 stringi_1.7.8 yaml_2.3.6 grid_4.2.0 [49] crayon_1.5.2 haven_2.5.1 hms_1.1.2 knitr_1.40 [53] anytime_0.3.9 ps_1.7.1 pillar_1.8.1 igraph_1.3.5 [57] base64url_1.4 codetools_0.2-18 reprex_2.0.2 glue_1.6.2 [61] evaluate_0.17 data.table_1.14.2 renv_0.16.0 modelr_0.1.9 [65] vctrs_0.5.0 tzdb_0.3.0 cellranger_1.1.0 gtable_0.3.1 [69] assertthat_0.2.1 xfun_0.34 broom_1.0.1 googledrive_2.0.0 [73] gargle_1.2.1 warp_0.2.0 ellipsis_0.3.2 ```
petrbouchal commented 1 year ago

The title argument also has no effect if the agent has not been interrogated, regardless of size.