Skip to content

Commit

Permalink
skip vrt tests on cran
Browse files Browse the repository at this point in the history
  • Loading branch information
dramanica committed Jun 19, 2024
1 parent 9f51b96 commit 0767883
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion R/get_data_path.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,11 @@ get_data_path <- function(silent = FALSE) {
"pastclim_data.txt"
))[1, 1]
if (!dir.exists(path_to_nc)) {
stop(
warning(
"The path ", path_to_nc, " from the config file does not exist!\n",
"You can reset the path with `set_data_path`."
)
return(NULL)
}
return(path_to_nc)
}
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test_pastclim_rast.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# this file tests the setting and getting of metadata from a vrt file
# we work in the temp directory

skip_on_cran()
# the gdal utilities are not properly installed on CRANs linux server
test_that("pastclim_rast handles vrt correctly", {
vrt_path <- file.path(tempdir(),"test.vrt")
tif_files <- list.files(system.file("extdata/CHELSA_bio01", package="pastclim"),
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test_vrt_set_get_meta.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# this file tests the setting and getting of metadata from a vrt file
# we work in the temp directory
skip_on_cran()
# buildvrt from gdal is not properly installed on the linux machine on CRAN
test_that("setting and getting vrt meta", {
vrt_path <- file.path(tempdir(),"test.vrt")
tif_files <- list.files(system.file("extdata/CHELSA_bio01", package="pastclim"),
Expand Down

0 comments on commit 0767883

Please sign in to comment.