Skip to content

Commit

Permalink
chore: Put some examples in \donttest{}
Browse files Browse the repository at this point in the history
* CRAN release was rejected because on one of the pre-check machines
  a couple of examples took more than 10 seconds
* We wrap those examples in a \donttest{}
  • Loading branch information
trevorld committed Aug 16, 2022
1 parent f06af51 commit 4675e10
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: gridpattern
Type: Package
Title: 'grid' Pattern Grobs
Version: 1.0.0
Version: 1.0.1
Authors@R: c(person("Mike", "FC", role = "aut", comment = "Code/docs adapted from ggpattern"),
person("Trevor L", "Davis", role=c("aut", "cre"), email="[email protected]",
comment = c(ORCID = "0000-0001-6341-4639")),
Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
gridpattern v1.0.0
gridpattern v1.0.1
==================

Bug fixes and minor improvements
Expand Down
2 changes: 2 additions & 0 deletions R/alphaMaskGrob.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#' @return A `grid` grob
#' @inheritParams grid::polygonGrob
#' @examples
#' \donttest{ # Once took more >10s on a CRAN autocheck
#' if (capabilities("png") && require("grid")) {
#' maskee <- patternGrob("circle", gp = gpar(col = "black", fill = "yellow"),
#' spacing = 0.1, density = 0.5)
Expand All @@ -44,6 +45,7 @@
#' grid.newpage()
#' grid.draw(masked_transparent)
#' }
#' }
#' @export
alphaMaskGrob <- function(maskee, masker,
use_R4.1_masks = getOption("ggpattern_use_R4.1_masks",
Expand Down
2 changes: 2 additions & 0 deletions R/grid-pattern.R
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
#' If `draw` is `TRUE` then `grid.pattern()` also draws to the graphic device as a side effect.
#' @examples
#' print(names_pattern)
#' \donttest{ # Once took more >10s on a CRAN autocheck
#' if (require("grid")) {
#' x_hex <- 0.5 + 0.5 * cos(seq(2 * pi / 4, by = 2 * pi / 6, length.out = 6))
#' y_hex <- 0.5 + 0.5 * sin(seq(2 * pi / 4, by = 2 * pi / 6, length.out = 6))
Expand Down Expand Up @@ -107,6 +108,7 @@
#' grid.pattern("plasma", x_hex, y_hex, fill="green")
#' }
#' }
#' }
#' @seealso \url{https://coolbutuseless.github.io/package/ggpattern/index.html}
#' for more details on the `ggpattern` package.
#' @export
Expand Down
5 changes: 5 additions & 0 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
* As requested by CRAN we rebuilt the package
documentation with a never version of `{roxygen}`
* A couple of examples that took more than 10s on the
Windows CRAN pre-check are now wrapped by a "\donttest{}".

## Test environments

* win-builder (windows, R devel)
Expand Down
2 changes: 2 additions & 0 deletions man/alphaMaskGrob.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/grid.pattern.Rd

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

0 comments on commit 4675e10

Please sign in to comment.