Skip to content

Releases: xcube-dev/xcube

1.6.0

24 Jun 10:10
Compare
Choose a tag to compare

New Contributors

Changes in 1.6.0

Full Changelog: v1.5.1...v1.6.0

Enhancements

  • Includes new xcube Viewer 1.2

  • Added new statistics API to xcube server. The service computes basic
    statistical values and a histogram for given data variable, time stamp,
    and a GeoJSON geometry. Its endpoint is:
    /statistics/{datasetId}/{varName}?time={time}. Geometry is passed as
    request body in form of a GeoJSON geometry object.

  • xcube server's tile API can now handle user-defined colormaps from xcube
    viewer. Custom color bars are still passed using query parameter cmap to
    endpoint /tiles/{datasetId}/{varName}/{z}/{y}/{x},
    but in the case of custom color bars it is a JSON-encoded object with the
    following format: {"name": <str>, "type": <str>, "colors": <list>}. (#975)
    The object properties are

    • name: a unique name.
    • type: optional type of control values.
    • colors: a list of pairs [[<v1>,<c1>], [<v2>,<c2>], [<v3>,<c3>], ...]
      that map a control value to a hexadecimal color value using CSS format
      "#RRGGBBAA".

    The type values are

    • "node": control points are nodes of a continuous color gradient.
    • "bound": control points form bounds that map to a color, which means
      the last color is unused.
    • "key": control points are keys (integers) that identify a color.
  • xcube server's tile API now allows specifying the data normalisation step
    before a color mapping is applied to the variable data to be visualized.
    This affects endpoint /tiles/{datasetId}/{varName}/{z}/{y}/{x} and the WMTS
    API. The possible normalisation values are

    • lin: linear mapping of data values between vmin and vmax to range 0 to 1
      (uses matplotlib.colors.Normalize(vmin, vmax)).
    • log: logarithmic mapping of data values between vmin and vmax to range 0 to 1
      (uses matplotlib.colors.LogNorm(vmin, vmax)).
    • cat: categorical mapping of data values to indices into the color mapping.
      (uses matplotlib.colors.BoundaryNorm(categories)). This normalisation
      currently only works with user-defined colormaps of type
      key or bound (see above).

    The normalisation can be specified in three different ways (in order):

    1. As query parameter norm passed to the tile endpoint.
    2. Property Norm in the Styles/ColorMapping element in xcube server configuration.
    3. Data variable attribute color_norm.
  • xcube server can now read SNAP color palette definition files (*.cpd) with
    alpha values. (#932)

  • The class xcube.webapi.viewer.Viewer now accepts root paths or URLs that
    will each be scanned for datasets. The roots are passed as keyword argument
    roots whose value is a path or URL or an iterable of paths or URLs.
    A new keyword argument max_depth defines the maximum subdirectory depths
    used to search for datasets in case roots is given. It defaults to 1.

  • The behaviour of function resample_in_space() of module
    xcube.core.resampling changed in this version. (#1001)

    1. A new keyword argument ref_ds can now be used to provide
      a reference dataset for the reprojection. It can be passed instead
      of target_rm. If ref_ds is given, it also forces the returned target
      dataset to have the same spatial coordinates as ref_ds.
    2. In the case of up-sampling, we no longer recover NaN values by default
      as it may require considerable CPU overhead.
      To enforce the old behaviour, provide the var_configs keyword-argument
      and set recover_nan to True for desired variables.
  • The class MaskSet() of module xcube.core.maskset now correctly recognises
    the variable attributes flag_values, flag_masks, flag_meanings when
    their values are lists (ESA CCI LC data encodes them as JSON arrays). (#1002)

  • The class MaskSet() now provides a method get_cmap() which creates
    a suitable matplotlib color map for variables that define the
    flag_values CF-attribute and optionally a flag_colors attribute. (#1011)

  • The Api.route decorator and ApiRoute constructor in
    xcube.server.api now have a slash argument which lets a route support an
    optional trailing slash.

Fixes

  • When using the xcube.webapi.viewer.Viewer class in Jupyter notebooks
    multi-level datasets opened from S3 or from deeper subdirectories into
    the local filesystem are now fully supported. (#1007)

  • Fixed an issue with xcube server /timeseries endpoint that returned
    status 500 if a given dataset used a CRS other geographic and the
    geometry was not a point. (#995)

  • Fixed broken table of contents links in dataset convention document.

  • Web API endpoints with an optional trailing slash are no longer listed
    twice in the automatically generated OpenAPI documentation (#965)

  • Several minor updates to make xcube compatible with NumPy 2.0.0 (#1024)

Incompatible API changes

  • The get_cmap() method of util.cmaps.ColormapProvider now returns a
    Tuple[matplotlib.colors.Colormap, Colormap] instead of
    Tuple[str, matplotlib.colors.Colormap].

  • The signatures of functions resample_in_space(), rectify_dataset(), and
    affine_transform_dataset() of module xcube.core.resampling changed:

    • Source dataset must be provided as 1st positional argument.
    • Introduced keyword argument ref_ds that can be provided instead of
      target_gm. If given, it forces the returned dataset to have the same
      coordinates as ref_ds.
  • Removed API deprecated since many releases:

    • Removed keyword argument base from function
      xcube.core.resampling.temporal.resample_in_time().
    • Removed option base from CLI command xcube resample.
    • Removed keyword argument assert_cube from
      xcube.core.timeseries.get_time_series().
    • Removed property xcube.core.xarray.DatasetAccessor.levels.
    • Removed function xcube.core.tile.parse_non_spatial_labels().
    • Removed keyword argument tag from context manager
      xcube.util.perf.measure_time().
    • Removed function xcube.core.geom.convert_geometry().
    • Removed function xcube.core.geom.is_dataset_y_axis_inverted().
    • Removed function xcube.util.assertions.assert_condition().
    • Removed function xcube.util.cmaps.get_cmaps().
    • Removed function xcube.util.cmaps.get_cmap().
    • Removed function xcube.util.cmaps.ensure_cmaps_loaded().
    • Removed endpoint /datasets/{datasetId}/vars/{varName}/tiles2/{z}/{y}/{x}
      from xcube server.

Other changes

  • Make tests compatible with PyTest 8.2.0. (#973)

  • Addressed all warnings from xarray indicating that Dataset.dims will
    be replaced by Dataset.sizes. (#981)

  • NUMBA_DISABLE_JIT set to 0 to enable numba.jit in github workflow. (#946)

  • Added GitHub workflow to perform an automatic xcube release on PyPI after a GitHub
    release. To install xcube via the pip tool use pip install xcube-core,
    since the name "xcube" is already taken on PyPI by another software. (#982)

  • Added project URLs and classifiers to setup.py, which will be shown in the
    left sidebar on the PyPI xcube-core webpage.

  • Refactored xcube workflow to build docker images only on release and deleted the
    update xcube tag job.

  • Used pyupgrade to automatically upgrade
    language syntax for Python versions >= 3.9.

  • Migrated the xcube project setup from setup.py to the modern pyproject.toml format.

  • The functions mask_dataset_by_geometry() and clip_dataset_by_geometry()
    of module xcube.core.geom have a new keyword argument
    update_attrs: bool = True as part of the fix for #995.

  • Decreased number of warnings in the xcube workflow step unittest-xcube.

  • Added new data store "https" that uses
    fsspec.implementations.http.HTTPFileSystem),
    so that the upcoming xcube STAC data store will be able to access files from URLs.

  • The workflow .github/workflows/xcube_publish_pypi.yml changes the line in the pyproject.toml, where
    the package name is defined to name = "xcube-core". This allows to release xcube under
    the package name "xcube-core" on PyPI where the name "xcube" is already taken. #1010

  • Updated the 'How do I ...' page in the xcube documentation.

v1.6.0.dev4

10 Jun 06:55
Compare
Choose a tag to compare
v1.6.0.dev4 Pre-release
Pre-release
  • Get color mapping for variables with flag_values attribute by @forman in #1012
  • Dynamical xcube package name; xcube used for local install, xcube-core used for PyPI by @konstntokas in #1010
  • Renamed new target_ds into ref_ds; added missing tests by @forman in #1009; follow up for #1003
  • Fix adding ml-datasets from S3 to viewer in JL by @forman in #1008 fixing #1007

1.6.0.dev3

06 Jun 09:06
70b57a0
Compare
Choose a tag to compare
1.6.0.dev3 Pre-release
Pre-release

What's Changed

  • Update to modern Python project setup (setup.py to pyproject.toml) by @konstntokas in #992
  • Fixed server /timeseries endpoint by @forman in #997
  • Remove warnings emitted during GH actions by @konstntokas in #988
  • Updates in xcube needed for xcube-stac plugin to deal with data access via urls by @konstntokas in #999
  • New function list_data_store_ids() by @forman in #994
  • Allow passing roots to xcube.webapi.viewer.Viewer by @forman in #991
  • New server statistics endpoint by @forman in #998
  • Support flag_values as list by @forman in #1004
  • Address issues with resample_in_space() by @forman in #1003

Full Changelog: v1.6.0.dev2...v1.6.0.dev3

1.6.0.dev2

30 May 09:49
Compare
Choose a tag to compare

1.6.0.dev1

24 May 11:55
Compare
Choose a tag to compare

1.6.0.dev0

24 May 10:24
Compare
Choose a tag to compare

1.5.1

12 Apr 13:42
7f715dc
Compare
Choose a tag to compare

Enhancements

Fixes

  • Fixed xcube plugin auto-recognition in case a plugin project uses pyproject.toml file. (#963)
  • Updated copyright notices in all source code files.

New Contributors

Full Changelog: v1.5.0...v1.5.1

1.5.0

09 Apr 10:30
7d7a23f
Compare
Choose a tag to compare
  • Enhanced spatial resampling in module xcube.core.resampling (#955):

    • Added optional keyword argument interpolation to function rectify_dataset() with values "nearest", "triangular", and "bilinear" where "triangular" interpolates between 3 and "bilinear" between 4 adjacent source pixels.
    • Function rectify_dataset() is now ~2 times faster by early detection of already transformed target pixels.
    • Added a documentation page that explains the algorithm used in rectify_dataset().
    • Added optional keyword argument rectify_kwargs to resample_in_space(). If given, it is spread into keyword arguments passed to the internal rectify_dataset() delegation, if any.
    • Deprecated unused keyword argument xy_var_names of function rectify_dataset().
  • Replace use of deprecated method in testing module. (#961)

  • Update dependencies to better match imports; remove the defaults channel; turn adlfs into a soft dependency. (#945)

  • Reformatted xcube code base using black default settings. It implies a line length of 88 characters and double quotes for string literals. Also added .editorconfig for IDEs not recognising black's defaults.

  • Renamed xcube's main branch from master to main on GitHub.

  • xcube's code base changed its docstring format from reST style to the much better readable Google style. Existing docstrings have been converted using the awesome docconvert tool.

  • Add a data_vars_only parameter to chunk_dataset and update_dataset_chunk_encoding (#958).

  • Update some unit tests to make them compatible with xarray 2024.3.0 (#958).

Full Changelog: v1.4.1...v1.5.0

1.4.1

11 Mar 17:17
Compare
Choose a tag to compare

Enhancements

  • Data stores can now return data iterators from their open_data() method.
    For example, a data store implementation can now return a data cube either
    with a time dimension of size 100, or could be asked to return 100 cube
    time slices with dimension size 1 in form of an iterator.
    This feature has been added to effectively support the new
    zappend tool. (#919)

Fixes

  • Fix two OGC Collections unit tests that were failing under Windows. (#937)

Other changes

  • Minor updates to make xcube compatible with pandas 2 and Python 3.12. (#933)

  • Minor updates to make xcube compatible with xarray >=2023.9.0. (#897, #939)

1.4.0

28 Feb 11:06
ad7adad
Compare
Choose a tag to compare

Enhancements

  • Added new reference filesystem data store to support "kerchunked" NetCDF files in object storage. (#928)

    See also

  • Improved xcube Server's STAC API:

    • Provide links for multiple coverages data formats
    • Add crs and crs_storage properties to STAC data
    • Add spatial and temporal grid data to collection descriptions
    • Add a schema endpoint returning a JSON schema of a dataset's data
      variables
    • Add links to domain set, range type, and range schema to collection
      descriptions
  • Improved xcube Server's Coverages API:

    • Support scaling parameters scale-factor, scale-axes, and scale-size
    • Improve handling of bbox parameters
    • Handle half-open datetime intervals
    • More robust and standard-compliant parameter parsing and checking
    • More informative responses for incorrect or unsupported parameters
    • Omit unnecessary dimensions in TIFF and PNG coverages
    • Use crs_wkt when determining CRS, if present and needed
    • Change default subsetting and bbox CRS from EPSG:4326 to OGC:CRS84
    • Implement reprojection for bbox
    • Ensure datetime parameters match dataset’s timezone awareness
    • Reimplement subsetting (better standards conformance, cleaner code)
    • Set Content-Bbox and Content-Crs headers in the HTTP response
    • Support safe CURIE syntax for CRS specification

Fixes

  • Fixed KeyError: 'lon_bnds' raised occasionally when opening
    (mostly NetCDF) datasets. (#930)
  • Make S3 unit tests compatible with moto 5 server. (#922)
  • Make some CLI unit tests compatible with pytest 8. (#922)
  • Rename some test classes to avoid spurious warnings. (#924)

Other changes

  • Require Python >=3.9 (previously >=3.8)

Full Changelog: v1.3.1...v1.4.0