Skip to content

Commit 2f495b6

Browse files
committed
Skip tests
1 parent a27a374 commit 2f495b6

7 files changed

+41
-2
lines changed

DESCRIPTION

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: tidyterra
22
Title: 'tidyverse' Methods and 'ggplot2' Helpers for 'terra' Objects
3-
Version: 0.7.1
3+
Version: 0.7.1.9000
44
Authors@R: c(
55
person("Diego", "Hernangómez", , "[email protected]", role = c("aut", "cre", "cph"),
66
comment = c(ORCID = "0000-0001-8457-4658")),
@@ -49,7 +49,7 @@ Config/Needs/coverage: covr
4949
Config/Needs/website: geodata, dieghernan/gitdevr, ragg, styler, metR,
5050
ggspatial, cpp11, remotes, gganimate, gifski
5151
Config/testthat/edition: 3
52-
Config/testthat/parallel: true
52+
Config/testthat/parallel: false
5353
Encoding: UTF-8
5454
LazyData: true
5555
Roxygen: list(markdown = TRUE)

NEWS.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# tidyterra (development version)
2+
13
# tidyterra 0.7.1
24

35
- New parameters in `geom_spatraster_*`: `mask_projection`. When set to `TRUE`

tests/testthat/test-arrange-SpatVector.R

+4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
test_that("Arrange with SpatVector", {
2+
skip_on_cran()
23
f <- system.file("extdata/cyl.gpkg", package = "tidyterra")
34
v <- terra::vect(f)
45

@@ -14,6 +15,7 @@ test_that("Arrange with SpatVector", {
1415
})
1516

1617
test_that("Arrange with 2 vars SpatVector", {
18+
skip_on_cran()
1719
f <- system.file("extdata/cyl.gpkg", package = "tidyterra")
1820
v <- terra::vect(f)
1921
v$area_end <- terra::expanse(v)
@@ -33,6 +35,7 @@ test_that("Arrange with 2 vars SpatVector", {
3335
# From dplyr
3436

3537
test_that("grouped arrange ignores group, unless requested with .by_group", {
38+
skip_on_cran()
3639
df <- data.frame(g = c(2, 1, 2, 1), x = 4:1)
3740
df <- terra::vect(df, geom = c("g", "x"), keepgeom = TRUE)
3841
gf <- group_by(df, g)
@@ -48,6 +51,7 @@ test_that("grouped arrange ignores group, unless requested with .by_group", {
4851
})
4952

5053
test_that("arrange updates the grouping structure", {
54+
skip_on_cran()
5155
df <- data.frame(g = c(2, 2, 1, 1), x = c(1, 3, 2, 4))
5256
df <- terra::vect(df, geom = c("g", "x"), keepgeom = TRUE)
5357

tests/testthat/test-as_coordinates.R

+3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
test_that("as_coordinates errors", {
2+
skip_on_cran()
23
v <- volcano
34
expect_snapshot(as_coordinates(v), error = TRUE)
45
})
56

67
test_that("as_coordinates return a skeleton", {
8+
skip_on_cran()
79
v <- volcano
810

911
r <- terra::rast(t(v))
@@ -38,6 +40,7 @@ test_that("as_coordinates return a skeleton", {
3840

3941

4042
test_that("as_coordinates return a raster", {
43+
skip_on_cran()
4144
v <- volcano
4245
r <- terra::rast(t(v))
4346

tests/testthat/test-as_sf.R

+4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
test_that("Only works with SpatVector", {
2+
skip_on_cran()
23
r <- terra::rast(nrows = 180 / 4, ncols = 360 / 4)
34
terra::values(r) <- seq_len(terra::ncell(r))
45
expect_snapshot(as_sf(r), error = TRUE)
@@ -16,6 +17,7 @@ test_that("Only works with SpatVector", {
1617

1718

1819
test_that("Coercion to normal sf works", {
20+
skip_on_cran()
1921
f <- system.file("extdata/cyl.gpkg", package = "tidyterra")
2022
v <- terra::vect(f)
2123

@@ -34,6 +36,7 @@ test_that("Coercion to normal sf works", {
3436

3537

3638
test_that("Coercion to grouped sf works", {
39+
skip_on_cran()
3740
f <- system.file("extdata/cyl.gpkg", package = "tidyterra")
3841
v <- terra::vect(f)
3942
v$gr <- c("C", "A", "A", "B", "A", "B", "B")
@@ -51,6 +54,7 @@ test_that("Coercion to grouped sf works", {
5154

5255

5356
test_that("Coercion to rowwise sf works", {
57+
skip_on_cran()
5458
f <- system.file("extdata/cyl.gpkg", package = "tidyterra")
5559
v <- terra::vect(f)
5660
v$gr <- c("C", "A", "A", "B", "A", "B", "B")

tests/testthat/test-as_spatraster.R

+6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
test_that("Error check", {
2+
skip_on_cran()
23
r <- terra::rast(matrix(1:90, ncol = 3), crs = "EPSG:3857")
34

45
as_tbl <- dplyr::as_tibble(r, xy = TRUE)
@@ -13,6 +14,7 @@ test_that("Error check", {
1314

1415

1516
test_that("Regenerate raster properly", {
17+
skip_on_cran()
1618
f <- system.file("extdata/cyl_temp.tif", package = "tidyterra")
1719
r <- terra::rast(f)
1820

@@ -57,6 +59,7 @@ test_that("Regenerate raster properly", {
5759

5860

5961
test_that("Irregular grids", {
62+
skip_on_cran()
6063
p <- matrix(1:90, nrow = 30, ncol = 3)
6164
names(p) <- c("x", "y", "z")
6265

@@ -90,6 +93,7 @@ test_that("Irregular grids", {
9093
})
9194

9295
test_that("Check with chars", {
96+
skip_on_cran()
9397
df <- data.frame(
9498
x_lan = seq(310, 400, by = 10),
9599
y_lon = seq(510, 600, by = 10),
@@ -112,6 +116,7 @@ test_that("Check with chars", {
112116
})
113117

114118
test_that("Check with mixed type of cols", {
119+
skip_on_cran()
115120
df <- data.frame(
116121
x_lan = seq(310, 400, by = 10),
117122
y_lon = seq(510, 600, by = 10),
@@ -143,6 +148,7 @@ test_that("Check with mixed type of cols", {
143148

144149

145150
test_that("Check internal", {
151+
skip_on_cran()
146152
p <- matrix(1:90, nrow = 30, ncol = 3)
147153
names(p) <- c("x", "y", "z")
148154

tests/testthat/test-as_spatvector.R

+20
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
test_that("Error check", {
2+
skip_on_cran()
23
as_tbl <- data.frame(
34
x = 1:10,
45
y = 1:10
@@ -16,6 +17,7 @@ test_that("Error check", {
1617

1718

1819
test_that("Handle NAs", {
20+
skip_on_cran()
1921
as_tbl <- data.frame(
2022
x = 1:10,
2123
y = 1:10,
@@ -44,6 +46,7 @@ test_that("Handle NAs", {
4446

4547

4648
test_that("Regenerate vector properly with WKT", {
49+
skip_on_cran()
4750
f <- system.file("extdata/cyl.gpkg", package = "tidyterra")
4851
v <- terra::vect(f)
4952

@@ -87,6 +90,7 @@ test_that("Regenerate vector properly with WKT", {
8790
})
8891

8992
test_that("Regenerate vector properly with lon,lat", {
93+
skip_on_cran()
9094
f <- system.file("extdata/cyl.gpkg", package = "tidyterra")
9195
v <- terra::vect(f)
9296
v <- terra::centroids(v)
@@ -130,6 +134,7 @@ test_that("Regenerate vector properly with lon,lat", {
130134
})
131135

132136
test_that("Works with grouped_df", {
137+
skip_on_cran()
133138
as_tbl <- data.frame(
134139
x = as.double(1:10),
135140
y = as.double(1:10),
@@ -155,6 +160,7 @@ test_that("Works with grouped_df", {
155160
})
156161

157162
test_that("Works with rowwise_df", {
163+
skip_on_cran()
158164
as_tbl <- data.frame(
159165
x = as.double(1:10),
160166
y = as.double(1:10),
@@ -180,6 +186,7 @@ test_that("Works with rowwise_df", {
180186
})
181187

182188
test_that("Works with unnamed rowwise_df", {
189+
skip_on_cran()
183190
as_tbl <- data.frame(
184191
x = as.double(1:10),
185192
y = as.double(1:10),
@@ -205,6 +212,7 @@ test_that("Works with unnamed rowwise_df", {
205212
})
206213
test_that("Works with sf", {
207214
skip_on_cran()
215+
skip_on_cran()
208216

209217
sfobj <- sf::read_sf(system.file("extdata/cyl.gpkg", package = "tidyterra"))
210218

@@ -248,6 +256,7 @@ test_that("Works with sf", {
248256
})
249257

250258
test_that("Check sfc", {
259+
skip_on_cran()
251260
sfobj <- sf::read_sf(system.file("extdata/cyl.gpkg", package = "tidyterra"))
252261
sfobj <- sf::st_geometry(sfobj)
253262
expect_s3_class(sfobj, "sfc")
@@ -258,6 +267,7 @@ test_that("Check sfc", {
258267
})
259268

260269
test_that("Check sf with crs null", {
270+
skip_on_cran()
261271
sfobj <- sf::st_point(c(0, 0))
262272
sfobj <- sf::st_sfc(sfobj)
263273

@@ -269,6 +279,7 @@ test_that("Check sf with crs null", {
269279
})
270280

271281
test_that("Check sf with empty geoms: POLYGONS", {
282+
skip_on_cran()
272283
sfobj <- sf::read_sf(system.file("extdata/cyl.gpkg", package = "tidyterra"))
273284

274285
sfobj <- dplyr::bind_rows(sfobj, data.frame(a = 1))
@@ -286,6 +297,7 @@ test_that("Check sf with empty geoms: POLYGONS", {
286297
})
287298

288299
test_that("Check sf with empty geoms: LINESTRINGS", {
300+
skip_on_cran()
289301
sfobj <- sf::read_sf(system.file("extdata/cyl.gpkg", package = "tidyterra"))
290302

291303
sfobj <- sf::st_cast(sfobj, "MULTILINESTRING", warn = FALSE)
@@ -304,6 +316,7 @@ test_that("Check sf with empty geoms: LINESTRINGS", {
304316
})
305317

306318
test_that("Check sf with empty geoms: POINTS", {
319+
skip_on_cran()
307320
sfobj <- sf::read_sf(system.file("extdata/cyl.gpkg", package = "tidyterra"))
308321

309322
sfobj <- sf::st_cast(sfobj[1:2, ], "MULTIPOINT", warn = FALSE)
@@ -322,6 +335,7 @@ test_that("Check sf with empty geoms: POINTS", {
322335
})
323336

324337
test_that("Check internal", {
338+
skip_on_cran()
325339
f <- system.file("extdata/cyl.gpkg", package = "tidyterra")
326340
v <- terra::vect(f)
327341

@@ -360,6 +374,7 @@ test_that("Check internal", {
360374

361375

362376
test_that("Check internal grouped", {
377+
skip_on_cran()
363378
f <- system.file("extdata/cyl.gpkg", package = "tidyterra")
364379
v <- terra::vect(f)
365380

@@ -391,6 +406,7 @@ test_that("Check internal grouped", {
391406
})
392407

393408
test_that("Check internal rowwise", {
409+
skip_on_cran()
394410
f <- system.file("extdata/cyl.gpkg", package = "tidyterra")
395411
v <- terra::vect(f)
396412

@@ -423,6 +439,7 @@ test_that("Check internal rowwise", {
423439

424440

425441
test_that("Check internal NULL: POLYGONS", {
442+
skip_on_cran()
426443
f <- system.file("extdata/cyl.gpkg", package = "tidyterra")
427444
v <- terra::vect(f)
428445

@@ -480,6 +497,7 @@ test_that("Check internal NULL: POLYGONS", {
480497

481498

482499
test_that("Check internal NULL: LINES", {
500+
skip_on_cran()
483501
f <- system.file("extdata/cyl.gpkg", package = "tidyterra")
484502
v <- terra::vect(f)
485503

@@ -537,6 +555,7 @@ test_that("Check internal NULL: LINES", {
537555

538556

539557
test_that("Check internal NULL: POINTS", {
558+
skip_on_cran()
540559
f <- system.file("extdata/cyl.gpkg", package = "tidyterra")
541560
v <- terra::vect(f)
542561

@@ -598,6 +617,7 @@ test_that("Check internal NULL: POINTS", {
598617

599618

600619
test_that("Keep group with NULL", {
620+
skip_on_cran()
601621
f <- system.file("extdata/cyl.gpkg", package = "tidyterra")
602622
v <- sf::read_sf(f)
603623
v$gr <- rep_len(c("A", "B", "C", "D"), length.out = nrow(v))

0 commit comments

Comments
 (0)