0.9.0
Changes in 0.9.0
New features
-
The implementations of the default data stores
s3
,directory
,
andmemory
have been replaced entirely by a new implementation
that utilize the fsspec
Python package. The preliminary filesystem-based data stores
are nows3
,file
, andmemory
. All share a common implementations
and tests. Others filesystem-based data stores can be added easily
and will follow soon, for examplehdfs
.
All filesystem-based data stores now support xarray
datasets (typexarray.Dataset
) in Zarr and NetCDF format as
well as image pyramids (typexcube.core.multilevel.MultiLevelDataset
)
using a Zarr-based multi-level format. (#446) -
Several changes became necessary on the xcube Generator
packagexcube.core.gen2
and CLIxcube gen2
.
They are mostly not backward compatible:- The only supported way to instantiate cube generators is the
CubeGenerator.new()
factory method. CubeGenerator.generate_cube()
andCubeGenerator.get_cube_info()
both now receive the request object that has formerly been passed
to the generator constructors.- The
CubeGenerator.generate_cube()
method now returns a
CubeGeneratorResult
object rather than a simple string
(the writtendata_id
). - Empty cubes are no longer written, a warning status is
generated instead. - The xcube gen2 CLI
xcube gen2
has a new option--output RESULT
to write the result to a JSON file. If it is omitted,
the CLI will dump the result as JSON to stdout.
- The only supported way to instantiate cube generators is the
-
Numerous breaking changes have been applied to this version
in order to address generic resampling (#391), to support other
CRS than WGS-84 (#112), and to move from the struct data cube
specification to a more relaxed cube convention (#488):- The following components have been removed entirely
- module
xcube.core.imgeom
with classImageGeom
- module
xcube.core.geocoding
with classGeoCoding
- module
xcube.core.reproject
and all its functions
- module
- The following components have been added
- module
xcube.core.gridmapping
with new classGridMapping
is a CF compliant replacement for classesImageGeom
andGeoCoding
- module
- The following components have changed in an incompatible way:
- Function
xcube.core.rectify.rectify_dataset()
now uses
source_gm: GridMapping
andtarget_gm: GridMapping
instead of
geo_coding: GeoCoding
andoutput_geom: ImageGeom
. - Function
xcube.core.gen.iproc.InputProcessor.process()
now uses
source_gm: GridMapping
andtarget_gm: GridMapping
instead of
geo_coding: GeoCoding
andoutput_geom: ImageGeom
.
- Function
- xcube no longer depends on GDAL (at least not directly).
- The following components have been removed entirely
-
Added a new feature to xcube called "BYOA" - Bring your own Algorithm.
It is a generic utility that allows for execution of user-supplied
Python code in both local and remote contexts. (#467)
The newxcube.core.byoa
package hosts the BYOA implementation and API.
The entry point to the functionality is thexcube.core.byoa.CodeConfig
class. It is currently utilized by the xcube Cube Generator that can now
deal with an optionalcode_config
request parameter. If given,
the generated data cube will be post-processed by the configured user-code.
The xcube Cube Generator with the BYOA feature is made available through the- Generator API
xcube.core.gen2.LocalCubeGenerator
and
xcube.core.gen2.service.RemoteCubeGenerator
; - Generator CLI
xcube gen2
.
- Generator API
-
A dataset's cube subset and its grid mapping can now be accessed through
thexcube
property ofxarray.Dataset
instances. This feature requires
importing thexcube.core.xarray
package. Letdataset
be an
instance ofxarray.Dataset
, thendataset.xcube.cube
is axarray.Dataset
that contains all cube
variables ofdataset
, namely the ones with dimensions
("time", [...,], y_dim_name, x_dim_name)
, wherey_dim_name
,
x_dim_name
are determined by the dataset's grid mapping.
May be empty, ifdataset
has no cube variables.dataset.xcube.gm
is axcube.core.gridmapping.GridMapping
that
describes the CF-compliant grid mapping ofdataset
.
May beNone
, ifdataset
does not define a grid mapping.dataset.xcube.non_cube
is axarray.Dataset
that contains all
variables ofdataset
that are not indataset.xcube.cube
.
May be same asdataset
, ifdataset.xcube.cube
is empty.
-
Added a new utility module
xcube.util.temp
that allows for creating
temporary files and directories that will be deleted when the current
process ends. -
Added function
xcube.util.versions.get_xcube_versions()
that outputs the versions of packages relevant for xcube.
Also added a new CLIxcube versions
that outputs the result of the
new function in JSON or YAML. (#522)
Other
-
The xcube cube generator (API
xcube.core.gen2
, CLIxcube gen2
)
will now write consolidated Zarrs by default. (#500) -
xcube now issues a warning, if a data cube is opened from object
storage, and credentials have neither been passed nor can be found,
and the object storage has been opened with the defaultanon=False
. (#412) -
xcube no longer internally caches directory listings, which prevents
the situation where a data cube that has recently been written into object
storage cannot be found. -
Removed example notebooks that used hard-coded local file paths. (#400)
-
Added a GitHub action that will run xcube unit tests, and build and
push Docker images. The version tag of the image is eitherlatest
when
the master changed or equals the release tag. -
Removed warning
module 'xcube_xyz' looks like an xcube-plugin but lacks a callable named 'init_plugin
. -
Fixed an issue where
xcube serve
provided wrong layer source options for
OpenLayers XYZ
when latitude coordinates where increasing with the coordinate index. (#251) -
Function
xcube.core.normalize.adjust_spatial_attrs()
no longer removes
existing global attributes of the formgeospatial_vertical_<property>
. -
Numerous classes and functions became obsolete in the xcube 0.9
code base and have been removed, also because we believe there is
quite rare outside use, if at all.Removed from
xcube.util.tiledimage
:- class
DownsamplingImage
- class
PilDownsamplingImage
- class
NdarrayDownsamplingImage
- class
FastNdarrayDownsamplingImage
- class
ImagePyramid
- function
create_pil_downsampling_image()
- function
create_ndarray_downsampling_image()
- function
downsample_ndarray()
- functions
aggregate_ndarray_xxx()
Removed from
xcube.util.tilegrid
:- functions
pow2_2d_subdivision()
- functions
pow2_1d_subdivision()
- class