From 36cbcc2c443b8b202faee0fe199f48193872621a Mon Sep 17 00:00:00 2001 From: Julia Silge Date: Fri, 8 Sep 2023 15:26:17 -0600 Subject: [PATCH 1/5] Skip tests/examples that hit GH on CRAN --- R/board_url.R | 2 +- man/board_url.Rd | 3 ++- tests/testthat/test-board_url.R | 1 + tests/testthat/test-pin.R | 1 + 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/R/board_url.R b/R/board_url.R index 295c9a86..b4b1507c 100644 --- a/R/board_url.R +++ b/R/board_url.R @@ -65,7 +65,7 @@ #' ``` #' #' @export -#' @examples +#' @examplesIf !pins:::is_cran_check() #' github_raw <- function(x) paste0("https://raw.githubusercontent.com/", x) #' #' ## with a named vector of URLs to specific pins: diff --git a/man/board_url.Rd b/man/board_url.Rd index 3e9e97cb..5e67494f 100644 --- a/man/board_url.Rd +++ b/man/board_url.Rd @@ -84,6 +84,7 @@ board \%>\% pin_list() } \examples{ +\dontshow{if (!pins:::is_cran_check()) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} github_raw <- function(x) paste0("https://raw.githubusercontent.com/", x) ## with a named vector of URLs to specific pins: @@ -103,7 +104,7 @@ b1 \%>\% pin_download("raw") b2 <- board_url(github_raw("rstudio/pins-r/main/tests/testthat/pin-board/")) b2 \%>\% pin_list() b2 \%>\% pin_versions("y") - +\dontshow{\}) # examplesIf} } \seealso{ Other boards: diff --git a/tests/testthat/test-board_url.R b/tests/testthat/test-board_url.R index 58a0bcbe..e9de02de 100644 --- a/tests/testthat/test-board_url.R +++ b/tests/testthat/test-board_url.R @@ -1,4 +1,5 @@ skip_if_not_installed("webfakes") +skip_on_cran() httpbin <- local_httpbin_app() httpbin_port <- httpbin$get_port() diff --git a/tests/testthat/test-pin.R b/tests/testthat/test-pin.R index bbb2ca06..9a063efb 100644 --- a/tests/testthat/test-pin.R +++ b/tests/testthat/test-pin.R @@ -1,5 +1,6 @@ skip_if_not_installed("filelock") skip_if_not_installed("webfakes") +skip_on_cran() httpbin <- local_httpbin_app() httpbin_port <- httpbin$get_port() From 7a01cb071beb21c18a315b3f82a6fc8f8a1c75e4 Mon Sep 17 00:00:00 2001 From: Julia Silge Date: Fri, 8 Sep 2023 15:26:35 -0600 Subject: [PATCH 2/5] New helper --- R/utils.R | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/R/utils.R b/R/utils.R index 15e8f3cc..56db3d1b 100644 --- a/R/utils.R +++ b/R/utils.R @@ -119,3 +119,16 @@ null_if_na <- function(x) { is_rcmd_check <- function() { Sys.getenv("_R_CHECK_PACKAGE_NAME_", "") != "" } + +# adapted from ps:::is_cran_check() +# nocov start + +is_cran_check <- function () { + if (identical(Sys.getenv("NOT_CRAN"), "true")) { + FALSE + } else { + Sys.getenv("_R_CHECK_PACKAGE_NAME_", "") != "" + } +} + +#nocov end From ad66911099bc3d34efa5fdc2bca4d26c7da6339f Mon Sep 17 00:00:00 2001 From: Julia Silge Date: Fri, 8 Sep 2023 15:27:25 -0600 Subject: [PATCH 3/5] Update revdeps, CRAN comments --- cran-comments.md | 3 ++- revdep/cran.md | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cran-comments.md b/cran-comments.md index 6ce431d8..e7c26804 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,6 +1,7 @@ ## revdepcheck results -We checked 3 reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package. +We checked 4 reverse dependencies (3 from CRAN + 1 from Bioconductor), comparing R CMD check results across CRAN and dev versions of this package. * We saw 0 new problems * We failed to check 0 packages + \ No newline at end of file diff --git a/revdep/cran.md b/revdep/cran.md index 29c19611..8c55f80e 100644 --- a/revdep/cran.md +++ b/revdep/cran.md @@ -1,6 +1,6 @@ ## revdepcheck results -We checked 3 reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package. +We checked 4 reverse dependencies (3 from CRAN + 1 from Bioconductor), comparing R CMD check results across CRAN and dev versions of this package. * We saw 0 new problems * We failed to check 0 packages From cf1f2d91c8078659ad378a837486f85459044462 Mon Sep 17 00:00:00 2001 From: Julia Silge Date: Fri, 8 Sep 2023 15:27:39 -0600 Subject: [PATCH 4/5] Render README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4d6ff76e..5dcecb56 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ board <- board_temp() board #> Pin board #> Path: -#> '/var/folders/07/0sps_qnd3qd7fdj3cq9j8pqw0000gn/T/RtmpfnLq46/pins-16f285b5dde39' +#> '/var/folders/hv/hzsmmyk9393_m7q3nscx1slc0000gn/T/Rtmp4Z1lsA/pins-8a413b4b4478' #> Cache size: 0 ``` @@ -73,7 +73,7 @@ arguments: the board to pin to, an object, and a name: ``` r board %>% pin_write(head(mtcars), "mtcars") #> Guessing `type = 'rds'` -#> Creating new version '20230816T005558Z-8df40' +#> Creating new version '20230908T204205Z-a800d' #> Writing to pin 'mtcars' ``` From 1c95a28b7923612e7c847c5a2853deb1e3bd532f Mon Sep 17 00:00:00 2001 From: Julia Silge Date: Fri, 8 Sep 2023 15:27:58 -0600 Subject: [PATCH 5/5] Increment version number to 1.2.2 --- DESCRIPTION | 2 +- NEWS.md | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index f2a41db5..a3e35933 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: pins Title: Pin, Discover and Share Resources -Version: 1.2.1.9000 +Version: 1.2.2 Authors@R: c( person("Julia", "Silge", , "julia.silge@posit.co", role = c("cre", "aut"), comment = c(ORCID = "0000-0002-3671-836X")), diff --git a/NEWS.md b/NEWS.md index 4f3d6b74..dd41e25f 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# pins (development version) +# pins 1.2.2 * Fixed how dots are checked in `pin_write()` to make user-facing messages more clear (#770). @@ -9,7 +9,6 @@ * Fixed how `board_gdrive()` handles dribble objects (#780, @gorkang and #782). - # pins 1.2.1 * New environment variable `PINS_CACHE_DIR` controls the location of the