Recent Releases of xHydro
xHydro - v0.6.1
Changelog
v0.6.1 (2025-10-22)
Contributors to this version: Gabriel Rondeau-Genesse (@RondeauG), Trevor James Smith (@Zeitsperre).
Bug fixes
- Fixed a compatibility issue with
xarray >=2025.9.1inxhfa.regional.fit_pca. (PR/355). - Fixed a bug where the process would hang indefinitely on Windows systems when calling hydrological models through command line arguments. (PR/358, PR/363).
- The long_name and description attributes of the
qvariable in Hydrotel outputs have been slightly modified to matchRavenPyoutputs. (PR/358).
Internal changes
- Updated minimum
numpyto v1.25+ and adjustedtoxconfiguration to recompile theh5pylibrary in order to deal with compatibility problems from pre-compiled wheels. (PR/357). - Updated the cookiecutter template to the latest commit. (PR/358):
black,blackdocandisorthave been dropped for modernruff.- Some development dependencies have been updated to their latest versions.
- Contributor Covenant Agreement has been updated to v3.0.
- Added a CITATION.cff file to the repository.
- License metadata now follows PEP 639 conventions.
- Linting hooks are slightly more strict.
Hydrosphere - Freshwater and Hydrology
- Python
Published by Zeitsperre 4 months ago
xHydro - v0.6.0
Changelog
v0.6.0 (2025-09-22)
Contributors to this version: Louise Arnal (@lou-a), Thomas-Charles Fortier Filion (@TC-FF), Gabriel Rondeau-Genesse (@RondeauG), Julián Ospina (@ospinajulian).
New features and enhancements
- Added a configuration for the Raven model in
xhydro.modelling.format_input. (PR/257). - Generalization of
xhydro.frequency_analysis.uncertainties.calc_q_iter. (PR/282). - New function
xh.gis.watershed_to_raven_hruto extract HRU information from a watershed. (PR/303). - The
RavenpyModelclass now has ahruargument, to either provide the old HRU arguments (but now under a dictionary) or a GeoDataFrame with the HRU information. (GH/266, PR/303, PR/339). - The
RavenpyModelclass no longer writes new*.rv*files if they already exist. Additionally, a.create_rv()method has been added to the class to write the files. (PR/303). - The
RavenpyModelclass now accepts meteorological data in the form of a single station, multiple stations, or a 2D grid. (PR/303). - The
RavenpyModelclass now supports distributed HBVEC models. (PR/339). - Two new functions,
update_dataandupdate_config, have been added to theRavenpyModelclass to facilitate updating the model with new data and configuration options. (PR/341, PR/345). - A
executableargument has been added to theRavenpyModelclass to specify a custom path to the Raven executable. (PR/341). - A
gridweightsargument has been added to theRavenpyModelclass to specify a custom path to a grid weights file when using gridded meteorological data. (PR/344). - The
qobsandalt_name_flowarguments in theRavenpyModelclass have been re-added, but are currently only used to control theoutput_subbasinsargument. (PR/339). - The
xhydro.extreme_value_analysismodule now usesExtremes.jl = "1.0.5"andOptim = "1.13.2". (GH/292, PR/315). - Additional options can now be passed to the Hydrotel executable via the
run_optionsargument in therunmethod. (PR/331). - A new function
xhydro.indicators.pmp.pw_snowfallhas been added to compute the Probable Maximum Snowfall Accumulation (PMSA). Additionally, the existing functionsxhydro.indicators.pmp.precipitable_water_100yandxhydro.indicators.pmp.major_precipitation_eventshave been adapted accordingly. (PR/328).
Bug fixes
- A warning will now appear if the calculated area in
xh.gis.watershed_propertiesdiffers from the theoretical area from HydroBASINS. (PR/303). - If returning a GeoDataFrame in
xh.gis.watershed_properties, column names have been changed to include the units. (GH/266, PR/303). - Multiple corrections to the
xh.modelling.format_inputfunction to ensure that the results are correctly formatted for Raven. (PR/303). - Importation will no longer fail if the
ravenpypackage is installed, but cannot find the Raven executable. (GH/305, PR/306). - Fixed a bug in Hydrotel modelling where the simulation file's name was not correctly set to the 'SIMULATION_COURANTE'. (PR/331).
- Multiple changes to regional frequency analysis to have functions and variable names more explicit. (PR/332).
- Fixed a bug in distributed Raven models where the order of the dimensions in the input data was not consistent with the expected order. (PR/344).
Breaking changes
- The
mapargument inxh.gis.watershed_delineationhas been renamed tomto avoid confusion with the built-in function. (PR/303). - The default CRS in
xh.gis.watershed_propertiesandsurface_propertieshas been changed to a call togeopandas.estimate_utm_crsinstead of an hardcoded value. (PR/303). - The
RavenpyModelclass has abandoned thelongitude,latitude,drainage_areaandelevationarguments in favor of ahruargument. (PR/303). - The
RavenpyModelclass has abandoned the explicitevaporationandrain_snow_fraction, but they can still be passed as kwargs. (PR/303). - The
basin_namecoordinate produced by Raven is now renamed tosubbasin_id. (PR/339). - The variables
tfromxhfa.local.parametric_quantiles,rpfromxhfa.regional.calculate_rp_from_afrandreturn_periodsfromxhfa.uncertainties.calc_q_iterall renamedreturn_period. (GH/269, PR/317). - The function
xhfa.regional.calculate_rp_from_afrwas renamedxhfa.regional.calculate_return_period_from_afr. (PR/317). - The
use_defaultsargument in theHydrotelclass has been removed. (PR/331). - The internal
xh.modelling._hydrotel._basic_checksfunction has been removed, as Hydrotel itself performs most of these checks. Checks that are still relevant have been moved to therunfunction. (PR/331). - The
station_iddimension in the output of Hydrotel has been renamed tosubbasin_id. (PR/331).
Internal changes
- Running the docs translation steps from Makefile or Batchfile no longer executes the notebooks. (PR/330).
Hydrosphere - Freshwater and Hydrology
- Python
Published by github-actions[bot] 5 months ago
xHydro - v0.5.0
v0.5.0 (2025-04-24)
Contributors to this version: Thomas-Charles Fortier Filion (@TC-FF) Gabriel Rondeau-Genesse (@RondeauG), Trevor James Smith (@Zeitsperre), Julián Ospina (@ospinajulian), Essi Parent (@essicolo).
New features and enhancements
- Added a new module
xhydro.extreme_value_analysisthat wraps theExtremes.jlpackage for Julia. (PR/175).- The module provides functions to fit extreme value distributions to data, compute return levels, and get uncertainty estimates.
- The module is designed to be optional and requires the user to have Julia installed with the
Extremes.jlpackage, along with thePyJuliaCallpackage for Python. - You can use
pip install xhydro[julia]to install the required dependencies.
- Multiple improvements to the documentation. (PR/274, PR/279, PR/293).
Bug fixes
- Patched the outputs of
xh.optimal_interpolation.executeto remove a superfluousstationdimension and to ensure that thetimedimension has coordinates. (PR/274).- Note that this change does not fix the underlying issue with the code, which will be addressed in a future release.
- Added attributes to variables instead of global attributes in
xh.extreme_value_analysis. Modified dimension names and introduced a new dimension,return_period, to the results ofxh.extreme_value_analysis.return_level(). (PR/283).
Breaking changes
- The
xh.cc.sampled_indicatorsfunction has been separated into two functions:xh.cc.weighted_random_samplingandxh.cc.sampled_indicators. (PR/240).- Many of the arguments and outputs have been renamed or reorganized. Since no one was using this function yet AFAIK, no backward compatibility has been maintained.
- The default
use_defaultsargument of Hydrotel has been changed from 'True' to 'False'. (PR/233). - Multiple functions in the
xhydro.frequency_analysisandxhydro.indicators.pmpmodules have been updated to require literal arguments instead of positional arguments. (PR/274).
Internal changes
"land_use_classification"default collection has been changed to"io-lulc-annual-v02", as the previous one will be deprecated in December 2024. (PR/227).- Added some collection, year, resolution and history attributes to
xarrayoutput of"land_use_classification". (PR/227). - Added a "User-Agent" to fix an issue related to
poochcalls in the notebooks for recent ReadTheDocs builds. (PR/231). - Patched the
xhydro.testing.helpers.devereaux()function to add a "User-Agent" by default. (PR/234). - Fixed the URL joining logic of the
load_registry()anddevereaux()functions in thexhydro.testing.helpersmodule. (PR/234). - Updated
uncertainties.calc_q_iter()to allow for ungaged catchments. (PR/235). - Updated the cookiecutter template. (PR/252):
- GitHub Actions versions and Python dependencies updated.
- Added pre-commit hooks for
vulture(find dead code),codespell(spelling mistakes),gitleaks(token commit prevention), andzizmor(workflow security). - Added an advanced CodeQL workflow for security scanning.
- Adjusted a handful of dependency pins to handle the latest version of
sphinx. (PR/258). - The internal
xh.cc._weighted_samplingfunction has been almost entirely rewritten to hopefully be more efficient. Results should be the same as before. (PR/240). - Reduced the number of tests performed on Notebooks. (PR/267).
- Removed
_fix_datesfrom_hydrotelmodule since it's not relevant and likely to generate errors. (PR/233). - Updated and fixed many dependencies. (PR/295).
- Added a workflow to test
pipinstallations ofxhydro. (PR/295). - Removed steps involving ESMF installation from the
Makefileand thetoxconfiguration. (PR/295).
Hydrosphere - Freshwater and Hydrology
- Python
Published by github-actions[bot] 10 months ago
xHydro - v0.4.1
v0.4.1 (2024-11-07)
Contributors to this version: Gabriel Rondeau-Genesse (@RondeauG), Trevor James Smith (@Zeitsperre), Louise Arnal (@lou-a).
New features and enhancements
- A
periodsparameter was added tofrequency_analysis.local.fitto compute multiple separate periods with a single call. (PR/219). - In
xhydro.cc.sampled_indicators, thedelta_typeargument can now be a dictionary or None, in which case the attributedelta_kindis used. (PR/220). - In
xhydro.cc.sampled_indicators, weights along atimeorhorizondimension will no longer reduce that dimension. (PR/220).
Bug fixes
- Fixed a bug in
xhydro.modelling.format_inputwhere the function would fail if the input data was adaskarray. (PR/214). - The
executableparameter in the Hydrotel model class is now always required. (PR/214).
Breaking changes
- The
xhydrotesting utilities have been rewritten to usepoochfor downloading and caching testing datasets fromhydrologie/xhydro-testdata. (PR/212). - The
xhydrotesting utilities now requirepytest-xdistas a development dependency. (PR/212). - Many core dependencies have been updated to more modern versions. (PR/218, PR/228).
- The
delta_typeargument inxhydro.cc.sampled_indicatorshas been renamed todelta_kindand is no longer positional. (PR/220). - The
xhydro.pmpmodule has been moved toxhydro.indicators.pmp. (PR/226).
Internal changes
- Updated the notebooks to reduce the load on ReadTheDocs. (PR/211).
- Tests can now be run using the
pytest-xdistplugin for distributed testing. See thepytest-xdist documentation <https://pytest-xdist.readthedocs.io/en/stable/>_ for more information. (PR/212). - Several tests reliant on online servers and services have been marked as
onlineto prevent them from running in contexts where internet access is limited. (PR/212). - Many function docstrings and type hints have been updated for accuracy and precision. (PR/212).
- The
xHydroproject now has a set of logos for use in documentation, the readme, and other materials. (PR/217). xhydro.indicatorsis now a package with submodules for different types of indicators. Previous functions have been moved to agenericsubmodule and are imported at the top level for backwards compatibility. (PR/226).xh.testing.utils.publish_release_notesnow has alatestparameter to print only the latest release notes. (PR/228).
Hydrosphere - Freshwater and Hydrology
- Python
Published by RondeauG over 1 year ago
xHydro - v0.4.0
Contributors to this version: Trevor James Smith (@Zeitsperre), Gabriel Rondeau-Genesse (@RondeauG), Thomas-Charles Fortier Filion (@TC-FF).
New features and enhancements
xhydronow supportsRavenPyv0.15.0 (RavenHydroFrameworkv3.8.1). (PR/161).- Regional frequency analysis functions as well as Resampling function for uncertainties have been added to the
xhydro.frequency_analysismodule. (PR/186). - New function
xhydro.modelling.format_inputto format CF-compliant input data for hydrological models (currently only supports Hydrotel). (PR/185).
Internal changes
numpyhas been pinned below v2.0.0 untilxclimand other dependencies are updated to support it. (PR/161).- A helper script has been added in the
CIdirectory to facilitate the translation of thexhydrodocumentation. (GH/63, PR/163). - The
condaenvironment now relies on the newly createdxdatasetspackage. (PR/164). - The cookiecutter has been updated to the latest commit. Changes include workflow fixes, stricter coding standards, and many small adjustments to the documentation. (PR/164).
- A previously uncaught YAML formatting issue has been addressed. Stricter style conventions are now enforced. (PR/174).
- Chunking was adjusted in a few functions to work with the new requirements of
apply_ufunc. (PR/180). - Updated the cookiecutter template to the latest commit. (PR/177):
- Actions have been updated and synchronized.
- Warnings in Pull Requests from forks are now less buggy.
- A new pre-commit hook and linting step for validating numpy docstrings has been added (
numpydoc). - All
pip-based dependencies used to run in CI are now managed by aCI/requirements_ci.txtthat uses hashes of packages for security.
- Added two new Batch (
.bat) files to help facilitate the translation of and the generation of thexhydrodocumentation in Windows environments. (PR/196). - The bumpversion workflow now uses the Hydrologie Helper Bot to make signed commits. (PR/199).
- Updated the cookiecutter template to the latest commit. (PR/199):
- Updated development dependencies to the latest versions.
- Staged support for Python3.13.
- Added environment caching to existing workflows.
Breaking changes
xhydronow requirespython>= 3.10. (PR/195).
Hydrosphere - Freshwater and Hydrology
- Python
Published by github-actions[bot] over 1 year ago
xHydro - v0.3.6
v0.3.6 (2024-06-10)
Contributors to this version: Gabriel Rondeau-Genesse (@RondeauG), Richard Arsenault (@richardarsenault), Sébastien Langlois (@sebastienlanglois).
New features and enhancements
- Added support for the Hydrotel hydrological model. (PR/18).
- Added support for various hydrological models emulated through the Raven hydrological framework. (PR/128).
- Added optimal interpolation functions for time-series and streamflow indicators. (PR/88, PR/129).
- Added optimal interpolation notebooks. (PR/123).
- Added surface properties (elevation, slope, aspect ratio) to the
gismodule. (PR/151).
Breaking changes
- Hydrological models are now classes instead of functions and dictionaries. (GH/93, PR/18).
xhydronow uses a'src' layout <https://packaging.python.org/en/latest/discussions/src-layout-vs-flat-layout>_ for the package. (PR/147).
Internal changes
- Tests using the
gammadistribution were changed to thegumbel_rto avoid changes inxclim v0.49.0. (PR/145). - The cookiecutter template has been updated to the latest commit. Changes include the addition of a
CODE_OF_CONDUCT.rstfile, the renaming ofCHANGES.rsttoCHANGELOG.rst, and many small adjustments to the documentation. (PR/147). - Added a CODE_OF_CONDUCT.rst file with Contributor Covenant guidelines. (PR/147).
Hydrosphere - Freshwater and Hydrology
- Python
Published by RondeauG over 1 year ago
xHydro - v0.3.5
v0.3.5 (2024-03-20)
Contributors to this version: Trevor James Smith (@Zeitsperre), Thomas-Charles Fortier Filion (@TC-FF), Sébastien Langlois (@sebastienlanglois), Gabriel Rondeau-Genesse (@RondeauG).
New features and enhancements
xhydrohas implemented agismodule that facilitates geospatial tasks needed for gathering hydrological inputs. (GH/60, PR/61).
Internal changes
- Added a workflow based on
actions/labelerto automatically label Pull Requests based on files changed. (PR/68). - Added a conditional trigger to the
test-notebooksjob to run in advance of pull request approval in the event that the notebooks found withindocs/notebookshave been modified (labeled"notebooks"). (PR/68). - Significant changes to the Continuous Integration (CI) setup. (PR/65):
- Added a workflow configuration using
label_on_approval.ymland modifications ofmain.ymlso that fewer tests are run on Pull Requests before they are fully approved. - Added some
pre-commitconfigurations to both clean up the code within notebooks (NbQA) and strip their outputs (nbstripout). toxis now fully v4.0-compliant.- Added a
Makefilerecipe to facilitate installation ofesmpywhenesmfis installed and visible on the$PATH. - Added a
Makefilerecipe for running tests over Jupyter notebooks. - Synchronized dependencies between
pyproject.tomlandcondaconfiguration files.
- Added a workflow configuration using
- Moved the notebooks under a Usage section in the documentation. (GH/114, PR/118).
Hydrosphere - Freshwater and Hydrology
- Python
Published by RondeauG almost 2 years ago
xHydro - v0.3.4
v0.3.4 (2024-02-29)
Contributors to this version: Trevor James Smith (@Zeitsperre), Thomas-Charles Fortier Filion (@TC-FF), Gabriel Rondeau-Genesse (@RondeauG).
New features and enhancements
- Added French language support to the documentation. (GH/53, PR/55).
- Added a new set of functions to support creating and updating
poochregistries, caching testing datasets fromhydrologie/xhydro-testdata, and ensuring that testing datasets can be loaded into temporary directories. (PR/62). xhydrois now configured to usepoochto download and cache testing datasets fromhydrologie/xhydro-testdata. (PR/62).xhydrois nowSemantic Versioning v2.0.0 <https://semver.org/spec/v2.0.0.html>_ compliant. (PR/70).- Added new functions to
xhydro.frequency_analysis.localto calculate plotting positions and to prepare plots. (PR/87). xscennow supports Python3.12. (PR/99).xscennow supportspandas>= 2.2.0,xarray>= 2023.11.0, andxclim>= 0.47.0. (PR/99).- Added
xh.cc.sampled_indicatorsto compute future indicators using a perturbation approach and random sampling. (PR/54).
Breaking changes
- Added
poochas an installation dependency. (PR/62). xhydronow requiresxarray>=2023.11.0,xclim>=0.48.2,xscen>=0.8.3, and, indirectly,pandas>=2.2.0. The main breaking change is in how yearly frequencies are called ('YS-' instead of 'AS-'). (PR/54).- Functions that output a dict with keys as xrfreq (namely,
xh.indicators.compute_indicators) will now return the new nomenclature (e.g. "YS-JAN" instead of "AS-JAN"). (PR/54).
Internal changes
- Added a new module for testing purposes:
xhydro.testing.helperswith some new functions. (PR/62):generate_registry: Parses data found in package (xhydro.testing.data), and adds it to theregistry.txtload_registry: Loads installed (or custom) registry and returns dictionarypopulate_testing_data: Fetches the registry and optionally caches files at a different location (helpful forpytest-xdist).
- Added a
pre-commithook (numpydoc) to ensure thatnumpydocstrings are formatted correctly. (PR/62). - The cookiecutter has been updated to the latest commit (PR/70, PR/106):
- Added some workflows (Change file labelling, Cache cleaning, Dependency scans, OpenSSF Scorecard).
- The README has been updated to organize badges in a table, including a badge for the OpenSSF Scorecard.
- Updated pre-commit hook versions to the latest available.
- Formatting tools are now pinned to their pre-commit equivalents.
actions-version-updater.ymlhas been replaced by dependabot.- Addressed a handful of misconfigurations in the workflows.
- Updated ruff to v0.2.0 and black to v24.2.0.
- Added a few functions missing from the API to their respective modules via
__all__. (PR/99).
Hydrosphere - Freshwater and Hydrology
- Python
Published by RondeauG almost 2 years ago
xHydro - Release v0.3.0
v0.3.0 (2023-12-01)
Contributors to this version: Gabriel Rondeau-Genesse (@RondeauG), Trevor James Smith (@Zeitsperre).
New features and enhancements
Breaking changes
xhydronow adheres to PEPs 517/518/621 using theflitbackend for building and packaging. (PR/50).
Bug fixes
- The
return_leveldimension inxh.frequency_analysis.local.parametric_quantiles()is now the actual return level, not the quantile. (GH/41, PR/43).
Internal changes
- Added
xhydro.testing.utils.publish_release_notes()to help with the release process. (PR/37). xh.frequency_analysis.local.parametric_quantiles()andxh.frequency_analysis.local.criteria()are now lazier. (GH/41, PR/43).- The
cookiecuttertemplate has been updated to the latest commit viacruft. (PR/50):Manifest.inandsetup.pyhave been removed.pyproject.tomlhas been added, with most package configurations migrated into it.HISTORY.rsthas been renamed toCHANGES.rst.actions-version-updater.ymlhas been added to automate the versioning of the package.bump-version.ymlhas been added to automate patch versioning of the package.pre-commithooks have been updated to the latest versions;check-tomlandtoml-sorthave been added to cleanup thepyproject.tomlfile.ruffhas been added to the linting tools to replace mostflake8andpydocstyleverifications.
Hydrosphere - Freshwater and Hydrology
- Python
Published by github-actions[bot] about 2 years ago
xHydro - v0.2.0
v0.2.0 (2023-10-10)
Contributors to this version: Trevor James Smith (@Zeitsperre), Gabriel Rondeau-Genesse (@RondeauG), Thomas-Charles Fortier Filion (@TC-FF), Sébastien Langlois (@sebastienlanglois)
Announcements
- Support for Python3.8 and lower has been dropped. (PR/11).
xHydronow hosts its documentation on Read the Docs. (GH/22, PR/26).- Local frequency analysis functions have been added under a new module
xhydro.frequency_analysis. (PR/20, PR/27).
New features and enhancements
- GitHub Workflows for automated testing using
toxhave been added. (PR/11). - Support for various
xscenfunctions has been added to compute indicators and various climate change metrics. (PR/21). - New function
xh.indicators.compute_volumeto convert streamflow data to volumes. (PR/20, PR/27). - New function
xh.indicators.get_yearly_opto compute block operation (e.g. block maxima, minima, etc.). (PR/20, PR/27).
Breaking changes
xHydrorepository has renamed its primary development branch frommastertomain. (PR/13).xHydronow requires a conda environment to be installed. (PR/21).
Bug fixes
- N/A
Internal changes
- Added a Pull Request template. (PR/14).
- Various updates to the autogenerated boilerplate (Ouranosinc/cookiecutter-pypackage) via
cruft. (PR/11, PR/12, PR/13):- General updates to pre-commit hooks, development dependencies, documentation.
- Added configurations for Pull Request and Issues templates, Zenodo.
- Documentation now makes use of sphinx directives for usernames, issues, and pull request hyperlinks (via sphinx.ext.extlinks). (GH/15).
- GitHub Workflows have been added for automated testing, and publishing.
- Some sphinx extensions have been added/enabled (sphinx-codeautolink, sphinx-copybutton).
- Automated testing with tox now updated to use v4.0+ conventions.
- Removed all references to travis.ci.
- Deployments to TestPyPI and PyPI are now run using GitHub Workflow Environments as a safeguarding mechanism. (PR/28).
- Various cleanups of the environment files. (GH/23, PR/30).
xhydronow uses the trusted publishing mechanism for PyPI and TestPyPI deployment. (PR/32).- Added tests. (PR/27).
Hydrosphere - Freshwater and Hydrology
- Python
Published by RondeauG over 2 years ago
xHydro - v0.1.2
What's Changed
- Generate docs by @TC-FF in https://github.com/hydrologie/xhydro/pull/5
- Prepare v0.1.2 by @TC-FF in https://github.com/hydrologie/xhydro/pull/10
Full Changelog: https://github.com/hydrologie/xhydro/compare/v0.1.1...v0.1.2
Hydrosphere - Freshwater and Hydrology
- Python
Published by sebastienlanglois almost 3 years ago