[R-pkg-team] Bug#1000339: r-cran-raster breaks r-cran-satellite autopkgtest: unable to find an inherited method for function 'extend'
Nilesh Patra
nilesh at riseup.net
Sat Dec 11 09:03:40 GMT 2021
On 12/11/21 12:14 PM, Nilesh Patra wrote:
> control: notfixed -1 r-cran-raster/3.5-9-1
>
> Hi Robert,
>
> On 12/11/21 12:10 AM, Nilesh Patra wrote:
>> On 12/10/21 11:43 PM, Robert J. Hijmans wrote:
>>> The new release of raster should first update terra if indeed it finds an older version. So let's hope I am right.
>>
>> I just uploaded the new version (3.5-9) and it seems to fix the problem locally. We will see if it works on the debci
>> infrastructure as well. I will report whatever it says. Thanks a lot for the help.
>
> Tests are still failing, see here[1]. It is not a problem of terra version, as it seems, it is installed in the
> way pretty much every other package is. I face the same stuff locally as well now.
> Would you have some other fix in mind?
When I try running tests as root, the error vanishes. I have no idea what's up :(
========== ROOT =============================
# bash ./debian/tests/run-unit-test
BEGIN TEST testthat.R
R version 4.1.2 (2021-11-01) -- "Bird Hippie"
Copyright (C) 2021 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(testthat)
> library(satellite)
Loading required package: raster
Loading required package: sp
>
>
> ### functions to create test data sets -----
>
> ### Utility functions to quickly create test data sets for various sensors
> ### Florian Detsch, last modified on 2017-07-24
>
> tst_obj <- function(type = c("LC08", "LC8", "LE07", "LE7", "LT05")) {
+ if (type[1] == "LC08")
+ tst_obj_lc08()
+ else if (type[1] == "LC8")
+ tst_obj_lc8()
+ else if (type[1] == "LE07")
+ tst_obj_le07()
+ else if (type[1] == "LE7")
+ tst_obj_le7()
+ else if (type[1] == "LT05")
+ tst_obj_lt05()
+ else
+ stop("Sensor test data not available, yet.\n")
+ }
>
>
> ### collection 1 level-1 -----
>
> ## landsat 8
> tst_obj_lc08 <- function() {
+ path <- system.file("extdata", package = "satellite")
+ files <- list.files(path, pattern = glob2rx("LC08*.TIF"), full.names = TRUE)
+ satellite(files)
+ }
>
> ## landsat 7
> tst_obj_le07 <- function() {
+ path <- system.file("extdata", package = "satellite")
+ files <- list.files(path, pattern = glob2rx("LE07*.TIF"), full.names = TRUE)
+ satellite(files)
+ }
>
> ## landsat 5
> tst_obj_lt05 <- function() {
+ path <- system.file("testdata/LT05", package = "satellite")
+ files <- list.files(path, pattern = glob2rx("LT05*.TIF"), full.names = TRUE)
+ satellite(files)
+ }
>
>
> ### precollection level-1 -----
>
> ## landsat 8
> tst_obj_lc8 <- function() {
+ path <- system.file("testdata/LC8", package = "satellite")
+ files <- list.files(path, pattern = glob2rx("LC8*.TIF"), full.names = TRUE)
+ satellite(files)
+ }
>
> ## landsat 7
> tst_obj_le7 <- function() {
+ path <- system.file("testdata/LE7", package = "satellite")
+ files <- list.files(path, pattern = glob2rx("LE7*.TIF"), full.names = TRUE)
+ satellite(files)
+ }
>
>
> ### perform tests -----
>
> test_check("satellite")
== Skipped tests ============================================================================================================================================================================================================================
* empty test (12)
[ FAIL 0 | WARN 0 | SKIP 12 | PASS 145 ]
>
======== NORMAL USER =====================
$ bash ./debian/tests/run-unit-test
BEGIN TEST testthat.R
R version 4.1.2 (2021-11-01) -- "Bird Hippie"
Copyright (C) 2021 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(testthat)
> library(satellite)
Loading required package: raster
Loading required package: sp
Warning messages:
1: multiple methods tables found for 'crop'
2: multiple methods tables found for 'extend'
>
>
> ### functions to create test data sets -----
>
> ### Utility functions to quickly create test data sets for various sensors
> ### Florian Detsch, last modified on 2017-07-24
>
> tst_obj <- function(type = c("LC08", "LC8", "LE07", "LE7", "LT05")) {
+ if (type[1] == "LC08")
+ tst_obj_lc08()
+ else if (type[1] == "LC8")
+ tst_obj_lc8()
+ else if (type[1] == "LE07")
+ tst_obj_le07()
+ else if (type[1] == "LE7")
+ tst_obj_le7()
+ else if (type[1] == "LT05")
+ tst_obj_lt05()
+ else
+ stop("Sensor test data not available, yet.\n")
+ }
>
>
> ### collection 1 level-1 -----
>
> ## landsat 8
> tst_obj_lc08 <- function() {
+ path <- system.file("extdata", package = "satellite")
+ files <- list.files(path, pattern = glob2rx("LC08*.TIF"), full.names = TRUE)
+ satellite(files)
+ }
>
> ## landsat 7
> tst_obj_le07 <- function() {
+ path <- system.file("extdata", package = "satellite")
+ files <- list.files(path, pattern = glob2rx("LE07*.TIF"), full.names = TRUE)
+ satellite(files)
+ }
>
> ## landsat 5
> tst_obj_lt05 <- function() {
+ path <- system.file("testdata/LT05", package = "satellite")
+ files <- list.files(path, pattern = glob2rx("LT05*.TIF"), full.names = TRUE)
+ satellite(files)
+ }
>
>
> ### precollection level-1 -----
>
> ## landsat 8
> tst_obj_lc8 <- function() {
+ path <- system.file("testdata/LC8", package = "satellite")
+ files <- list.files(path, pattern = glob2rx("LC8*.TIF"), full.names = TRUE)
+ satellite(files)
+ }
>
> ## landsat 7
> tst_obj_le7 <- function() {
+ path <- system.file("testdata/LE7", package = "satellite")
+ files <- list.files(path, pattern = glob2rx("LE7*.TIF"), full.names = TRUE)
+ satellite(files)
+ }
>
>
> ### perform tests -----
>
> test_check("satellite")
== Skipped tests ============================================================================================================================================================================================================================
* empty test (12)
== Failed tests =============================================================================================================================================================================================================================
-- Error (test-extend.R:9:1): (code run outside of `test_that()`) ---------------------------
Error in `(function (classes, fdef, mtable)
{
methods <- .findInheritedMethods(classes, fdef, mtable)
if (length(methods) == 1L)
return(methods[[1L]])
else if (length(methods) == 0L) {
cnames <- paste0("\"", vapply(classes, as.character,
""), "\"", collapse = ", ")
stop(gettextf("unable to find an inherited method for function %s for signature %s",
sQuote(fdef at generic), sQuote(cnames)), domain = NA)
}
else stop("Internal error in finding inherited methods; didn't return a unique method",
domain = NA)
})(list(structure("Satellite", package = "satellite")), new("standardGeneric",
.Data = function (x, y, ...)
standardGeneric("extend"), generic = structure("extend", package = "terra"),
package = "terra", group = list(), valueClass = character(0),
signature = c("x", "y"), default = NULL, skeleton = (function (x,
y, ...)
stop("invalid call in method dispatch to 'extend' (no default method)",
domain = NA))(x, y, ...)), <environment>)`: unable to find an inherited method for function 'extend' for signature '"Satellite"'
Backtrace:
x
1. \-terra::extend(sat, ext_ggs) test-extend.R:9:0
2. \-(function (classes, fdef, mtable) ...
[ FAIL 1 | WARN 0 | SKIP 12 | PASS 139 ]
Error: Test failures
Execution halted
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/r-pkg-team/attachments/20211211/89f9471c/attachment-0001.sig>
More information about the R-pkg-team
mailing list