0.13.0.dev7
Pre-releaseChanges in 0.13.0.dev7
Other
-
xcube Server has been enhanced to load multi-module Python code
for dynamic cubes both from both directories and zip archives.
For example, the following dataset definition computes a dynamic
cube from dataset "local" using function "compute_dataset" in
Python module "resample_in_time.py":Path: resample_in_time.py Function: compute_dataset InputDatasets: ["local"]
Users can now pack "resample_in_time.py" among any other modules and
packages into a zip archive. Note that the original module name
is now a prefix to the function name:Path: modules.zip Function: resample_in_time:compute_dataset InputDatasets: ["local"]
Implementation note: this has been achieved by using
xcube.core.byoa.CodeConfig
in
xcube.core.mldataset.ComputedMultiLevelDataset
. -
Instead of the
Function
keyword it is now
possible to use theClass
keyword.
WhileFunction
references a function that receives one or
more datasets (typexarray.Dataset
) and returns a new one,
Class
references a callable that receives one or
more multi-level datasets and returns a new one.
The callable is either a class derived from
or a function that returns an instance of
xcube.core.mldataset.MultiLevelDataset
. -
Module
xcube.core.mldataset
has been refactored into
a sub-package for clarity and maintainability. -
Provided backward compatibility with Python 3.8. (#760)