Skip to content

v0.10.0

Compare
Choose a tag to compare
@github-actions github-actions released this 30 Sep 19:33
· 189 commits to main since this release
4f5ffdf

v0.10.0 (2024-09-30)

Contributors to this version: Juliette Lavoie (@juliettelavoie), Pascal Bourgault (@aulemahal), Gabriel Rondeau-Genesse (@RondeauG), Trevor James Smith (@Zeitsperre).

New features and enhancements

  • The mask argument in stack_drop_nans can now be a list of dimensions. In that case, a dropna(how='all') operation will be used to create the mask on-the-fly. (PR/450).
  • Few changes to clean_up:
    • The convert_calendar function now uses xarray instead of xclim. (PR/450).
    • The attrs_to_remove and remove_all_attrs_except arguments now use real regex. (PR/450).
    • Multiple entries can now be given for change_attr_prefix. (PR/450).
  • minimum_calendar now accepts a list as input. (PR/450).
  • More calendars are now recognized in translate_time_chunk. (PR/450).
  • new_dim in unstack_dates is now None by default and changes depending on the frequency. It becomes month if the data is exactly monthly, and keep the old default of season otherwise. (PR/450).
  • Updated the list of libraries in show_versions to reflect our current environment. (PR/450).
  • New xscen.catutils.patterns_from_schema to generate all possible patterns from a given schema (or one of xscen's default), to use with :py:func:parse_directory. (PR/431).
  • New DataCatalog.copy_files to copy all files of catalog to a new destination, unzipping if needed and returning a new catalog. (PR/431).
  • Convenience functions xs.io.zip_directory and xs.io.unzip_directory (for zarrs). (PR/431).
  • New argument compute_indicators: rechunk_input to rechunk the inputs to resample-appropriate chunks before calling xclim. (PR/431).
  • New xs.indicators.get_indicator_outputs to retrieve what variable name(s) and frequency to expect from an xclim indicator. (PR/431).
  • xscen now supports launches tests from pytest with the --numprocesses option. See the pytest-xdist documentation <https://pytest-xdist.readthedocs.io/en/stable/>_ for more information. (PR/464).
  • Conservative regridding now supports oblique mercator projections. (PR/467).
  • The automatic name for the weight file in regrid_dataset is now more explicit to avoid errors, but now requires cat:id and cat:domain arguments for both the source and target datasets. (PR/467).

Bug fixes

  • Fixed bug with reusing weights. (GH/411, PR/414).
  • Fixed bug in update_from_ds when "time" is a coordinate, but not a dimension. (:pull: 417).
  • Avoid modification of mutable arguments in search_data_catalogs (PR/413).
  • ensure_correct_time now correctly handles cases where timesteps are missing. (PR/440).
  • If using the argument tile_buffer with a shape method in spatial.subset, the shapefile will now be reprojected to a WGS84 grid before the buffer is applied. (PR/440).
  • maybe_unstack now works if the dimension name is not the default. (PR/450).
  • unstack_fill_nan now works if given a dictionary that contains both dimensions and coordinates. (PR/450).
  • clean_up no longer modifies the original dataset. (PR/450).
  • unstack_dates now works correctly for yearly datasets when winter_starts_year=True, as well as multi-year datasets. (PR/450).
  • Fix xs.catalog.concat_data_catalogs for catalogs that have not been search yet. (PR/431).
  • Fix indicator computation using freq=2Q* by assuming this means a semiannual frequency anchored at the given month (pandas assumes 2 quarter steps, any of them anchored at the given month). (PR/431).
  • create_bounds_rotated_pole now uses the default value if the dataset has no north_pole_grid_longitude attribute, instead of crashing. (PR/455).
  • Rewrote the global tas data file with latest HDF5/h5py to avoid errors when using h5py 3.11 and hdf5 1.14.2. (PR/1861).
  • Remove reference of deprecated xclim functions (convert_calendar, get_calendar) and adapt the code for supporting xclim 0.52.2 and its subsequent development version. (PR/465).

Breaking changes

  • convert_calendar in clean_up now uses xarray instead of xclim. Keywords aren't compatible between the two, but given that xclim will abandon its function, no backwards compatibility was sought. (PR/450).
  • attrs_to_remove and remove_all_attrs_except in clean_up now use real regex. It should not be too breaking since a fullmatch() is used, but * is now .*. (PR/450).
  • Python 3.9 is no longer supported. (PR/456).
  • Functions and arguments that were deprecated in xscen v0.8.0 or earlier have been removed. (PR/461).
  • pytest-xdist is now a development dependency. (PR/464).
  • xs.regrid.create_bounds_rotated_pole has been renamed to xs.regrid.create_bounds_gridmapping. (PR/467).
  • The weights_location argument in regrid_dataset is no longer positional. (PR/467).
  • The xs.regrid.create_mask function now requires explicit arguments instead of a dictionary. (PR/467).

Internal changes

  • DataCatalog.to_dataset can now accept a preprocess argument even if create_ensemble_on is given. The user assumes calendar handling. (PR/431).
  • Include domain in weight_location in regrid_dataset. (PR/414).
  • Added pins to xarray, xclim, h5py, and netcdf4. (PR/414).
  • Add .zip and .zarr.zip as possible file extensions for Zarr datasets. (PR/426).
  • Explicitly assign coords of multiindex in xs.unstack_fill_nan. (PR/427).
  • French translations are compiled offline. A new check ensures no PR are merged with missing messages. (GH/342, PR/443).
  • Continued work to add tests. (PR/450).
  • Updated the cookiecutter template via cruft: (PR/452)
    • GitHub Workflows that use rely on PyPI-based dependencies now use commit hashes.
    • Dependabot will now group updates by type.
    • Dependencies have been updated and synchronized.
    • Contributor guidance documentation has been adjusted.
    • numpydoc-validate has been added to the linting tools.
    • Linting checks are more reliant on ruff suggestions and stricter.
    • flake8-alphabetize has been replaced by ruff.
    • License information has been updated in the library top-level __init__.py.
  • Docstrings have been adjusted to meet the numpydoc standard. (PR/452).

CI changes

  • The bump-version.yml workflow now uses the Ouranosinc GitHub Helper Bot to sign bump version commits. (PR/462).