Changelog

v0.7.0 (2026-06-16)

Contributors: Gabriel Rondeau-Genesse (@RondeauG), Pascal Bourgault (@aulemahal), Éric Dupuis (@coxipi), Juliette Lavoie (@juliettelavoie), Trevor James Smith (@Zeitsperre).

Changes

  • Add max_tail_factor arg to quantile mapping functions. (PR/279, GH/278).

  • Add mult_skip_zeros to detrending classes. (PR/279, GH/289).

  • New example in notebook advanced_example.ipynb showing how to use spectral utils (xsdba.processing.spectral_filter and xsdba.properties.spectral_variance). (GH/247, PR/259, PR/282).

  • QuantileDeltaMapping.adjust now allows using training grouper by setting rank_window to True. (GH/287, PR/288).

  • xsdba.utils.rank accepts a new argument: random_tiebreaking. If set to True, equal values are now ranked with distinct ranks. (GH/182, PR/183).

Breaking changes

  • Default values for frac and power in xsdba.adjustment.ExtremeValues have been changed to ‘0.7’ and ‘3’, respectively. (PR/262).

  • The order of the arguments has been reorganized in xsdba.processing.spectral_filter. (PR/259).

  • delta is no longer computed automatically from the lat or rlat field in xsdba.processing.spectral_filter. (PR/259).

Fixes

  • Fixed property return_value and decorrelation_length for dask inputs. (GH/266, PR/267).

  • Fix adapt_freq processing in training when xsdba.Grouper uses add_dims. (GH/182, PR/183, PR/291).

Internal changes

  • Updated the cookiecutter template to the latest version. (PR/276):
    • Migrated developement-based optional-dependencies to dependency-groups.

    • Sets token-based workflows to run within an automation environment.

    • Updated and synchornized dependencies.

    • pre-commit has been replaced by prek.

    • Makefile now handles some dependency installation logic.

    • tox.ini has been replaced by tox.toml with v4.52.0 standards.

  • Documentation adjustments. (PR/283):
    • Added an acknowledgement statement about Ouranos to the README.rst and the rendered documentation.

    • Added the Ouranos logo with light/dark theme support for furo.

    • Added an intersphinx mapping for xarray objects.

  • xsdba now has guidance documents on acceptable usages of AI and the expected methods of AI usage disclosure. See the documentation for more details. (PR/293).

  • Fast-forwarded the cookiecutter with the latest changes. (PR/293):
    • Adjusted the permissions for some workflows to address security issues.

    • Added the new “standard” AI disclosure guidance for code contributions.

    • Updated the ReadTheDocs configuration to use newer OS and conda images.

    • Modified make servedocs to use sphinx-autobuild (make livehtml).

    • Added guidance for maintainers on git commit signing and immutable releases.

    • Adjusted the source distribution inclusion/exclusion list.

    • Set bump-my-version to sign tags by default.

v0.6.1 (2026-03-03)

Contributors: Éric Dupuis (@coxipi), Trevor James Smith (@Zeitsperre).

Changes

  • Development dependencies now follow the dependency-groups standard (PEP 735). (PR/276).

Fixes

  • Replace deprecated numpy.in1d call with numpy.isin. (GH/260, PR/261).

Internal changes

  • Updated pre-commit hooks and ignored ruff rule D420 due to a bug in its implementation. (PR/263).

v0.6.0 (2026-02-11)

Contributors: Éric Dupuis (@coxipi), Trevor James Smith (@Zeitsperre), Pascal Bourgault (@aulemahal), Juliette Lavoie (@juliettelavoie).

Changes

  • numpy >=1.26 and numba >=0.58.1 are now required. (PR/231).

  • xsdba now officially supports Python 3.14 and pandas >=3.0. (GH/251, :PR/252).

  • xsdba.processing.to_additive_space option clip_next_to_bounds was changed to an optional string with modes: “strict” and “permissive”. The “permissive” mode allows to reduce a larger range of a variable [lower-a, upper+b] to a smaller range ]lower, upper[. The strict mode only allows to change closed bounds [lower, upper] to open bounds ]lower, upper[ (to ensure non-singular behaviour with log / logit transforms). (PR/194).

Fixes

  • xsdba.adjustment.ExtremeValues now throws an error with a clear message when the clustered precipitation exceed 1-q_thresh. This happens when cluster_thresh is too small (still in the bulk of the distribution). (GH/177, PR/184).

  • xsdba.properties.spectral_variance now works with a delta that is not None. (PR/217).

  • xsdba.loess.loess_smoothing fixed for cases when the input has many zeros. (GH/100, PR/208).

  • Fixed an issue with attribute fields added to normalized arrays under newer xarray versions. (PR/223).

  • xsdba.processing.spectral_filter now works with a lambda_long and lambda_short that are not None. (PR/220).

  • Prepend history of operations within dataset attributes instead of appending them. (PR/238).

  • xsdba._processing._adapt_freq now avoids inserting nans. This was solved using (dP0 <= 0)| (dP0.isnull()) and not dP0 < 0 as a condition. (PR/239, GH/248, PR/249).

  • More edge cases and compatibility with numpy <2.0 were fixed to ensure xsdba.processing.to_additive_space does not yield singular values in the log / logit transforms in relation with the machine resolution. (PR/194).

  • xsdba.properties.decorrelation_length now handles all-nan slices correctly. (GH/255, PR/256).

Internal changes

  • Removed the benchmark.ipynb notebook from the documentation as it was specifically written for benchmarking purposes. (GH/167, PR/206).

  • Removed the API references to ensure that the documentation favours the user guide for learning how to use xsdba and the module index for finding specific functions/classes. (GH/63, PR/206)

  • Adjusted docstrings to allow flake8 violations (RST210 and RST213; ** and * syntax) in docstrings and pylint exceptions for titles with underbars. (GH/167, PR/206)

  • Updated the cookiecutter template to use the latest version of cookiecutter-pypackage. (PR/205):
    • Added a CITATION.cff file for better citation metadata.

    • Replace black, blackdocs and isort pre-commit hooks with ruff.

    • Updated Contributor Covenant Agreement to v3.0.

    • Various updates to CI dependencies and configurations.

  • The minimum supported pytest is now v9.0 and above. pytest conventions and configurations have been updated to use the new TOML format. (PR/231).

  • Many DeprecationWarning API changes from dependencies have been addressed. (PR/250):
    • Replaced xarray.cftime_range with xarray.date_range(…, use_cftime=True).

    • Import check for numpy.trapezoid (replacement of numpy.trapz).

    • Refactored grouped_time_indexes to use GroupBy.map instead of GroupBy.apply.

v0.5.0 (2025-07-21)

Contributors: Trevor James Smith (@Zeitsperre), Éric Dupuis (@coxipi), Juliette Lavoie (@juliettelavoie), Pascal Bourgault (@aulemahal).

Changes

  • Make additional grouping dimensions optional for methods accepting the group argument, except Loci and PrincipalComponents. (GH/99, GH/144, PR/151).

  • Speed up import by activating cache=True for in numba-accelerated functions from xsdba.nbutils. (PR/135).

  • Added a new installation recipe (pip install xsdba[sbck]) for installing the SBCK package. (PR/139):
    • Note that SBCK support is experimental and that the pybind11 library must be installed prior to installing SBCK.

  • New functions related to spectral properties in Fourier space:
    • Perform a spectral filter with xsdba.processing.spectral_filter with a low-pass filter with a cosine-squared profile by default. (PR/88).

    • New spatial diagnostic to compute the spectral variance of a given field xsdba.properties.spectral_variance. (PR/88).

  • xsdba.units.convert_units_to now wraps a private function _convert_units_to. (PR/145).

  • xsdba.jitter_over_thresh is available directly in training methods by passing the jitter_over_thresh_value and jitter_over_thresh_upper_bnd arguments. (PR/110).

  • Throw an error if group=Grouper(‘5D’,window) is used with a biasadjust method other than MBCn.

  • xsdba.processing.to_additive_space accepts clip_next_to_bounds, which avoids infinities by ensuring lower_bound < data < upper_bound. (GH/164, PR/165).

  • Allow nan values in xsdba.measures.rmse and xsdba.measures.mae. (PR/170).

  • The adaptation of frequencies through adapt_freq_thresh_value is now applied in the adjusting step as well. (PR/160).

  • xsdba.adjustment.ExtremeValues now accepts a DataArray for cluster_thresh, letting specify distinct thresholds for multiple locations. (GH/177, PR/179).

  • Updated minimum supported versions of SBCK (v1.4.2) and numpy (v1.25). (PR/180).

Fixes

  • Fix xsdba.base.get_coordinates to avoid using a private xarray function.(PR/147, GH/148).

  • Fix xsdba.processing.from_additive_space to handles units correctly by using convert_units_to instead of harmonize_units. (PR/146).

  • Fix the order of clip_next_to_bounds in xsdba.processing.to_additive_space. (PR/169).

Internal changes

  • The tox and CI configurations now support the installation of SBCK and Eigen3 for testing purposes. (PR/139).

  • The coveralls tox keyword has been renamed to coverage to avoid confusion with the coveralls service. (PR/139).

  • The order of arguments in the following private functions was changed: xsdba._adjustment.{_fit_on_cluster,_fit_cluster_and_cdf, _extremes_train_1d}.

  • Updated the package metadata to reflect development progress and list user @aulemahal as a primary developer (PR/180).

v0.4.0 (2025-04-03)

Contributors: Trevor James Smith (@Zeitsperre), Jan Haacker (@j-haacker), Éric Dupuis (@coxipi).

Changes

  • xsdba now supports Python3.13. Metadata and CI have been adjusted. (PR/105).

  • Unpinned numpy and raised minimum supported versions of a few scientific libraries. (PR/105).

  • More code that needed to be ported from xclim has been added. This includes mainly documentation, as well as testing utilities and a benchmark notebook. (PR/107).

Fixes

  • For fastnanquantile, POT, and xclim have been added to a new extras install recipe. All dependencies can be installed using the $ python -m pip install xsdba[all] command. Documentation has been added. (PR/105).

  • Several small dask-related issues (chunking behaviour, dimension order when broadcasting variables, lazy array preservation) have been fixed. (GH/112, GH/113, PR/114).

  • xsdba.processing.escore now correctly handles all-nan slices. (GH/109, PR/108).

  • xsdba now uses directly operator instead of using xarray’s derived get_op function. A refactoring in xarray had changed the position of get_op which caused a bug. (PR/120).

  • For more than 1000 quantiles, fastnanquantile is not used anymore, as it would throw an error. (GH/119, PR/123).

  • Grouper now throws an error if group=’time’ is used with window>1. (GH/104, PR/122).

  • Slightly reduce “maximum” in jitter to fix dtype conversion issue. (GH/124, PR/125).

Internal changes

  • tox has been configured to test Python3.10 builds against numpy >=1.24.0,<2.0 in the GitHub Workflow pipeline. Passing the numpy keyword to tox ($ tox -e py3.10-numpy) will adjust the build. (PR/105).

  • Authorship and Zenodo metadata have been updated. Order of contributions is now developers followed by contributors in alphabetical order. (PR/116).

  • MBCn.adjust now re-performs the check on ref and hist to ensure they have compatible time arrays (the check is done a second time in adjust since ref and hist are given again). (PR/118).

  • Updated docs dependencies to use sphinx>=8.2.2. (PR/133).

v0.3.2 (2025-03-06)

Contributors: Trevor James Smith (@Zeitsperre).

Fixes

  • Packaging and security adjustments. (PR/106):
    • Added deptry, codespell, vulture, and yamllint to the dev dependencies.

    • Added a few transitive dependencies (packaging, pandas) to the core dependencies.

    • Added fastnanquantile to the dev dependencies (to be placed in an extras recipe for xsdba v0.4.0+).

    • Configured deptry to handle optional imports.

    • A new Makefile command lint/security has been added (called when running $ make lint).

    • Updated tox.ini with new linting dependencies.

v0.3.1 (2025-03-04)

Contributors: Trevor James Smith (@Zeitsperre).

Changes

  • Added POT to the development dependencies. (PR/96).

Fixes

  • Adjusted the documentation dependencies and the sphinx configuration to fix the ReadTheDocs build. (PR/96).

v0.3.0 (2025-03-04)

Contributors: Pascal Bourgault (@aulemahal), Éric Dupuis (@coxipi), Trevor James Smith (@Zeitsperre).

Announcements

  • xsdba is now available as a package on the Anaconda conda-forge channel. (PR/82).

Changes

  • Remove the units registry declaration and instead use whatever is set as pint’s application registry. Code still assumes it is a registry based upon the one in cf-xarray (which exports the cf formatter). (GH/44, PR/57).

  • Updated the cookiecutter template to use the latest version of cookiecutter-pypackage. (PR/71):
    • Python and GitHub Actions versions have been updated.

    • Now using advanced CodeQL configuration.

    • New pre-commit hooks for vulture (find dead code), codespell (grammatical errors), zizmor (workflow security), and gitleaks (token commit prevention).

    • Corrected some minor spelling and security issues.

  • Added upstream testing to the CI pipeline for both daily and push events. (PR/61).

  • Import last changes in xclim before the embargo (PR/80).

  • xsdba has begun the process of adoption of the OpenSSF Best Practices checklist. (PR/82).

  • xclim migration guide added. (GH/62, PR/86).

  • Add a missing dOTC example to documentation. (PR/86).

  • Add a new grouping method specific for MBCn which called by passing group=Grouper(“5D”, window=n) where n is an odd positive integer. (PR/79).

Fixes

  • Gave credits to the package to all previous contributors of xclim.sdba. (GH/58, PR/59).

  • Pin sphinx-codeautolink to fix ReadTheDocs and correct some docs errors. (PR/40).

  • Removed reliance on the netcdf4 package for testing purposes. The h5netcdf engine is now used for file IO operations. (PR/71).

  • Changes to reflect the change of library name xsdba. (PR/72).

  • Revert changes to allow using group=”time.dayofyear” and interp=”linear” in adjustment methods. (PR/86).

v0.2.0 (2025-01-09)

Contributors: Éric Dupuis (@coxipi), Trevor James Smith (@Zeitsperre).

Changes

  • Split sdba from xclim into its own standalone package. Where needed, some common functionalities were duplicated: (PR/8)
    • xsdba.units is an adaptation of the xclim.core.units modules.

    • Many functions and definitions found in xclim.core.calendar have been adapted to xsdba.base.

  • Dependencies have been updated to reflect the new package structure. (PR/45).

  • Updated documentation configuration: (PR/46)
    • Significant improvements to the documentation content and layout.

    • Now using the furo theme for sphinx.

    • Notebooks are now linted and formatted with nbstripout and nbqa-black.

    • CSS configurations have been added for better rendering of the documentation and logos.

  • Added the vulture linter (for identifying dead code) to the pre-commit configuration. (PR/46).

v0.1.0

Contributors: Trevor James Smith (@Zeitsperre)

Changes

  • First release on PyPI.