Skip to content

Commit

Permalink
Merge pull request #1731 from olivroy/r3.5
Browse files Browse the repository at this point in the history
Depend on R 3.6 + other package cleanup
  • Loading branch information
rich-iannone authored Jun 26, 2024
2 parents 8592bd4 + 75e3e9f commit c545dfe
Show file tree
Hide file tree
Showing 45 changed files with 301 additions and 623 deletions.
85 changes: 84 additions & 1 deletion .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,82 +16,165 @@ vignettes
man/figures/
tests/gt-examples
tests/performance-monitoring
tests/testthat/_snaps
tests/testthat/test-as_raw_html.R

tests/testthat/test-as_word.R
tests/testthat/_snaps/as_word.md

tests/testthat/test-color_handling.R

tests/testthat/test-cols_align_decimal.R
tests/testthat/_snaps/cols_align_decimal.md

tests/testthat/test-cols_label.R
tests/testthat/test-cols_label_with.R

tests/testthat/test-cols_merge.R
tests/testthat/_snaps/cols_merge.md

tests/testthat/test-cols_width_rtf.R
tests/testthat/_snaps/cols_width_rtf.md

tests/testthat/test-cols_width.R
tests/testthat/_snaps/cols_width.md

tests/testthat/test-data_color.R
tests/testthat/_snaps/data_color.md

tests/testthat/test-empty_tbl.R
tests/testthat/test-escaping.R
tests/testthat/test-extract_body.R
tests/testthat/test-extract_cells.R

tests/testthat/test-fmt_auto.R
tests/testthat/_snaps/fmt_auto.md

tests/testthat/test-fmt_bins.R
tests/testthat/test-fmt_bytes.R

tests/testthat/test-fmt_currency.R
tests/testthat/_snaps/fmt_currency.md

tests/testthat/test-fmt_date_time.R

tests/testthat/test-fmt_duration.R
tests/testthat/_snaps/fmt_duration.md

tests/testthat/test-fmt_email.R
tests/testthat/test-fmt_engineering.R
tests/testthat/test-fmt_flag.R

tests/testthat/test-fmt_fraction.R
tests/testthat/_snaps/fmt_fraction.md

tests/testthat/test-fmt_image.R
tests/testthat/test-fmt_index.R

tests/testthat/test-fmt_integer.R
tests/testthat/_snaps/fmt_integer.md

tests/testthat/test-fmt_markdown.R
tests/testthat/_snaps/fmt_markdown.md

tests/testthat/test-fmt_number.R
tests/testthat/_snaps/fmt_number.md

tests/testthat/test-fmt_partsper.R
tests/testthat/test-fmt_passthrough.R
tests/testthat/test-fmt_percent.R
tests/testthat/test-fmt_roman.R
tests/testthat/test-fmt_scientific.R
tests/testthat/test-fmt_spelled_num.R
tests/testthat/test-fmt_url.R

tests/testthat/test-footer.R
tests/testthat/_snaps/footer.md

tests/testthat/test-group_column_label.R
tests/testthat/_snaps/group_column_label.md

tests/testthat/test-gt_group.R
tests/testthat/test-gt_object.R
tests/testthat/test-gt_split.R

tests/testthat/test-gtsave.R
tests/testthat/_snaps/gtsave.md

tests/testthat/test-h_md_html.R
tests/testthat/test-helper_functions.R
tests/testthat/test-i_html.R

tests/testthat/test-image.R
tests/testthat/_snaps/image.md

tests/testthat/test-info_tables.R
tests/testthat/test-input_data_validation.R

tests/testthat/test-l_table_parts.R
tests/testthat/_snaps/l_table_parts.md

tests/testthat/test-location_cells.R
tests/testthat/test-opt_functions.R

tests/testthat/test-removal_functions.R
tests/testthat/_snaps/removal_functions.md

tests/testthat/test-rows_add.R
tests/testthat/_snaps/rows_add.md

tests/testthat/test-rtf_column_widths.R

tests/testthat/test-rtf_page_options.R
tests/testthat/_snaps/rtf_page_options.md

tests/testthat/test-stub.R
tests/testthat/test-substitution.R

tests/testthat/test-summary_rows_latex.R
tests/testthat/_snaps/summary_rows_latex.md

tests/testthat/test-summary_rows_rtf.R
tests/testthat/_snaps/summary_rows_rtf.md

tests/testthat/test-summary_rows.R
tests/testthat/_snaps/summary_rows.md

tests/testthat/test-tab_footnote.R
tests/testthat/_snaps/tab_footnote.md

tests/testthat/test-tab_info.R

tests/testthat/test-tab_options.R
tests/testthat/_snaps/tab_options.md

tests/testthat/test-tab_remove.R
tests/testthat/_snaps/tab_remove.md

tests/testthat/test-tab_spanner_delim.R
tests/testthat/_snaps/tab_spanner_delim.md

tests/testthat/test-tab_spanner.R
tests/testthat/_snaps/tab_spanner.md

tests/testthat/test-tab_stub_indent.R
tests/testthat/_snaps/tab_stub_indent.md

tests/testthat/test-tab_style.R
tests/testthat/_snaps/tab_style.md

tests/testthat/test-tab_style_body.R
tests/testthat/_snaps/tab_style_body.md

tests/testthat/test-table_parts.R
tests/testthat/_snaps/table_parts.md

tests/testthat/test-text_transform.R
tests/testthat/test-util_functions.R
tests/testthat/test-utils_formatters.R
tests/testthat/test-utils_plots.R
tests/testthat/test-utils_render_html.R
tests/testthat/test-utils_units.R
tests/testthat/test-utils.R

tests/testthat/test-vec_fmt.R
tests/testthat/_snaps/vec_fmt.md
79 changes: 1 addition & 78 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ License: MIT + file LICENSE
URL: https://gt.rstudio.com, https://github.com/rstudio/gt
BugReports: https://github.com/rstudio/gt/issues
Depends:
R (>= 3.2.0)
R (>= 3.6.0)
Imports:
base64enc (>= 0.1-3),
bigD (>= 0.2),
Expand Down Expand Up @@ -80,80 +80,3 @@ Encoding: UTF-8
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.1
Collate:
'as_data_frame.R'
'build_data.R'
'compile_scss.R'
'data_color.R'
'datasets.R'
'dt__.R'
'dt_body.R'
'dt_boxhead.R'
'dt_cols_merge.R'
'dt_data.R'
'dt_footnotes.R'
'dt_formats.R'
'dt_groups_rows.R'
'dt_has_built.R'
'dt_heading.R'
'dt_locale.R'
'dt_options.R'
'dt_row_groups.R'
'dt_source_notes.R'
'dt_spanners.R'
'dt_stub_df.R'
'dt_stubhead.R'
'dt_styles.R'
'dt_substitutions.R'
'dt_summary.R'
'dt_transforms.R'
'export.R'
'format_data.R'
'format_vec.R'
'gt-package.R'
'gt.R'
'gt_group.R'
'gt_preview.R'
'gt_split.R'
'helpers.R'
'image.R'
'import-standalone-obj-type.R'
'import-standalone-types-check.R'
'info_tables.R'
'knitr-utils.R'
'location_methods.R'
'modify_columns.R'
'modify_rows.R'
'tab_create_modify.R'
'opts.R'
'print.R'
'reexports.R'
'render_as_html.R'
'render_as_i_html.R'
'resolver.R'
'rows_add.R'
'shiny.R'
'substitution.R'
'summary_rows.R'
'tab_info.R'
'tab_remove.R'
'tab_style_body.R'
'text_transform.R'
'topics.R'
'utils.R'
'utils_color_contrast.R'
'utils_environments.R'
'utils_examples.R'
'utils_formatters.R'
'utils_general_str_formatting.R'
'utils_pipe.R'
'utils_plots.R'
'utils_render_common.R'
'utils_render_grid.R'
'utils_render_html.R'
'utils_render_latex.R'
'utils_render_rtf.R'
'utils_render_xml.R'
'utils_units.R'
'z_utils_render_footnotes.R'
'zzz.R'
5 changes: 4 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@
S3method(add_text_style,character)
S3method(add_text_style,shiny.tag)
S3method(as.data.frame,gt_tbl)
S3method(as.tags,gt_tbl)
S3method(cell_style_to_html,cell_border)
S3method(cell_style_to_html,cell_fill)
S3method(cell_style_to_html,cell_text)
S3method(cell_style_to_html,default)
S3method(knitr::knit_print,gt_group)
S3method(knitr::knit_print,gt_tbl)
S3method(plot,gt_gtable)
S3method(print,gt_group)
S3method(print,gt_tbl)
Expand Down Expand Up @@ -241,9 +244,9 @@ export(vec_fmt_time)
export(web_image)
import(rlang)
importFrom(dplyr,vars)
importFrom(htmltools,as.tags)
importFrom(htmltools,css)
importFrom(magrittr,"%>%")
importFrom(rlang,`%||%`)
importFrom(tidyselect,contains)
importFrom(tidyselect,ends_with)
importFrom(tidyselect,everything)
Expand Down
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# gt (development version)

* gt now depends on R 3.6 (@olivroy, #1731).

* `opt_interactive()` gains `height` to help specify your widget's height (@olivroy, #1544).

* `opt_interactive()` now shows row names if `rownames_to_stub = TRUE` (@olivroy, #1702).
Expand Down
2 changes: 0 additions & 2 deletions R/build_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@


# Build common table components from a `gt_tbl` object
#' @import rlang
#' @noRd
build_data <- function(data, context) {

# Perform input object validation
Expand Down
1 change: 0 additions & 1 deletion R/data_color.R
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,6 @@
#' @section Function Introduced:
#' `v0.2.0.5` (March 31, 2020)
#'
#' @import rlang
#' @export
data_color <- function(
data,
Expand Down
7 changes: 3 additions & 4 deletions R/export.R
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ gt_save_html <- function(

} else {

html <- htmltools::as.tags(data)
html <- as.tags(data)
}

return(htmltools::save_html(html, filename, ...))
Expand Down Expand Up @@ -289,7 +289,7 @@ gt_save_webshot <- function(
tempfile_ <- tempfile(fileext = ".html")

# Reverse slashes on Windows filesystems
tempfile_ <- tidy_gsub(tempfile_, "\\\\", "/")
tempfile_ <- normalizePath(tempfile_, "/", mustWork = FALSE)

# Save gt table as HTML using the `gt_save_html()` function
gt_save_html(
Expand Down Expand Up @@ -578,7 +578,7 @@ as_raw_html <- function(
# Perform input object validation
stop_if_not_gt_tbl(data = data)

html_table <- as.character(as.tags.gt_tbl(data))
html_table <- as.character(as.tags(data))

if (inline_css) {

Expand Down Expand Up @@ -1723,7 +1723,6 @@ extract_body <- function(
#'
#' @section Function Introduced:
#' `v0.2.0.5` (March 31, 2020)
#'
#' @export
extract_summary <- function(data) {

Expand Down
Loading

0 comments on commit c545dfe

Please sign in to comment.