[R-pkg-team] Bug#1035723: r-cran-dtplyr: Autopkgtests fail
Heinrich Schuchardt
heinrich.schuchardt at canonical.com
Mon May 8 11:37:42 BST 2023
Package: r-cran-dtplyr
Severity: normal
Tags: patch
User: ubuntu-devel at lists.ubuntu.com
Usertags: origin-ubuntu mantic ubuntu-patch
X-Debbugs-Cc: heinrich.schuchardt at canonical.com
Dear Maintainer,
Autopkgtests fail due to a missing upstream patch.
In Ubuntu, the attached patch was applied to achieve the following:
* Fix autopkgtests (LP: #2018713)
d/p/0001-Use-snapshots-for-errors-that-dplyr-owns-now.patch
Thanks for considering the patch.
-- System Information:
Debian Release: bookworm/sid
APT prefers mantic
APT policy: (500, 'mantic')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 6.2.0-21-generic (SMP w/8 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
-------------- next part --------------
diff -Nru r-cran-dtplyr-1.2.2/debian/patches/0001-Use-snapshots-for-errors-that-dplyr-owns-now.patch r-cran-dtplyr-1.2.2/debian/patches/0001-Use-snapshots-for-errors-that-dplyr-owns-now.patch
--- r-cran-dtplyr-1.2.2/debian/patches/0001-Use-snapshots-for-errors-that-dplyr-owns-now.patch 1970-01-01 01:00:00.000000000 +0100
+++ r-cran-dtplyr-1.2.2/debian/patches/0001-Use-snapshots-for-errors-that-dplyr-owns-now.patch 2023-05-08 08:34:58.000000000 +0200
@@ -0,0 +1,99 @@
+From b4733a7d1e1b5406bf3dd4299e85654566c7a68b Mon Sep 17 00:00:00 2001
+From: DavisVaughan <davis at rstudio.com>
+Date: Wed, 14 Dec 2022 11:49:47 -0500
+Subject: [PATCH] Use snapshots for errors that dplyr owns now
+Origin: https://github.com/tidyverse/dtplyr/commit/b4733a7d1e1b5406bf3dd4299e85654566c7a68b
+---
+ tests/testthat/_snaps/step-subset-slice.md | 46 ++++++++++++++++++++++
+ tests/testthat/test-step-subset-slice.R | 21 ++++++----
+ 2 files changed, 59 insertions(+), 8 deletions(-)
+
+diff --git a/tests/testthat/_snaps/step-subset-slice.md b/tests/testthat/_snaps/step-subset-slice.md
+index 4c43050..128112a 100644
+--- a/tests/testthat/_snaps/step-subset-slice.md
++++ b/tests/testthat/_snaps/step-subset-slice.md
+@@ -1,3 +1,49 @@
++# slice_*() checks for empty ...
++
++ Code
++ slice_head(dt, 5)
++ Condition
++ Error in `slice_head()`:
++ ! `n` must be explicitly named.
++ i Did you mean `slice_head(n = 5)`?
++ Code
++ slice_tail(dt, 5)
++ Condition
++ Error in `slice_tail()`:
++ ! `n` must be explicitly named.
++ i Did you mean `slice_tail(n = 5)`?
++ Code
++ slice_min(dt, x, 5)
++ Condition
++ Error in `slice_min()`:
++ ! `n` must be explicitly named.
++ i Did you mean `slice_min(n = 5)`?
++ Code
++ slice_max(dt, x, 5)
++ Condition
++ Error in `slice_max()`:
++ ! `n` must be explicitly named.
++ i Did you mean `slice_max(n = 5)`?
++ Code
++ slice_sample(dt, 5)
++ Condition
++ Error in `slice_sample()`:
++ ! `n` must be explicitly named.
++ i Did you mean `slice_sample(n = 5)`?
++
++---
++
++ Code
++ slice_min(dt)
++ Condition
++ Error in `slice_min()`:
++ ! `order_by` is absent but must be supplied.
++ Code
++ slice_max(dt)
++ Condition
++ Error in `slice_max()`:
++ ! `order_by` is absent but must be supplied.
++
+ # check_slice_catches common errors
+
+ Code
+diff --git a/tests/testthat/test-step-subset-slice.R b/tests/testthat/test-step-subset-slice.R
+index 3141f19..b209b76 100644
+--- a/tests/testthat/test-step-subset-slice.R
++++ b/tests/testthat/test-step-subset-slice.R
+@@ -127,14 +127,19 @@ test_that("arguments to sample are passed along", {
+
+ test_that("slice_*() checks for empty ...", {
+ dt <- lazy_dt(data.frame(x = 1:10))
+- expect_error(slice_head(dt, 5), class = "rlib_error_dots_nonempty")
+- expect_error(slice_tail(dt, 5), class = "rlib_error_dots_nonempty")
+- expect_error(slice_min(dt, x, 5), class = "rlib_error_dots_nonempty")
+- expect_error(slice_max(dt, x, 5), class = "rlib_error_dots_nonempty")
+- expect_error(slice_sample(dt, 5), class = "rlib_error_dots_nonempty")
+-
+- expect_error(slice_min(dt), "missing")
+- expect_error(slice_max(dt), "missing")
++
++ expect_snapshot(error = TRUE, {
++ slice_head(dt, 5)
++ slice_tail(dt, 5)
++ slice_min(dt, x, 5)
++ slice_max(dt, x, 5)
++ slice_sample(dt, 5)
++ })
++
++ expect_snapshot(error = TRUE, {
++ slice_min(dt)
++ slice_max(dt)
++ })
+ })
+
+ test_that("slice_*() checks for constant n= and prop=", {
+--
+2.39.2
+
diff -Nru r-cran-dtplyr-1.2.2/debian/patches/series r-cran-dtplyr-1.2.2/debian/patches/series
--- r-cran-dtplyr-1.2.2/debian/patches/series 1970-01-01 01:00:00.000000000 +0100
+++ r-cran-dtplyr-1.2.2/debian/patches/series 2023-05-08 08:34:58.000000000 +0200
@@ -0,0 +1 @@
+0001-Use-snapshots-for-errors-that-dplyr-owns-now.patch
More information about the R-pkg-team
mailing list