From be942e075c420c0aa036daef4552de178aade404 Mon Sep 17 00:00:00 2001 From: Nic Crane Date: Fri, 28 Jul 2023 09:34:29 +0100 Subject: [PATCH 1/7] GH-36883: [R] Remove version number which triggers CRAN warning (#36884) ### What changes are included in this PR? Updates package version number to be character not numeric ### Are these changes tested? No, is configure scripts ### Are there any user-facing changes? No * Closes: #36883 Authored-by: Nic Crane Signed-off-by: Nic Crane --- r/tools/nixlibs.R | 2 +- r/tools/winlibs.R | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/r/tools/nixlibs.R b/r/tools/nixlibs.R index 8b353fd09bb..90ea868ea34 100644 --- a/r/tools/nixlibs.R +++ b/r/tools/nixlibs.R @@ -30,7 +30,7 @@ if (test_mode && is.na(VERSION)) { dev_version <- package_version(VERSION)[1, 4] # Small dev versions are added for R-only changes during CRAN submission. -if (is.na(dev_version) || dev_version < 100) { +if (is.na(dev_version) || dev_version < "100") { VERSION <- package_version(VERSION)[1, 1:3] arrow_repo <- paste0(getOption("arrow.repo", sprintf("https://apache.jfrog.io/artifactory/arrow/r/%s", VERSION)), "/libarrow/") } else { diff --git a/r/tools/winlibs.R b/r/tools/winlibs.R index d941da4baa6..b554770e40c 100644 --- a/r/tools/winlibs.R +++ b/r/tools/winlibs.R @@ -53,7 +53,7 @@ if (!file.exists(sprintf("windows/arrow-%s/include/arrow/api.h", VERSION))) { dev_version <- package_version(VERSION)[1, 4] # Small dev versions are added for R-only changes during CRAN submission. - if (is.na(dev_version) || dev_version < 100) { + if (is.na(dev_version) || dev_version < "100") { VERSION <- package_version(VERSION)[1, 1:3] get_file(rwinlib, VERSION) From cdd0377143a1393d30420b07e5cbba11c4949bfa Mon Sep 17 00:00:00 2001 From: Nic Crane Date: Wed, 23 Aug 2023 13:24:19 +0100 Subject: [PATCH 2/7] Remove badges from README --- r/README.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/r/README.md b/r/README.md index d343d6979c0..ee4036d48f3 100644 --- a/r/README.md +++ b/r/README.md @@ -1,9 +1,5 @@ # arrow -[![cran](https://www.r-pkg.org/badges/version-last-release/arrow)](https://cran.r-project.org/package=arrow) -[![CI](https://github.com/apache/arrow/workflows/R/badge.svg?event=push)](https://github.com/apache/arrow/actions?query=workflow%3AR+branch%3Amain+event%3Apush) -[![conda-forge](https://img.shields.io/conda/vn/conda-forge/r-arrow.svg)](https://anaconda.org/conda-forge/r-arrow) - [Apache Arrow](https://arrow.apache.org/) is a cross-language development platform for in-memory and larger-than-memory data. It specifies a standardized language-independent columnar memory format for flat and hierarchical From fbe86da2b095a0e381b5921b2bf85285f785b8b7 Mon Sep 17 00:00:00 2001 From: Nic Crane Date: Wed, 9 Aug 2023 10:52:58 +0100 Subject: [PATCH 3/7] Run make doc --- r/R/dplyr-funcs-doc.R | 2 +- r/data-raw/docgen.R | 2 +- r/man/acero.Rd | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/r/R/dplyr-funcs-doc.R b/r/R/dplyr-funcs-doc.R index 5099e903da6..3fc552d96b0 100644 --- a/r/R/dplyr-funcs-doc.R +++ b/r/R/dplyr-funcs-doc.R @@ -83,7 +83,7 @@ #' Functions can be called either as `pkg::fun()` or just `fun()`, i.e. both #' `str_sub()` and `stringr::str_sub()` work. #' -#' In addition to these functions, you can call any of Arrow's 254 compute +#' In addition to these functions, you can call any of Arrow's 260 compute #' functions directly. Arrow has many functions that don't map to an existing R #' function. In other cases where there is an R function mapping, you can still #' call the Arrow function directly if you don't want the adaptations that the R diff --git a/r/data-raw/docgen.R b/r/data-raw/docgen.R index 3bfb222fa97..5f7f21b9029 100644 --- a/r/data-raw/docgen.R +++ b/r/data-raw/docgen.R @@ -54,7 +54,7 @@ file_template <- "# Licensed to the Apache Software Foundation (ASF) under one #' to a `dbplyr::tbl_lazy`. This means that the verbs do not eagerly evaluate #' the query on the data. To run the query, call either `compute()`, #' which returns an `arrow` [Table], or `collect()`, which pulls the resulting -#' Table into an R `data.frame`. +#' Table into an R `tibble`. #' %s #' diff --git a/r/man/acero.Rd b/r/man/acero.Rd index c9fb4d37a1d..e3246f86a0e 100644 --- a/r/man/acero.Rd +++ b/r/man/acero.Rd @@ -71,7 +71,7 @@ can assume that the function works in Acero just as it does in R. Functions can be called either as \code{pkg::fun()} or just \code{fun()}, i.e. both \code{str_sub()} and \code{stringr::str_sub()} work. -In addition to these functions, you can call any of Arrow's 254 compute +In addition to these functions, you can call any of Arrow's 260 compute functions directly. Arrow has many functions that don't map to an existing R function. In other cases where there is an R function mapping, you can still call the Arrow function directly if you don't want the adaptations that the R From 8503747845486694052a57595aa9a9e10b082bcc Mon Sep 17 00:00:00 2001 From: Nic Crane Date: Wed, 23 Aug 2023 14:53:39 +0100 Subject: [PATCH 4/7] Update CRAN comments --- r/cran-comments.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/r/cran-comments.md b/r/cran-comments.md index 8fb63b84d40..03a42eae88f 100644 --- a/r/cran-comments.md +++ b/r/cran-comments.md @@ -1,4 +1,5 @@ ## Test environments + * Debian Linux, GCC, R-devel/R-patched/R-release * Fedora Linux, GCC/clang, R-devel * Ubuntu Linux 16.04 LTS, R-release, GCC @@ -8,3 +9,9 @@ ## R CMD check results There were no ERRORs or WARNINGs. On some platforms, there is a NOTE about the installed package size. + +## Reverse dependency test failures + +Reverse dependency checks failed for dataversionr - we have both opened an [issue on the repo](https://github.com/riazarbi/dataversionr/issues/1) and emailed the maintainer, but no response. + +Reverse dependency checks failed for pins - we notified them and they updated their tests. From cbb7772371582fe718d066031468019f757c877e Mon Sep 17 00:00:00 2001 From: Nic Crane Date: Fri, 25 Aug 2023 15:44:25 +0100 Subject: [PATCH 5/7] GH-37386: [R] CRAN failures due to "invalid non-character version specification" (#37387) ### Rationale for this change Package version comparison results in CRAN checks failing due to values being numeric not character ### What changes are included in this PR? Changing numeric values to characters ### Are these changes tested? No ### Are there any user-facing changes? No * Closes: #37386 Authored-by: Nic Crane Signed-off-by: Nic Crane --- r/tests/testthat/test-data-type.R | 2 +- r/tests/testthat/test-schema.R | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/r/tests/testthat/test-data-type.R b/r/tests/testthat/test-data-type.R index 0f193f19d37..e7212eb61b5 100644 --- a/r/tests/testthat/test-data-type.R +++ b/r/tests/testthat/test-data-type.R @@ -609,7 +609,7 @@ test_that("DataType$code()", { expect_code_roundtrip(dictionary(index_type = int8(), value_type = large_utf8())) expect_code_roundtrip(dictionary(index_type = int8(), ordered = TRUE)) - skip_if(packageVersion("rlang") < 1) + skip_if(packageVersion("rlang") < "1") # Are these unsupported for a reason? expect_error( eval(DayTimeInterval__initialize()$code()), diff --git a/r/tests/testthat/test-schema.R b/r/tests/testthat/test-schema.R index 77259fb5077..db91cee3309 100644 --- a/r/tests/testthat/test-schema.R +++ b/r/tests/testthat/test-schema.R @@ -43,7 +43,7 @@ test_that("Schema$code()", { schema(a = int32(), b = struct(c = double(), d = utf8()), e = list_of(binary())) ) - skip_if(packageVersion("rlang") < 1) + skip_if(packageVersion("rlang") < "1") expect_error( eval(schema(x = int32(), y = DayTimeInterval__initialize())$code()), "Unsupported type" From 928ba4c11b0d60eed65e5b0676e62dd5d6c9a0b4 Mon Sep 17 00:00:00 2001 From: Nic Crane Date: Wed, 30 Aug 2023 10:11:15 +0100 Subject: [PATCH 6/7] Update header for register_binding_add --- r/R/dplyr-funcs.R | 2 ++ 1 file changed, 2 insertions(+) diff --git a/r/R/dplyr-funcs.R b/r/R/dplyr-funcs.R index 2728a645396..956e31fe2bf 100644 --- a/r/R/dplyr-funcs.R +++ b/r/R/dplyr-funcs.R @@ -123,6 +123,8 @@ unregister_binding <- function(fun_name, registry = nse_funcs, invisible(previous_fun) } +#' @rdname register_binding +#' @keywords internal register_binding_agg <- function(fun_name, agg_fun, registry = agg_funcs, From 5a4c86ec98c5afa1c6e43c1b0dff11a9853db801 Mon Sep 17 00:00:00 2001 From: Nic Crane Date: Wed, 30 Aug 2023 13:37:35 +0100 Subject: [PATCH 7/7] Skip binding tests on CRAN --- r/tests/testthat/test-dplyr-funcs-conditional.R | 1 + r/tests/testthat/test-dplyr-funcs-datetime.R | 1 + r/tests/testthat/test-dplyr-funcs-math.R | 1 + r/tests/testthat/test-dplyr-funcs-string.R | 1 + r/tests/testthat/test-dplyr-funcs-type.R | 1 + r/tests/testthat/test-dplyr-funcs.R | 1 + 6 files changed, 6 insertions(+) diff --git a/r/tests/testthat/test-dplyr-funcs-conditional.R b/r/tests/testthat/test-dplyr-funcs-conditional.R index e60712e9e61..48ebf037848 100644 --- a/r/tests/testthat/test-dplyr-funcs-conditional.R +++ b/r/tests/testthat/test-dplyr-funcs-conditional.R @@ -19,6 +19,7 @@ library(dplyr, warn.conflicts = FALSE) suppressPackageStartupMessages(library(bit64)) skip_if_not_available("acero") +skip_on_cran() tbl <- example_data tbl$verses <- verses[[1]] diff --git a/r/tests/testthat/test-dplyr-funcs-datetime.R b/r/tests/testthat/test-dplyr-funcs-datetime.R index d59356ad659..3e9f2024f95 100644 --- a/r/tests/testthat/test-dplyr-funcs-datetime.R +++ b/r/tests/testthat/test-dplyr-funcs-datetime.R @@ -22,6 +22,7 @@ library(lubridate, warn.conflicts = FALSE) library(dplyr, warn.conflicts = FALSE) skip_if_not_available("acero") +skip_on_cran() # base::strptime() defaults to local timezone # but arrow's strptime defaults to UTC. diff --git a/r/tests/testthat/test-dplyr-funcs-math.R b/r/tests/testthat/test-dplyr-funcs-math.R index 733a7c6ea06..881e9aed94c 100644 --- a/r/tests/testthat/test-dplyr-funcs-math.R +++ b/r/tests/testthat/test-dplyr-funcs-math.R @@ -18,6 +18,7 @@ library(dplyr, warn.conflicts = FALSE) skip_if_not_available("acero") +skip_on_cran() test_that("abs()", { df <- tibble(x = c(-127, -10, -1, -0, 0, 1, 10, 127, NA)) diff --git a/r/tests/testthat/test-dplyr-funcs-string.R b/r/tests/testthat/test-dplyr-funcs-string.R index 0dc834dbfea..fd03f74ea59 100644 --- a/r/tests/testthat/test-dplyr-funcs-string.R +++ b/r/tests/testthat/test-dplyr-funcs-string.R @@ -17,6 +17,7 @@ skip_if_not_available("utf8proc") skip_if_not_available("acero") +skip_on_cran() library(dplyr, warn.conflicts = FALSE) library(lubridate) diff --git a/r/tests/testthat/test-dplyr-funcs-type.R b/r/tests/testthat/test-dplyr-funcs-type.R index 435fa5fcb87..c1a0c8c1808 100644 --- a/r/tests/testthat/test-dplyr-funcs-type.R +++ b/r/tests/testthat/test-dplyr-funcs-type.R @@ -20,6 +20,7 @@ suppressPackageStartupMessages(library(bit64)) suppressPackageStartupMessages(library(lubridate)) skip_if_not_available("acero") +skip_on_cran() tbl <- example_data diff --git a/r/tests/testthat/test-dplyr-funcs.R b/r/tests/testthat/test-dplyr-funcs.R index 48b74c9af43..1305191fd58 100644 --- a/r/tests/testthat/test-dplyr-funcs.R +++ b/r/tests/testthat/test-dplyr-funcs.R @@ -14,6 +14,7 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. +skip_on_cran() test_that("register_binding()/unregister_binding() works", { fake_registry <- new.env(parent = emptyenv())