refactor: move {raster} and {terra} to Suggests#943
Open
olivroy wants to merge 25 commits intorstudio:mainfrom
Open
refactor: move {raster} and {terra} to Suggests#943olivroy wants to merge 25 commits intorstudio:mainfrom
{raster} and {terra} to Suggests#943olivroy wants to merge 25 commits intorstudio:mainfrom
Conversation
This reverts commit 15da72f.
{raster} with {terra}
schloerke
requested changes
Mar 4, 2025
{raster} with {terra}{raster} and {terra} to Suggests
Member
|
I will leave the reviewing to @schloerke but I just wanted to say thank you, @olivroy, for these great contributions! |
Contributor
Author
|
sounds good to me! I will take a look |
Contributor
|
Larger revdepcheck result output broken <- revdepcheck::cloud_broken()
broken_results <- revdepcheck::cloud_results() |> Filter(f = \(x) x$package %in% broken)
logs <-
lapply(broken_results, \(info) info$cmp$output |> paste0(collapse = "\n")) |>
as.list() |>
setNames(vapply(broken_results, \(info) info$package[[1]], character(1)))
ignore <-
Map(names(logs), logs, f = \(name, log) {
cat(paste0("## ", name, "\n\n"))
cat("```r\n")
cat(log)
cat("\n```\n\n")
})AtlasMakerchecking installed package size ... NOTE
installed size is 6.7Mb
sub-directories of 1Mb or more:
data 6.5Mb
checking data for non-ASCII characters ... WARNING
Error loading dataset 'amphibians':
Error in .requirePackage(package) : unable to find required package 'sp'
Error loading dataset 'birds':
Error in .requirePackage(package) : unable to find required package 'sp'
Error loading dataset 'flowering_plants':
Error in .requirePackage(package) : unable to find required package 'sp'
Error loading dataset 'reptiles':
Error in .requirePackage(package) : unable to find required package 'sp'
The dataset(s) may use package(s) not declared in Depends/Imports.
checking installed package size ... NOTE
installed size is 6.7Mb
sub-directories of 1Mb or more:
data 6.5Mbleafglchecking tests ... ERROR
Running ‘testthat.R’
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(leafgl)
>
> test_check("leafgl")
[ FAIL 3 | WARN 0 | SKIP 0 | PASS 370 ]
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-leafgl-addGlPolygons.R:26:3'): addGlPolygons works ─────────────
Error in `asMethod(object)`: package sp required, please install it first
Backtrace:
▆
1. └─methods::as(single_poly, "Spatial") at test-leafgl-addGlPolygons.R:26:3
2. └─sf (local) asMethod(object)
── Error ('test-leafgl-popup.R:507:3'): popup-lines-spatial ────────────────────
<packageNotFoundError/error/condition>
Error in `loadNamespace(x)`: there is no package called 'sp'
Backtrace:
▆
1. ├─base::suppressWarnings(sf::as_Spatial(storms)) at test-leafgl-popup.R:507:3
2. │ └─base::withCallingHandlers(...)
3. ├─sf::as_Spatial(storms)
4. └─base::loadNamespace(x)
5. └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
6. └─base (local) withOneRestart(expr, restarts[[1L]])
7. └─base (local) doWithOneRestart(return(expr), restart)
── Error ('test-leafgl-popup.R:721:3'): popup-polygon-spatial ──────────────────
<packageNotFoundError/error/condition>
Error in `loadNamespace(x)`: there is no package called 'sp'
Backtrace:
▆
1. ├─base::suppressWarnings(sf::as_Spatial(gadm)) at test-leafgl-popup.R:721:3
2. │ └─base::withCallingHandlers(...)
3. ├─sf::as_Spatial(gadm)
4. └─base::loadNamespace(x)
5. └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
6. └─base (local) withOneRestart(expr, restarts[[1L]])
7. └─base (local) doWithOneRestart(return(expr), restart)
[ FAIL 3 | WARN 0 | SKIP 0 | PASS 370 ]
Error: Test failures
Execution haltedleaflet.extras2checking tests ... ERROR
Running ‘testthat.R’
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(htmltools)
> library(leaflet)
> library(leaflet.extras2)
>
> test_check("leaflet.extras2")
[ FAIL 1 | WARN 0 | SKIP 0 | PASS 440 ]
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-playback.R:355:3'): playback ───────────────────────────────────
Error: unable to find an inherited method for function 'coordinates' for signature 'obj = "sf"'
Backtrace:
▆
1. └─sp::coordinates(leaflet::atlStorms2005[1, ]) at test-playback.R:355:3
2. └─methods (local) `<fn>`(`<list>`, `<S4: standardGeneric>`, `<env>`)
[ FAIL 1 | WARN 0 | SKIP 0 | PASS 440 ]
Error: Test failures
Execution haltedlingtypologychecking installed package size ... NOTE
installed size is 7.7Mb
sub-directories of 1Mb or more:
data 6.5Mb
checking data for non-ASCII characters ... NOTE
Note: found 60812 marked UTF-8 strings
checking tests ... ERROR
Running ‘testthat.R’
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(lingtypology)
Based on the Glottolog v. 5.2
>
> test_check("lingtypology")
[ FAIL 1 | WARN 0 | SKIP 34 | PASS 0 ]
══ Skipped tests (34) ══════════════════════════════════════════════════════════
• On CRAN (34): 'test-abvd-feature.R:4:3', 'test-afbo-feature.R:5:3',
'test-aff-lang.R:4:3', 'test-area-lang.R:7:3', 'test-bantu-feature.R:5:3',
'test-country-lang.R:4:3', 'test-eurasianphonology-feature.R:5:3',
'test-glottolog-database.R:5:3', 'test-glottolog-database.R:10:3',
'test-gltc-iso.R:7:3', 'test-gltc-lang.R:7:3', 'test-grambank-feature.R:5:3',
'test-iso-gltc.R:7:3', 'test-iso-lang.R:7:3', 'test-lang-aff.R:6:3',
'test-lang-gltc.R:7:3', 'test-lang-iso.R:7:3', 'test-lat-lang.R:7:3',
'test-level.lang.R:7:3', 'test-long-lang.R:7:3', 'test-mapfeature.R:8:3',
'test-mapfeature.R:15:3', 'test-mapfeature.R:21:3', 'test-mapfeature.R:35:3',
'test-mapfeature.R:83:3', 'test-mapfeature.R:93:3',
'test-mapfeature.R:120:3', 'test-mapfeature.R:146:3',
'test-sails-feature.R:5:3', 'test-soundcomparisons-feature.R:5:3',
'test-subc-lang.R:4:3', 'test-url-lang.R:7:3', 'test-vanuatu-feature.R:5:3',
'test-wals-feature.R:5:3'
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-mapfeature.R:161:1'): (code run outside of `test_that()`) ──────
Error in `leaflet::addProviderTiles(leaflet::addTiles(m, tile[1]), tile[1],
group = tile.name[1], options = leaflet::providerTileOptions(opacity = tile.opacity))`: Unknown tile provider 'OpenStreetMap.BlackAndWhite'; either use a known provider or pass `check = FALSE` to `addProviderTiles()`
Backtrace:
▆
1. └─lingtypology::map.feature(...) at test-mapfeature.R:161:1
2. └─leaflet::addProviderTiles(...)
[ FAIL 1 | WARN 0 | SKIP 34 | PASS 0 ]
Error: Test failures
Execution halted
checking installed package size ... NOTE
installed size is 7.7Mb
sub-directories of 1Mb or more:
data 6.5Mb
checking data for non-ASCII characters ... NOTE
Note: found 60812 marked UTF-8 stringsmapviewchecking data for non-ASCII characters ... NOTE
Note: found 1 marked UTF-8 string
checking tests ... ERROR
Running ‘tinytest.R’
Running the tests in ‘tests/tinytest.R’ failed.
Complete output:
> if (requireNamespace("tinytest", quietly=TRUE)) {
+ tinytest::test_package("mapview")
+ }
test-color.R.................. 0 tests
test-color.R.................. 1 tests OK
test-color.R.................. 2 tests OK
test-color.R.................. 3 tests OK
test-color.R.................. 4 tests OK
test-color.R.................. 5 tests OK
test-color.R.................. 6 tests OK 53ms
Linking to GEOS 3.12.1, GDAL 3.8.4, PROJ 9.4.0; sf_use_s2() is TRUE
test-mapview.R................ 0 tests
test-mapview.R................ 0 tests
test-mapview.R................ 0 tests
test-mapview.R................ 1 tests OK
test-mapview.R................ 2 tests OK
test-mapview.R................ 3 tests OK
test-mapview.R................ 4 tests OK
test-mapview.R................ 4 tests OK
test-mapview.R................ 5 tests OK
test-mapview.R................ 6 tests OK
test-mapview.R................ 7 tests OK
test-mapview.R................ 8 tests OK
test-mapview.R................ 8 tests OK
test-mapview.R................ 8 tests OK
test-mapview.R................ 9 tests OK
test-mapview.R................ 10 tests OK
test-mapview.R................ 11 tests OK
test-mapview.R................ 12 tests OK
test-mapview.R................ 12 tests OK
test-mapview.R................ 13 tests OK
test-mapview.R................ 14 tests OK
test-mapview.R................ 15 tests OK
test-mapview.R................ 16 tests OK
test-mapview.R................ 16 tests OK
test-mapview.R................ 16 tests OK
test-mapview.R................ 17 tests OK
test-mapview.R................ 18 tests OK
test-mapview.R................ 19 tests OK
test-mapview.R................ 20 tests OK
test-mapview.R................ 20 tests OK
test-mapview.R................ 21 tests OK
test-mapview.R................ 22 tests OK
test-mapview.R................ 23 tests OK
test-mapview.R................ 24 tests OK
test-mapview.R................ 24 tests OK
test-mapview.R................ 24 tests OK
test-mapview.R................ 25 tests OK
test-mapview.R................ 26 tests OK
test-mapview.R................ 27 tests OK
test-mapview.R................ 28 tests OK
test-mapview.R................ 28 tests OK
test-mapview.R................ 29 tests OK
test-mapview.R................ 30 tests OK
test-mapview.R................ 31 tests OK
test-mapview.R................ 32 tests OK
test-mapview.R................ 32 tests OK
test-mapview.R................ 32 tests OK
test-mapview.R................ 33 tests OK
test-mapview.R................ 33 tests OK
test-mapview.R................ 34 tests OK
test-mapview.R................ 34 tests OK
test-mapview.R................ 34 tests OK
test-mapview.R................ 35 tests OK
test-mapview.R................ 36 tests OK
test-mapview.R................ 37 tests OK
test-mapview.R................ 38 tests OK
test-mapview.R................ 38 tests OK
test-mapview.R................ 39 tests OK
test-mapview.R................ 40 tests OK
test-mapview.R................ 41 tests OK
test-mapview.R................ 42 tests OK Loading required package: sp
test-mapview.R................ 42 tests OK
test-mapview.R................ 42 tests OK
test-mapview.R................ 43 tests OK
test-mapview.R................ 44 tests OK
test-mapview.R................ 45 tests OK
test-mapview.R................ 46 tests OK
test-mapview.R................ 46 tests OK
test-mapview.R................ 47 tests OK
test-mapview.R................ 48 tests OK
test-mapview.R................ 49 tests OK
test-mapview.R................ 50 tests OK
test-mapview.R................ 50 tests OK
test-mapview.R................ 50 tests OK
test-mapview.R................ 51 tests OK
test-mapview.R................ 52 tests OK
test-mapview.R................ 53 tests OK
test-mapview.R................ 54 tests OK
test-mapview.R................ 54 tests OK
test-mapview.R................ 55 tests OK
test-mapview.R................ 56 tests OK
test-mapview.R................ 57 tests OK
test-mapview.R................ 58 tests OK
test-mapview.R................ 58 tests OK
test-mapview.R................ 59 tests OK
test-mapview.R................ 60 tests OK
test-mapview.R................ 61 tests OK
test-mapview.R................ 62 tests OK
test-mapview.R................ 62 tests OK
test-mapview.R................ 63 tests OK
test-mapview.R................ 64 tests OK
test-mapview.R................ 65 tests OK
test-mapview.R................ 66 tests OK
test-mapview.R................ 66 tests OK
test-mapview.R................ 67 tests OK
test-mapview.R................ 68 tests OK
test-mapview.R................ 69 tests OK
test-mapview.R................ 70 tests OK
test-mapview.R................ 70 tests OK
test-mapview.R................ 71 tests OK
test-mapview.R................ 72 tests OK
test-mapview.R................ 73 tests OK
test-mapview.R................ 74 tests OK
test-mapview.R................ 74 tests OK
test-mapview.R................ 75 tests OK
test-mapview.R................ 76 tests OK
test-mapview.R................ 77 tests OK
test-mapview.R................ 78 tests OK
test-mapview.R................ 78 tests OK
test-mapview.R................ 79 tests OK
test-mapview.R................ 80 tests OK
test-mapview.R................ 81 tests OK
test-mapview.R................ 82 tests OK
test-mapview.R................ 82 tests OK
test-mapview.R................ 82 tests OK
test-mapview.R................ 83 tests OK
test-mapview.R................ 84 tests OK
test-mapview.R................ 85 tests OK
test-mapview.R................ 86 tests OK
test-mapview.R................ 86 tests OK
test-mapview.R................ 87 tests OK
test-mapview.R................ 88 tests OK
test-mapview.R................ 89 tests OK
test-mapview.R................ 90 tests OK
test-mapview.R................ 90 tests OK
test-mapview.R................ 91 tests OK
test-mapview.R................ 92 tests OK
test-mapview.R................ 93 tests OK
test-mapview.R................ 94 tests OK
test-mapview.R................ 94 tests OK
test-mapview.R................ 95 tests OK
test-mapview.R................ 96 tests OK
test-mapview.R................ 97 tests OK
test-mapview.R................ 98 tests OK
test-mapview.R................ 98 tests OK
test-mapview.R................ 99 tests OK
test-mapview.R................ 100 tests OK
test-mapview.R................ 101 tests OK
test-mapview.R................ 102 tests OK
test-mapview.R................ 102 tests OK
test-mapview.R................ 103 tests OK
test-mapview.R................ 104 tests OK
test-mapview.R................ 105 tests OK
test-mapview.R................ 106 tests OK
test-mapview.R................ 106 tests OK
test-mapview.R................ 106 tests OK
test-mapview.R................ 107 tests OK
test-mapview.R................ 108 tests OK
test-mapview.R................ 109 tests OK
test-mapview.R................ 110 tests OK
test-mapview.R................ 110 tests OK
test-mapview.R................ 111 tests OK
test-mapview.R................ 112 tests OK
test-mapview.R................ 113 tests OK
test-mapview.R................ 114 tests OK
test-mapview.R................ 114 tests OK
test-mapview.R................ 114 tests OK
test-mapview.R................ 115 tests OK
test-mapview.R................ 116 tests OK
test-mapview.R................ 117 tests OK
test-mapview.R................ 118 tests OK
test-mapview.R................ 118 tests OK
test-mapview.R................ 119 tests OK
test-mapview.R................ 120 tests OK
test-mapview.R................ 121 tests OK
test-mapview.R................ 122 tests OK
test-mapview.R................ 122 tests OK
test-mapview.R................ 122 tests OK Error in as(atlStorms2005, "SpatialLines") :
no method or default for coercing "sf" to "SpatialLines"
Calls: <Anonymous> ... eval -> mapview -> standardGeneric -> eval -> eval -> as
Execution halted
checking data for non-ASCII characters ... NOTE
Note: found 1 marked UTF-8 stringraprchecking tests ... ERROR
Running ‘tinytest.R’
Running the tests in ‘tests/tinytest.R’ failed.
Complete output:
>
> if ( requireNamespace("tinytest", quietly=TRUE) ){
+ tinytest::test_package("rapr")
+ }
test_rapr.R................... 0 tests
test_rapr.R................... 0 tests
test_rapr.R................... 0 tests
test_rapr.R................... 0 tests
test_rapr.R................... 1 tests OK
test_rapr.R................... 2 tests OK
test_rapr.R................... 3 tests OK
test_rapr.R................... 3 tests OK
test_rapr.R................... 3 tests OK
test_rapr.R................... 4 tests OK
test_rapr.R................... 5 tests OK
test_rapr.R................... 6 tests OK
test_rapr.R................... 7 tests OK
test_rapr.R................... 7 tests OK Loading required namespace: sf
test_rapr.R................... 7 tests OK
test_rapr.R................... 8 tests OK
test_rapr.R................... 9 tests OK
test_rapr.R................... 10 tests OK
test_rapr.R................... 10 tests OK
test_rapr.R................... 10 tests OK
test_rapr.R................... 11 tests OK
test_rapr.R................... 12 tests OK
test_rapr.R................... 13 tests OK
test_rapr.R................... 14 tests OK
test_rapr.R................... 14 tests OK Error in sfc2SpatialPolygons(from, IDs) :
package sp required, please install it first
Calls: <Anonymous> ... <Anonymous> -> as_Spatial -> .as_Spatial -> sfc2SpatialPolygons
Execution halted |
Contributor
|
One article to fix before merge. Thank you, @olivroy ! |
Contributor
Author
|
It seems that the problem lied in the fact that |
6 tasks
Contributor
Author
|
this PR didn't cause issues. All PRs merged |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #942
I couldn't use the same approach because I didn't find the documentation in terra for automatic conversion
raster->terralike the usefulsf::st_as_sf().{raster}in examples