huizezhang-sherry / cubble

A tidy structure for spatio-temporal vector data
https://huizezhang-sherry.github.io/cubble/
Other
55 stars 9 forks source link

Release cubble 0.3.1 #30

Open huizezhang-sherry opened 2 weeks ago

huizezhang-sherry commented 2 weeks ago

Prepare for release:

Submit to CRAN:

Wait for CRAN...

edzer commented 1 week ago

There must be more to the NEWS.md file than reported: cubble 0.3.1 now breaks a test on package stars, we can no longer roundtrip stars objects with raster geometry:

library(dplyr)

# Attaching package: ‘dplyr’

# The following objects are masked from ‘package:stats’:

#     filter, lag

# The following objects are masked from ‘package:base’:

#     intersect, setdiff, setequal, union

library(cubble)

# Attaching package: ‘cubble’

# The following object is masked from ‘package:stats’:

#     filter

library(units)
# udunits database from /usr/share/xml/udunits/udunits2.xml
library(stars)
# Loading required package: abind
# Loading required package: sf
# Linking to GEOS 3.12.1, GDAL 3.8.4, PROJ 9.3.1; sf_use_s2() is TRUE
#tm = set_units(1:6, "days since 1985-01-01")
tm = Sys.Date() + 1:6
# l7 = st_as_stars(L7_ETMs) |> st_set_dimensions(3, values = Sys.time() + 1:6)
l7 = st_as_stars(L7_ETMs) |> st_set_dimensions(3, values = tm)
l7sub = l7[,1:30,1:30]
cu = as_cubble(l7sub)
s2 = st_as_stars(cu)
# assuming times are identical for all elements in in the ts list column
# expect_equal(l7sub, s2)
l7sub |> dim()
#    x    y band 
#   30   30    6 
s2 |> dim()
# geometry     time 
#      900        6 
all.equal(l7sub, s2, check.attributes=FALSE)
# [1] "Component 1: target is array, current is matrix"

causing errors here. I can switch off this test, but this used to work in cubble 0.3-0; as_cubble.stars seems to be the problem.

huizezhang-sherry commented 1 week ago

Hi Edzer,

I'm submitting a new patch version, 0.3.2, of cubble to CRAN now. With cubble 0.3.2, the failed test in the star pull request should pass.

I can let you know when it is on its way to CRAN.

Regards, Sherry

edzer commented 1 week ago

Thanks, Sherry!