Skip to content

Commit

Permalink
chore: Fix vignette building if tibble is missing (#681)
Browse files Browse the repository at this point in the history
* chore: Fix vignette building if tibble is missing

* chore: Auto-update from GitHub Actions

Run: https://github.com/r-lib/pillar/actions/runs/11968173372

* Skip

* Examples
  • Loading branch information
krlmlr authored Nov 22, 2024
1 parent c3b3076 commit f5d86ec
Show file tree
Hide file tree
Showing 19 changed files with 22 additions and 15 deletions.
2 changes: 1 addition & 1 deletion R/ctl_new_pillar.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#' packed data frames, matrices, or arrays.
#'
#' @export
#' @examplesIf rlang::is_installed("palmerpenguins") && requireNamespace("tibble")
#' @examplesIf rlang::is_installed(c("palmerpenguins", "tibble"))
#' # Create pillar objects
#' ctl_new_pillar(
#' palmerpenguins::penguins,
Expand Down
2 changes: 1 addition & 1 deletion R/ctl_new_pillar_list.R
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
#' for a compound pillar (or the pillar itself for a simple pillar)
#' has been constructed already.
#' @export
#' @examplesIf rlang::is_installed("palmerpenguins") && requireNamespace("tibble")
#' @examplesIf rlang::is_installed(c("palmerpenguins", "tibble")) && requireNamespace("tibble")
#' # Simple column
#' ctl_new_pillar_list(
#' tibble::tibble(),
Expand Down
2 changes: 1 addition & 1 deletion R/options.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#' @usage NULL
#' @format NULL
#'
#' @examples
#' @examplesIf rlang::is_installed("tibble")
#' df <- tibble::tibble(x = c(1.234567, NA, 5:10))
#' df
#'
Expand Down
2 changes: 1 addition & 1 deletion R/pillar-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#' - [print.tbl()] for formatting data-frame-like objects,
#' - [pillar_options] for a list of package options.
#'
#' @examples
#' @examplesIf rlang::is_installed("tibble")
#' pillar(1:3)
#' pillar(c(1, 2, 3))
#' pillar(factor(letters[1:3]), title = "letters")
Expand Down
2 changes: 1 addition & 1 deletion R/tbl-format-body.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#' A character vector.
#'
#' @export
#' @examplesIf rlang::is_installed("palmerpenguins")
#' @examplesIf rlang::is_installed(c("palmerpenguins", "tibble"))
#' setup <- tbl_format_setup(palmerpenguins::penguins)
#' tbl_format_body(palmerpenguins::penguins, setup)
#'
Expand Down
2 changes: 1 addition & 1 deletion R/tbl-format-footer.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#' @inherit tbl_format_body return
#'
#' @export
#' @examplesIf rlang::is_installed("palmerpenguins")
#' @examplesIf rlang::is_installed(c("palmerpenguins", "tibble"))
#' setup <- tbl_format_setup(palmerpenguins::penguins)
#' tbl_format_footer(palmerpenguins::penguins, setup)
#'
Expand Down
2 changes: 1 addition & 1 deletion R/tbl-format-header.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#' @inherit tbl_format_body return
#'
#' @export
#' @examplesIf rlang::is_installed("palmerpenguins")
#' @examplesIf rlang::is_installed(c("palmerpenguins", "tibble"))
#' setup <- tbl_format_setup(palmerpenguins::penguins)
#' tbl_format_header(palmerpenguins::penguins, setup)
#'
Expand Down
2 changes: 1 addition & 1 deletion R/tbl-format-setup.R
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
#' An object that can be passed as `setup` argument to
#' [tbl_format_header()], [tbl_format_body()], and [tbl_format_footer()].
#' @export
#' @examplesIf rlang::is_installed("palmerpenguins")
#' @examplesIf rlang::is_installed(c("palmerpenguins", "tibble"))
#' tbl_format_setup(palmerpenguins::penguins)
tbl_format_setup <- function(
x,
Expand Down
2 changes: 1 addition & 1 deletion man/ctl_new_pillar.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/ctl_new_pillar_list.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions man/pillar-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion man/pillar_options.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/tbl_format_body.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/tbl_format_footer.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/tbl_format_header.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/tbl_format_setup.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions tests/testthat/test-glimpse.R
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ test_that("glimpse calls tbl_sum() (#550)", {
})

test_that("output test for glimpse()", {
skip_if_not_installed("tibble")
local_unknown_rows()

expect_snapshot({
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-num.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
test_that("output test", {
skip_if_not_installed("tibble")

expect_snapshot({
tibble::tibble(
x0 = num(9:11 * 100 + 0.5, sigfig = 3),
Expand Down
1 change: 1 addition & 0 deletions vignettes/printing.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ vignette: >
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
eval = rlang::is_installed("tibble"),
comment = "#>"
)
Expand Down

0 comments on commit f5d86ec

Please sign in to comment.