Skip to content

Commit a66fb2d

Browse files
committed
allow for missing blosc/Zarr in test
1 parent 5cbb12a commit a66fb2d

File tree

3 files changed

+33
-8
lines changed

3 files changed

+33
-8
lines changed

inst/docker/gdal/Dockerfile

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ RUN cd proj* \
9999

100100
# GDAL:
101101
ENV GDAL_VERSION 3.12.0
102-
ENV GDAL_VERSION_NAME 3.12.0rc1
102+
ENV GDAL_VERSION_NAME 3.12.0
103103
RUN wget -q http://download.osgeo.org/gdal/${GDAL_VERSION}/gdal-${GDAL_VERSION_NAME}.tar.gz \
104104
&& tar -xf gdal-${GDAL_VERSION_NAME}.tar.gz \
105105
&& cd gdal* \
@@ -138,3 +138,14 @@ RUN _R_CHECK_FORCE_SUGGESTS_=false R CMD check --no-build-vignettes --no-manual
138138
# terra:
139139
RUN wget -q https://cran.r-project.org/src/contrib/terra_1.8-80.tar.gz
140140
RUN R CMD check --no-manual terra_1.8-80.tar.gz
141+
142+
RUN wget -q https://cran.r-project.org/src/contrib/vapour_0.12.0.tar.gz
143+
RUN R -e 'install.packages(c("markdown", "spelling"))'
144+
#RUN R CMD INSTALL vapour*gz
145+
#RUN R CMD check --no-manual vapour*gz
146+
147+
RUN R -e 'install.packages(c("gt"))'
148+
RUN wget -q https://cran.r-project.org/src/contrib/gdalraster_2.2.1.tar.gz
149+
RUN R -e 'install.packages(c("RcppInt64"))'
150+
RUN R CMD INSTALL gdalraster*gz
151+
RUN R CMD check --no-manual gdalraster*gz

tests/stars.R

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,13 @@ if (require(stars, quietly = TRUE)) {
8181
z = paste0('ZARR:/vsizip/"', p, '"/ones.zarr')
8282
gdal_utils("mdiminfo", z)
8383
cat("\n")
84-
print(read_stars(z, normalize_path = FALSE))
85-
print(read_mdim(z, normalize_path = FALSE))
84+
e = try(read_stars(z, normalize_path = FALSE), silent = TRUE)
85+
f = try(read_mdim(z, normalize_path = FALSE), silent = TRUE)
86+
if (inherits(e, "try-error") || inherits(f, "try-error")) {
87+
print(e)
88+
print("error when reading blosc-compressed Zarr file: blosc not supported?")
89+
} else {
90+
print(e)
91+
print(f)
92+
}
8693
}

tests/stars.Rout.save

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

2-
R Under development (unstable) (2025-11-05 r88988 ucrt) -- "Unsuffered Consequences"
2+
R version 4.5.2 (2025-10-31) -- "[Not] Part in a Rumble"
33
Copyright (C) 2025 The R Foundation for Statistical Computing
4-
Platform: x86_64-w64-mingw32/x64
4+
Platform: x86_64-pc-linux-gnu
55

66
R is free software and comes with ABSOLUTELY NO WARRANTY.
77
You are welcome to redistribute it under certain conditions.
@@ -264,8 +264,15 @@ First 10 features:
264264
+ z = paste0('ZARR:/vsizip/"', p, '"/ones.zarr')
265265
+ gdal_utils("mdiminfo", z)
266266
+ cat("\n")
267-
+ print(read_stars(z, normalize_path = FALSE))
268-
+ print(read_mdim(z, normalize_path = FALSE))
267+
+ e = try(read_stars(z, normalize_path = FALSE), silent = TRUE)
268+
+ f = try(read_mdim(z, normalize_path = FALSE), silent = TRUE)
269+
+ if (inherits(e, "try-error") || inherits(f, "try-error")) {
270+
+ print(e)
271+
+ print("error when reading blosc-compressed Zarr file: blosc not supported?")
272+
+ } else {
273+
+ print(e)
274+
+ print(f)
275+
+ }
269276
+ }
270277
{
271278
"type": "group",
@@ -320,4 +327,4 @@ dim0 1 100 0.5 1 [y]
320327
>
321328
> proc.time()
322329
user system elapsed
323-
2.10 0.23 2.32
330+
1.943 3.833 1.595

0 commit comments

Comments
 (0)