Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Fix vignette building if tibble is missing #681

Merged
merged 4 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/dep-suggests-matrix.json

This file was deleted.

1 change: 0 additions & 1 deletion .github/versions-matrix.json

This file was deleted.

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, width = NULL, ...,
n = NULL, max_extra_cols = NULL,
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
Loading