From 416db02e56534a1fe9700a453af132068822bed7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Dupuis?= Date: Wed, 23 Oct 2024 11:34:34 -0400 Subject: [PATCH 01/35] fix bug when converting units multivariate --- CHANGELOG.rst | 8 ++++++++ xclim/sdba/adjustment.py | 19 ++++++++++++++----- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 612b745b1..d74197e23 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -2,6 +2,14 @@ Changelog ========= +v0.54 (unpublished) +-------------------- +Contributors to this version: Éric (:user:`coxipi`). + +Bug fixes +^^^^^^^^^ +* Conversion of units of multivariate DataArray is now properly handled `sdba.TrainAdjust` and `sdba.Adjust`. There was a bug where the units could be changed before a conversion of the magntitudes could occur. () + v0.53.1 (2024-10-21) -------------------- Contributors to this version: Trevor James Smith (:user:`Zeitsperre`). diff --git a/xclim/sdba/adjustment.py b/xclim/sdba/adjustment.py index 4925e2949..5c8506071 100644 --- a/xclim/sdba/adjustment.py +++ b/xclim/sdba/adjustment.py @@ -180,12 +180,21 @@ def __convert_units_to(_input_da, _internal_dim, _internal_target): v: _inputs[0][_dim].attrs["_units"][iv] for iv, v in enumerate(_inputs[0][_dim].values) } - return ( - __convert_units_to( - _input_da, _internal_dim=_dim, _internal_target=_target + + # `__convert_units_to`` was changing the units of the 3rd dataset during the 2nd loop + # This explicit loop is designed to avoid this + _outputs = [] + original_units = list( + [_inp[_dim].attrs["_units"].copy() for _inp in _inputs] + ) + for _inp, units in zip(_inputs, original_units, strict=False): + _inp[_dim].attrs["_units"] = units + _outputs.append( + __convert_units_to( + _inp, _internal_dim=_dim, _internal_target=_target + ) ) - for _input_da in _inputs - ), _target + return _outputs, _target for dim, crd in inputs[0].coords.items(): if crd.attrs.get("is_variables"): From ee7ada762495d35a95a4ea484a95e069b0f4e119 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Dupuis?= Date: Wed, 23 Oct 2024 11:38:20 -0400 Subject: [PATCH 02/35] add pull number --- CHANGELOG.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index d74197e23..1b37ad098 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -8,7 +8,7 @@ Contributors to this version: Éric (:user:`coxipi`). Bug fixes ^^^^^^^^^ -* Conversion of units of multivariate DataArray is now properly handled `sdba.TrainAdjust` and `sdba.Adjust`. There was a bug where the units could be changed before a conversion of the magntitudes could occur. () +* Conversion of units of multivariate DataArray is now properly handled `sdba.TrainAdjust` and `sdba.Adjust`. There was a bug where the units could be changed before a conversion of the magntitudes could occur. (:pull:`1972`). v0.53.1 (2024-10-21) -------------------- From 135630a07d129194e90bbeb6ffa52152d24d8107 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Dupuis?= Date: Wed, 23 Oct 2024 11:38:50 -0400 Subject: [PATCH 03/35] missing word --- CHANGELOG.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 1b37ad098..7959ee2c3 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -8,7 +8,7 @@ Contributors to this version: Éric (:user:`coxipi`). Bug fixes ^^^^^^^^^ -* Conversion of units of multivariate DataArray is now properly handled `sdba.TrainAdjust` and `sdba.Adjust`. There was a bug where the units could be changed before a conversion of the magntitudes could occur. (:pull:`1972`). +* Conversion of units of multivariate DataArray is now properly handled in `sdba.TrainAdjust` and `sdba.Adjust`. There was a bug where the units could be changed before a conversion of the magntitudes could occur. (:pull:`1972`). v0.53.1 (2024-10-21) -------------------- From 5f990d44b26de3d77278d3e91621bd2b5b837207 Mon Sep 17 00:00:00 2001 From: Ouranos Helper Bot Date: Wed, 23 Oct 2024 18:18:38 +0000 Subject: [PATCH 04/35] =?UTF-8?q?Bump=20version:=200.53.1=20=E2=86=92=200.?= =?UTF-8?q?53.2-dev.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pyproject.toml | 2 +- xclim/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 9c958cbd8..84ae8f20b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -135,7 +135,7 @@ target-version = [ ] [tool.bumpversion] -current_version = "0.53.1" +current_version = "0.53.2-dev.0" commit = true commit_args = "--no-verify" tag = false diff --git a/xclim/__init__.py b/xclim/__init__.py index d7ba1dfc8..68992c8ee 100644 --- a/xclim/__init__.py +++ b/xclim/__init__.py @@ -13,7 +13,7 @@ __author__ = """Travis Logan""" __email__ = "logan.travis@ouranos.ca" -__version__ = "0.53.1" +__version__ = "0.53.2-dev.0" with _resources.as_file(_resources.files("xclim.data")) as _module_data: From e76d93d073feca2c6d5541ecfd1f027f4feb93ce Mon Sep 17 00:00:00 2001 From: Pascal Bourgault Date: Thu, 24 Oct 2024 14:53:36 -0400 Subject: [PATCH 05/35] Fix indicator outputting delta degC --- CHANGELOG.rst | 3 ++- tests/test_indicators.py | 14 ++++++++++++++ xclim/core/indicator.py | 2 +- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 7959ee2c3..fd5a33160 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,11 +4,12 @@ Changelog v0.54 (unpublished) -------------------- -Contributors to this version: Éric (:user:`coxipi`). +Contributors to this version: Éric (:user:`coxipi`), Pascal Bourgault (:user:`aulemahal`). Bug fixes ^^^^^^^^^ * Conversion of units of multivariate DataArray is now properly handled in `sdba.TrainAdjust` and `sdba.Adjust`. There was a bug where the units could be changed before a conversion of the magntitudes could occur. (:pull:`1972`). +* Fix for indicators that output "delta" Celsius degrees. v0.53.1 (2024-10-21) -------------------- diff --git a/tests/test_indicators.py b/tests/test_indicators.py index 997d2719b..d61b77bd7 100644 --- a/tests/test_indicators.py +++ b/tests/test_indicators.py @@ -286,6 +286,20 @@ def test_temp_unit_conversion(tas_series): np.testing.assert_array_almost_equal(txk, txc + 273.15) +def test_temp_diff_unit_conversion(tasmax_series, tasmin_series): + tx = tasmax_series(np.arange(365) + 1, start="2001-01-01") + tn = tasmin_series(np.arange(365), start="2001-01-01") + txC = convert_units_to(tx, "degC") + tnC = convert_units_to(tn, "degC") + + ind = xclim.atmos.daily_temperature_range.from_dict( + {"units": "degC"}, "dtr_degC", "test" + ) + out = ind(tasmax=txC, tasmin=tnC) + assert out.attrs["units"] == "degC" + assert out.attrs["units_metadata"] == "temperature: difference" + + def test_multiindicator(tas_series): tas = tas_series(np.arange(366), start="2000-01-01") tmin, tmax = multiTemp(tas, freq="YS") diff --git a/xclim/core/indicator.py b/xclim/core/indicator.py index 3023eb906..768a580c8 100644 --- a/xclim/core/indicator.py +++ b/xclim/core/indicator.py @@ -853,7 +853,7 @@ def __call__(self, *args, **kwds): # Convert to output units outs = [ - convert_units_to(out, attrs["units"], self.context) + convert_units_to(out, attrs, self.context) for out, attrs in zip(outs, out_attrs, strict=False) ] From c6c8dd1d5859aef282c3ce3f358e734ebbfc33a9 Mon Sep 17 00:00:00 2001 From: Pascal Bourgault Date: Thu, 24 Oct 2024 15:00:10 -0400 Subject: [PATCH 06/35] upd chgs. --- CHANGELOG.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index fd5a33160..c49aa5625 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -9,7 +9,7 @@ Contributors to this version: Éric (:user:`coxipi`), Pascal Bourgault (:user:`a Bug fixes ^^^^^^^^^ * Conversion of units of multivariate DataArray is now properly handled in `sdba.TrainAdjust` and `sdba.Adjust`. There was a bug where the units could be changed before a conversion of the magntitudes could occur. (:pull:`1972`). -* Fix for indicators that output "delta" Celsius degrees. +* Fix for indicators that output "delta" Celsius degrees. (:pull:`1973`). v0.53.1 (2024-10-21) -------------------- From 506c699efd5bc17ff96af2b12335e048a6576870 Mon Sep 17 00:00:00 2001 From: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com> Date: Thu, 24 Oct 2024 15:03:19 -0400 Subject: [PATCH 07/35] Update CHANGELOG.rst --- CHANGELOG.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index c49aa5625..650639fc2 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -2,9 +2,9 @@ Changelog ========= -v0.54 (unpublished) +v0.54.0 (unreleased) -------------------- -Contributors to this version: Éric (:user:`coxipi`), Pascal Bourgault (:user:`aulemahal`). +Contributors to this version: Éric Dupuis (:user:`coxipi`), Pascal Bourgault (:user:`aulemahal`). Bug fixes ^^^^^^^^^ From 8a361e6b0835f9e36a1bdc1a77a382369f529ce0 Mon Sep 17 00:00:00 2001 From: Ouranos Helper Bot Date: Thu, 24 Oct 2024 19:51:00 +0000 Subject: [PATCH 08/35] =?UTF-8?q?Bump=20version:=200.53.2-dev.0=20?= =?UTF-8?q?=E2=86=92=200.53.2-dev.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pyproject.toml | 2 +- xclim/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 84ae8f20b..004ec3087 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -135,7 +135,7 @@ target-version = [ ] [tool.bumpversion] -current_version = "0.53.2-dev.0" +current_version = "0.53.2-dev.1" commit = true commit_args = "--no-verify" tag = false diff --git a/xclim/__init__.py b/xclim/__init__.py index 68992c8ee..aef387b0b 100644 --- a/xclim/__init__.py +++ b/xclim/__init__.py @@ -13,7 +13,7 @@ __author__ = """Travis Logan""" __email__ = "logan.travis@ouranos.ca" -__version__ = "0.53.2-dev.0" +__version__ = "0.53.2-dev.1" with _resources.as_file(_resources.files("xclim.data")) as _module_data: From b3dbf377e9fb7a04bd6da01f51312b9a4f754d99 Mon Sep 17 00:00:00 2001 From: Zeitsperre <10819524+Zeitsperre@users.noreply.github.com> Date: Thu, 24 Oct 2024 16:45:04 -0400 Subject: [PATCH 09/35] update CHANGELOG.rst --- CHANGELOG.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 650639fc2..377ae43d8 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -2,13 +2,13 @@ Changelog ========= -v0.54.0 (unreleased) --------------------- +v0.53.2 (202410-24) +------------------- Contributors to this version: Éric Dupuis (:user:`coxipi`), Pascal Bourgault (:user:`aulemahal`). Bug fixes ^^^^^^^^^ -* Conversion of units of multivariate DataArray is now properly handled in `sdba.TrainAdjust` and `sdba.Adjust`. There was a bug where the units could be changed before a conversion of the magntitudes could occur. (:pull:`1972`). +* Conversion of units of multivariate DataArray is now properly handled in `sdba.TrainAdjust` and `sdba.Adjust`; There was a bug where the units could be changed before a conversion of the magnitudes could occur. (:pull:`1972`). * Fix for indicators that output "delta" Celsius degrees. (:pull:`1973`). v0.53.1 (2024-10-21) From c8815c2f78bd19beb621ff47dda185fb7283d13a Mon Sep 17 00:00:00 2001 From: Zeitsperre <10819524+Zeitsperre@users.noreply.github.com> Date: Thu, 24 Oct 2024 16:54:02 -0400 Subject: [PATCH 10/35] =?UTF-8?q?Bump=20version:=200.53.2-dev.1=20?= =?UTF-8?q?=E2=86=92=200.53.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pyproject.toml | 2 +- xclim/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 004ec3087..bf2efaeec 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -135,7 +135,7 @@ target-version = [ ] [tool.bumpversion] -current_version = "0.53.2-dev.1" +current_version = "0.53.2" commit = true commit_args = "--no-verify" tag = false diff --git a/xclim/__init__.py b/xclim/__init__.py index aef387b0b..2680845d2 100644 --- a/xclim/__init__.py +++ b/xclim/__init__.py @@ -13,7 +13,7 @@ __author__ = """Travis Logan""" __email__ = "logan.travis@ouranos.ca" -__version__ = "0.53.2-dev.1" +__version__ = "0.53.2" with _resources.as_file(_resources.files("xclim.data")) as _module_data: From f21d44e96543c97407364808680c26dba8a185a0 Mon Sep 17 00:00:00 2001 From: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com> Date: Fri, 25 Oct 2024 00:36:51 -0400 Subject: [PATCH 11/35] Update CHANGELOG.rst --- CHANGELOG.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 377ae43d8..16fcec36b 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -2,8 +2,8 @@ Changelog ========= -v0.53.2 (202410-24) -------------------- +v0.53.2 (2024-10-25) +-------------------- Contributors to this version: Éric Dupuis (:user:`coxipi`), Pascal Bourgault (:user:`aulemahal`). Bug fixes From 20b4b96d084e276a602cd4144afbfffb19382459 Mon Sep 17 00:00:00 2001 From: Pascal Bourgault Date: Tue, 29 Oct 2024 12:01:44 -0400 Subject: [PATCH 12/35] Fix docstring of frost free spell max length --- xclim/indices/_threshold.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xclim/indices/_threshold.py b/xclim/indices/_threshold.py index e58262718..dba665096 100644 --- a/xclim/indices/_threshold.py +++ b/xclim/indices/_threshold.py @@ -1426,8 +1426,8 @@ def frost_free_spell_max_length( Minimum number of days with temperatures above thresholds to qualify as a frost free day. freq : str Resampling frequency. - op : {"<", "<=", "lt", "le"} - Comparison operation. Default: "<". + op : {">", ">=", "gt", "ge"} + Comparison operation. Default: ">=". resample_before_rl : bool Determines if the resampling should take place before or after the run length encoding (or a similar algorithm) is applied to runs. From 6f7bf64dbd1553bf434d4a72c14792b82f4054ce Mon Sep 17 00:00:00 2001 From: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com> Date: Wed, 30 Oct 2024 12:08:07 -0400 Subject: [PATCH 13/35] pin xarray --- CHANGELOG.rst | 4 ++++ environment.yml | 2 +- pyproject.toml | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 650639fc2..918d191cd 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,6 +6,10 @@ v0.54.0 (unreleased) -------------------- Contributors to this version: Éric Dupuis (:user:`coxipi`), Pascal Bourgault (:user:`aulemahal`). +Breaking changes +^^^^^^^^^^^^^^^^ +* Due to a regression affecting symmetry of ``polyfit`` and ``polyval`` in `xarray`, `xclim` now requires `xarray>=2023.11.0,!=2024.10.0` (see: `pydata/xarray PR/9691 `_. (:pull:`1972`). + Bug fixes ^^^^^^^^^ * Conversion of units of multivariate DataArray is now properly handled in `sdba.TrainAdjust` and `sdba.Adjust`. There was a bug where the units could be changed before a conversion of the magntitudes could occur. (:pull:`1972`). diff --git a/environment.yml b/environment.yml index 0a9e3f28f..a7d54a980 100644 --- a/environment.yml +++ b/environment.yml @@ -22,7 +22,7 @@ dependencies: - scikit-learn >=1.1.0 - scipy >=1.9.0 - statsmodels >=0.14.2 - - xarray >=2023.11.0 + - xarray >=2023.11.0,!=2024.10.0 - yamale >=5.0.0 # Extras - fastnanquantile >=0.0.2 diff --git a/pyproject.toml b/pyproject.toml index 004ec3087..2dcec8415 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,7 +52,7 @@ dependencies = [ "scikit-learn >=1.1.0", "scipy >=1.9.0", "statsmodels >=0.14.2", - "xarray >=2023.11.0", + "xarray >=2023.11.0,!=2024.10.0", "yamale >=5.0.0" ] From 576927f98a477c43bce625bebc2270580fc324e3 Mon Sep 17 00:00:00 2001 From: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com> Date: Wed, 30 Oct 2024 12:13:38 -0400 Subject: [PATCH 14/35] update CHANGELOG.rst --- CHANGELOG.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 918d191cd..caac9778a 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,11 +4,11 @@ Changelog v0.54.0 (unreleased) -------------------- -Contributors to this version: Éric Dupuis (:user:`coxipi`), Pascal Bourgault (:user:`aulemahal`). +Contributors to this version: Éric Dupuis (:user:`coxipi`), Pascal Bourgault (:user:`aulemahal`), Trevor James Smith (:user:`Zeitsperre`). Breaking changes ^^^^^^^^^^^^^^^^ -* Due to a regression affecting symmetry of ``polyfit`` and ``polyval`` in `xarray`, `xclim` now requires `xarray>=2023.11.0,!=2024.10.0` (see: `pydata/xarray PR/9691 `_. (:pull:`1972`). +* Due to a regression affecting symmetry of ``polyfit`` and ``polyval`` in `xarray`, `xclim` now requires `xarray>=2023.11.0,!=2024.10.0` (see: `pydata/xarray PR/9691 `_. (:pull:`1978`). Bug fixes ^^^^^^^^^ From 635e3429ebd5676faade26dcd54543fa99058c66 Mon Sep 17 00:00:00 2001 From: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com> Date: Wed, 30 Oct 2024 14:31:22 -0400 Subject: [PATCH 15/35] update CHANGELOG.rst --- CHANGELOG.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index caac9778a..4f7dc1fb4 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -12,8 +12,9 @@ Breaking changes Bug fixes ^^^^^^^^^ -* Conversion of units of multivariate DataArray is now properly handled in `sdba.TrainAdjust` and `sdba.Adjust`. There was a bug where the units could be changed before a conversion of the magntitudes could occur. (:pull:`1972`). -* Fix for indicators that output "delta" Celsius degrees. (:pull:`1973`). +* Fixed a bug where the units could be changed before a conversion of the magnitudes could occur. Conversion of units for multivariate ``DataArray`` is now properly handled in `sdba.TrainAdjust` and `sdba.Adjust`. (:pull:`1972`). +* Fixed a units formatting bug with indicators that output "delta" Celsius degrees. (:pull:`1973`). +* Corrected the ``"choices"`` of parameter ``op`` in the docstring of ``frost_free_spell_max_length``. (:pull:`1977`). v0.53.1 (2024-10-21) -------------------- From 33c8b2b50fd4f9e9dae077ec02fd1c8f91208e5a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 30 Oct 2024 18:32:13 +0000 Subject: [PATCH 16/35] Bump the python group with 2 updates Bumps the python group with 2 updates: [pip](https://github.com/pypa/pip) and [tox](https://github.com/tox-dev/tox). Updates `pip` from 24.2.0 to 24.3.1 - [Changelog](https://github.com/pypa/pip/blob/main/NEWS.rst) - [Commits](https://github.com/pypa/pip/compare/24.2...24.3.1) Updates `tox` from 4.23.0 to 4.23.2 - [Release notes](https://github.com/tox-dev/tox/releases) - [Changelog](https://github.com/tox-dev/tox/blob/main/docs/changelog.rst) - [Commits](https://github.com/tox-dev/tox/compare/4.23.0...4.23.2) --- updated-dependencies: - dependency-name: pip dependency-type: direct:production update-type: version-update:semver-minor dependency-group: python - dependency-name: tox dependency-type: direct:production update-type: version-update:semver-patch dependency-group: python ... Signed-off-by: dependabot[bot] --- CI/requirements_ci.in | 4 ++-- CI/requirements_ci.txt | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CI/requirements_ci.in b/CI/requirements_ci.in index 648516b9e..57e716975 100644 --- a/CI/requirements_ci.in +++ b/CI/requirements_ci.in @@ -1,7 +1,7 @@ bump-my-version==0.28.0 deptry==0.20.0 flit==3.9.0 -pip==24.2.0 +pip==24.3.1 pylint==3.3.1 -tox==4.23.0 +tox==4.23.2 tox-gh==1.4.4 diff --git a/CI/requirements_ci.txt b/CI/requirements_ci.txt index 61bc9eb86..e78775817 100644 --- a/CI/requirements_ci.txt +++ b/CI/requirements_ci.txt @@ -369,9 +369,9 @@ tomlkit==0.13.0 \ # via # bump-my-version # pylint -tox==4.23.0 \ - --hash=sha256:46da40afb660e46238c251280eb910bdaf00b390c7557c8e4bb611f422e9db12 \ - --hash=sha256:a6bd7d54231d755348d3c3a7b450b5bf6563833716d1299a1619587a1b77a3bf +tox==4.23.2 \ + --hash=sha256:452bc32bb031f2282881a2118923176445bac783ab97c874b8770ab4c3b76c38 \ + --hash=sha256:86075e00e555df6e82e74cfc333917f91ecb47ffbc868dcafbd2672e332f4a2c # via # -r CI/requirements_ci.in # tox-gh From e8687e331225d36724cc9d09790c3a3ea66d7bd2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 30 Oct 2024 18:51:50 +0000 Subject: [PATCH 17/35] Bump the actions group across 1 directory with 7 updates Bumps the actions group with 7 updates in the / directory: | Package | From | To | | --- | --- | --- | | [actions/checkout](https://github.com/actions/checkout) | `4.2.1` | `4.2.2` | | [actions/setup-python](https://github.com/actions/setup-python) | `5.2.0` | `5.3.0` | | [crazy-max/ghaction-import-gpg](https://github.com/crazy-max/ghaction-import-gpg) | `6.1.0` | `6.2.0` | | [actions/dependency-review-action](https://github.com/actions/dependency-review-action) | `4.3.4` | `4.4.0` | | [actions/cache](https://github.com/actions/cache) | `4.1.1` | `4.1.2` | | [coverallsapp/github-action](https://github.com/coverallsapp/github-action) | `2.3.3` | `2.3.4` | | [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish) | `1.10.3` | `1.11.0` | Updates `actions/checkout` from 4.2.1 to 4.2.2 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871...11bd71901bbe5b1630ceea73d27597364c9af683) Updates `actions/setup-python` from 5.2.0 to 5.3.0 - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/f677139bbe7f9c59b41e40162b753c062f5d49a3...0b93645e9fea7318ecaed2b359559ac225c90a2b) Updates `crazy-max/ghaction-import-gpg` from 6.1.0 to 6.2.0 - [Release notes](https://github.com/crazy-max/ghaction-import-gpg/releases) - [Commits](https://github.com/crazy-max/ghaction-import-gpg/compare/01dd5d3ca463c7f10f7f4f7b4f177225ac661ee4...cb9bde2e2525e640591a934b1fd28eef1dcaf5e5) Updates `actions/dependency-review-action` from 4.3.4 to 4.4.0 - [Release notes](https://github.com/actions/dependency-review-action/releases) - [Commits](https://github.com/actions/dependency-review-action/compare/5a2ce3f5b92ee19cbb1541a4984c76d921601d7c...4081bf99e2866ebe428fc0477b69eb4fcda7220a) Updates `actions/cache` from 4.1.1 to 4.1.2 - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/3624ceb22c1c5a301c8db4169662070a689d9ea8...6849a6489940f00c2f30c0fb92c6274307ccb58a) Updates `coverallsapp/github-action` from 2.3.3 to 2.3.4 - [Release notes](https://github.com/coverallsapp/github-action/releases) - [Commits](https://github.com/coverallsapp/github-action/compare/4cdef0b2dbe0c9aa26bed48edb868db738625e79...cfd0633edbd2411b532b808ba7a8b5e04f76d2c8) Updates `pypa/gh-action-pypi-publish` from 1.10.3 to 1.11.0 - [Release notes](https://github.com/pypa/gh-action-pypi-publish/releases) - [Commits](https://github.com/pypa/gh-action-pypi-publish/compare/f7600683efdcb7656dec5b29656edb7bc586e597...fb13cb306901256ace3dab689990e13a5550ffaa) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-patch dependency-group: actions - dependency-name: actions/setup-python dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions - dependency-name: crazy-max/ghaction-import-gpg dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions - dependency-name: actions/dependency-review-action dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions - dependency-name: actions/cache dependency-type: direct:production update-type: version-update:semver-patch dependency-group: actions - dependency-name: coverallsapp/github-action dependency-type: direct:production update-type: version-update:semver-patch dependency-group: actions - dependency-name: pypa/gh-action-pypi-publish dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions ... Signed-off-by: dependabot[bot] --- .github/workflows/bump-version.yml | 6 +++--- .github/workflows/cache-cleaner.yml | 2 +- .github/workflows/codeql.yml | 2 +- .github/workflows/dependency-review.yml | 4 ++-- .github/workflows/main.yml | 24 ++++++++++++------------ .github/workflows/publish-mastodon.yml | 2 +- .github/workflows/publish-pypi.yml | 6 +++--- .github/workflows/scorecard.yml | 2 +- .github/workflows/tag-testpypi.yml | 6 +++--- .github/workflows/testdata-version.yml | 2 +- .github/workflows/upstream.yml | 4 ++-- 11 files changed, 30 insertions(+), 30 deletions(-) diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml index 6b7c21cc8..7a765896a 100644 --- a/.github/workflows/bump-version.yml +++ b/.github/workflows/bump-version.yml @@ -51,15 +51,15 @@ jobs: app-id: ${{ secrets.OURANOS_HELPER_BOT_ID }} private-key: ${{ secrets.OURANOS_HELPER_BOT_KEY }} - name: Checkout Repository - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: token: ${{ steps.token_generator.outputs.token }} - name: Set up Python3 - uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 + uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 with: python-version: "3.x" - name: Import GPG Key - uses: crazy-max/ghaction-import-gpg@01dd5d3ca463c7f10f7f4f7b4f177225ac661ee4 # v6.1.0 + uses: crazy-max/ghaction-import-gpg@cb9bde2e2525e640591a934b1fd28eef1dcaf5e5 # v6.2.0 with: gpg_private_key: ${{ secrets.OURANOS_HELPER_BOT_GPG_PRIVATE_KEY }} passphrase: ${{ secrets.OURANOS_HELPER_BOT_GPG_PRIVATE_KEY_PASSWORD }} diff --git a/.github/workflows/cache-cleaner.yml b/.github/workflows/cache-cleaner.yml index fc4462951..5fa3ee24b 100644 --- a/.github/workflows/cache-cleaner.yml +++ b/.github/workflows/cache-cleaner.yml @@ -25,7 +25,7 @@ jobs: objects.githubusercontent.com:443 - name: Checkout Repository - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Cleanup run: | diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 1287bca58..85ed68ecf 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -52,7 +52,7 @@ jobs: pypi.org:443 uploads.github.com:443 - name: Checkout Repository - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL uses: github/codeql-action/init@1245696032ecf7d39f87d54daa406e22ddf769a8 diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml index 280e97655..ad7af9083 100644 --- a/.github/workflows/dependency-review.yml +++ b/.github/workflows/dependency-review.yml @@ -26,7 +26,7 @@ jobs: github.com:443 - name: Checkout Repository - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Dependency Review - uses: actions/dependency-review-action@5a2ce3f5b92ee19cbb1541a4984c76d921601d7c # v4.3.4 + uses: actions/dependency-review-action@4081bf99e2866ebe428fc0477b69eb4fcda7220a # v4.4.0 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 08673fd99..fc75fc2e0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -49,9 +49,9 @@ jobs: github.com:443 pypi.org:443 - name: Checkout Repository - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Set up Python3 - uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 + uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 with: python-version: "3.x" cache: 'pip' @@ -59,7 +59,7 @@ jobs: run: | python -m pip install --require-hashes -r CI/requirements_ci.txt - name: Environment Caching - uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1 + uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 with: path: | ${{ matrix.testdata-cache }} @@ -95,9 +95,9 @@ jobs: pypi.org:443 raw.githubusercontent.com:443 - name: Checkout Repository - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Set up Python${{ matrix.python-version }} - uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 + uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 with: python-version: ${{ matrix.python-version }} cache: 'pip' @@ -105,7 +105,7 @@ jobs: run: | python -m pip install --require-hashes -r CI/requirements_ci.txt - name: Environment Caching - uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1 + uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 with: path: | ${{ matrix.testdata-cache }} @@ -193,14 +193,14 @@ jobs: pypi.org:443 raw.githubusercontent.com:443 - name: Checkout Repository - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Install Eigen3 (SBCK) if: ${{ matrix.python-version == '3.11' && matrix.os == 'ubuntu-latest' }} run: | sudo apt-get update sudo apt-get install libeigen3-dev - name: Set up Python${{ matrix.python-version }} - uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 + uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 with: python-version: ${{ matrix.python-version }} cache: 'pip' @@ -210,7 +210,7 @@ jobs: - name: Environment Caching # if prefetch is not in tox-env if: contains(matrix.tox-env, 'prefetch') == false - uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1 + uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 with: path: | ${{ matrix.testdata-cache }} @@ -267,7 +267,7 @@ jobs: raw.githubusercontent.com:443 repo.anaconda.com:443 - name: Checkout Repository - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Setup Conda (Micromamba) with Python${{ matrix.python-version }} uses: mamba-org/setup-micromamba@617811f69075e3fd3ae68ca64220ad065877f246 # v2.0.0 with: @@ -280,7 +280,7 @@ jobs: run: | echo "micromamba: $(micromamba --version)" - name: Test Data Caching - uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1 + uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 with: path: | ${{ matrix.testdata-cache }} @@ -329,6 +329,6 @@ jobs: disable-sudo: true egress-policy: audit - name: Coveralls Finished - uses: coverallsapp/github-action@4cdef0b2dbe0c9aa26bed48edb868db738625e79 # v2.3.3 + uses: coverallsapp/github-action@cfd0633edbd2411b532b808ba7a8b5e04f76d2c8 # v2.3.4 with: parallel-finished: true diff --git a/.github/workflows/publish-mastodon.yml b/.github/workflows/publish-mastodon.yml index 002fe7a77..ca2f70987 100644 --- a/.github/workflows/publish-mastodon.yml +++ b/.github/workflows/publish-mastodon.yml @@ -35,7 +35,7 @@ jobs: github.com:443 - name: Checkout Repository - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Current Version if: ${{ !github.event.inputs.version-tag }} diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml index 62ae49a15..5744ffaa5 100644 --- a/.github/workflows/publish-pypi.yml +++ b/.github/workflows/publish-pypi.yml @@ -28,9 +28,9 @@ jobs: pypi.org:443 upload.pypi.org:443 - name: Checkout Repository - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Set up Python3 - uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 + uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 with: python-version: "3.x" - name: Install CI libraries @@ -40,4 +40,4 @@ jobs: run: | python -m flit build - name: Publish distribution 📦 to PyPI - uses: pypa/gh-action-pypi-publish@f7600683efdcb7656dec5b29656edb7bc586e597 # v1.10.3 + uses: pypa/gh-action-pypi-publish@fb13cb306901256ace3dab689990e13a5550ffaa # v1.11.0 diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml index ce198d456..7965189a8 100644 --- a/.github/workflows/scorecard.yml +++ b/.github/workflows/scorecard.yml @@ -35,7 +35,7 @@ jobs: egress-policy: audit - name: Checkout Repository - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: persist-credentials: false diff --git a/.github/workflows/tag-testpypi.yml b/.github/workflows/tag-testpypi.yml index 60373dbad..b35b7c0ce 100644 --- a/.github/workflows/tag-testpypi.yml +++ b/.github/workflows/tag-testpypi.yml @@ -28,9 +28,9 @@ jobs: pypi.org:443 test.pypi.org:443 - name: Checkout Repository - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Set up Python3 - uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 + uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 with: python-version: "3.x" - name: Install CI libraries @@ -40,7 +40,7 @@ jobs: run: | python -m flit build - name: Publish distribution 📦 to Test PyPI - uses: pypa/gh-action-pypi-publish@f7600683efdcb7656dec5b29656edb7bc586e597 # v1.10.3 + uses: pypa/gh-action-pypi-publish@fb13cb306901256ace3dab689990e13a5550ffaa # v1.11.0 with: repository-url: https://test.pypi.org/legacy/ skip-existing: true diff --git a/.github/workflows/testdata-version.yml b/.github/workflows/testdata-version.yml index d8535a13f..20da4cbc6 100644 --- a/.github/workflows/testdata-version.yml +++ b/.github/workflows/testdata-version.yml @@ -30,7 +30,7 @@ jobs: api.github.com:443 github.com:443 - name: Checkout Repository - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Find xclim-testdata Tag and CI Testing Branch run: | XCLIM_TESTDATA_TAG="$( \ diff --git a/.github/workflows/upstream.yml b/.github/workflows/upstream.yml index 612f20c97..63f241feb 100644 --- a/.github/workflows/upstream.yml +++ b/.github/workflows/upstream.yml @@ -54,7 +54,7 @@ jobs: raw.githubusercontent.com:443 repo.anaconda.com:443 - name: Checkout Repository - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: fetch-depth: 0 # Fetch all history for all branches and tags. - name: Setup Conda (Micromamba) with Python${{ matrix.python-version }} @@ -85,7 +85,7 @@ jobs: xclim show_version_info python -m pip check || true - name: Test Data Caching - uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1 + uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 with: path: | ${{ matrix.testdata-cache }} From 293fb1c9cd84d12c75e3ae23e9f8261bac2c565a Mon Sep 17 00:00:00 2001 From: Ouranos Helper Bot Date: Wed, 30 Oct 2024 19:52:09 +0000 Subject: [PATCH 18/35] =?UTF-8?q?Bump=20version:=200.53.2-dev.1=20?= =?UTF-8?q?=E2=86=92=200.53.2-dev.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pyproject.toml | 2 +- xclim/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 2dcec8415..0e49d34f2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -135,7 +135,7 @@ target-version = [ ] [tool.bumpversion] -current_version = "0.53.2-dev.1" +current_version = "0.53.2-dev.2" commit = true commit_args = "--no-verify" tag = false diff --git a/xclim/__init__.py b/xclim/__init__.py index aef387b0b..16ca73b60 100644 --- a/xclim/__init__.py +++ b/xclim/__init__.py @@ -13,7 +13,7 @@ __author__ = """Travis Logan""" __email__ = "logan.travis@ouranos.ca" -__version__ = "0.53.2-dev.1" +__version__ = "0.53.2-dev.2" with _resources.as_file(_resources.files("xclim.data")) as _module_data: From dbf616f73028b3adb5389bfb5090354278e036b2 Mon Sep 17 00:00:00 2001 From: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com> Date: Wed, 30 Oct 2024 16:10:45 -0400 Subject: [PATCH 19/35] simplify mastodon publishing --- .github/publish-mastodon-template.md | 4 ++-- .github/workflows/publish-mastodon.yml | 30 ++++---------------------- 2 files changed, 6 insertions(+), 28 deletions(-) diff --git a/.github/publish-mastodon-template.md b/.github/publish-mastodon-template.md index 308374f11..02f628ae0 100644 --- a/.github/publish-mastodon-template.md +++ b/.github/publish-mastodon-template.md @@ -1,5 +1,5 @@ -New #xclim release: {{ .version }} 🎉 +New #xclim release: {{ .tag }} 🎉 -Latest source code available at: https://github.com/Ouranosinc/xclim/releases/tag/{{ .version }} +Latest source code available at: {{ .url }} Check out the docs for more information: https://xclim.readthedocs.io/en/stable/ diff --git a/.github/workflows/publish-mastodon.yml b/.github/workflows/publish-mastodon.yml index ca2f70987..98a5df731 100644 --- a/.github/workflows/publish-mastodon.yml +++ b/.github/workflows/publish-mastodon.yml @@ -3,17 +3,7 @@ name: Publish Release Announcement to Mastodon on: release: types: - - published - workflow_dispatch: - inputs: - version-tag: - description: 'Version to announce' - required: true - type: string - dry-run: - description: 'Dry run' - default: true - type: boolean + - released permissions: contents: read @@ -37,23 +27,11 @@ jobs: - name: Checkout Repository uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - name: Current Version - if: ${{ !github.event.inputs.version-tag }} - run: | - CURRENT_VERSION="$(grep -E '__version__' xclim/__init__.py | cut -d ' ' -f3)" - echo "version=v${CURRENT_VERSION}" >> $GITHUB_ENV - - name: Set Version from Input - if: ${{ github.event.inputs.version-tag }} - run: | - echo "version=${{ github.event.inputs.version-tag }}" >> $GITHUB_ENV - - name: Get Release Description - if: ${{ !endsWith(env.current_version, '-dev') }} - id: get_release_description run: | # Fetch the release information using the GitHub API RELEASE_INFO=$(curl -sH "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ - "https://api.github.com/repos/${{ github.repository }}/releases/tags/${{ env.version }}") + "https://api.github.com/repos/${{ github.repository }}/releases/tags/${{ github.event.release.tag_name }}") # Extract the release description from the response RELEASE_DESCRIPTION=$(echo "$RELEASE_INFO" | jq -r .body) @@ -72,14 +50,14 @@ jobs: with: template: .github/publish-mastodon-template.md vars: | - version: ${{ env.version }} + tag: ${{ github.event.release.tag_name }} + url: https://github.com/Ouranosinc/xclim/releases/tag/${{ github.event.release.tag_name }} - name: Message Preview run: | echo "${{ steps.render_template.outputs.result }}${{ env.contributors }}" - name: Send toot to Mastodon - if: ${{ github.event.inputs.dry-run != 'true' }} || ${{ github.event_name == 'release' }} uses: cbrgm/mastodon-github-action@b26d62619432b20c2129edd86f07f7ede9797fc9 # v2.1.9 with: url: ${{ secrets.MASTODON_URL }} From a4ac75322c779a066f2874f552f425a75eebfe0c Mon Sep 17 00:00:00 2001 From: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com> Date: Wed, 30 Oct 2024 16:13:26 -0400 Subject: [PATCH 20/35] update date in CHANGELOG.rst --- CHANGELOG.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 8e376b77d..a20bd834e 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -2,7 +2,7 @@ Changelog ========= -v0.53.2 (2024-10-25) +v0.53.2 (2024-10-30) -------------------- Contributors to this version: Éric Dupuis (:user:`coxipi`), Pascal Bourgault (:user:`aulemahal`), Trevor James Smith (:user:`Zeitsperre`). From 17ecdf01013a7e8d1f8a202b0fdfe8a42f76edad Mon Sep 17 00:00:00 2001 From: Ouranos Helper Bot Date: Wed, 30 Oct 2024 20:32:02 +0000 Subject: [PATCH 21/35] =?UTF-8?q?Bump=20version:=200.53.2=20=E2=86=92=200.?= =?UTF-8?q?53.3-dev.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pyproject.toml | 2 +- xclim/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 046c7f9bd..056c39f11 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -135,7 +135,7 @@ target-version = [ ] [tool.bumpversion] -current_version = "0.53.2" +current_version = "0.53.3-dev.0" commit = true commit_args = "--no-verify" tag = false diff --git a/xclim/__init__.py b/xclim/__init__.py index 2680845d2..c6bb279b2 100644 --- a/xclim/__init__.py +++ b/xclim/__init__.py @@ -13,7 +13,7 @@ __author__ = """Travis Logan""" __email__ = "logan.travis@ouranos.ca" -__version__ = "0.53.2" +__version__ = "0.53.3-dev.0" with _resources.as_file(_resources.files("xclim.data")) as _module_data: From 37b8b4aa4ffd38ff3abc4e6f197404a02b68089b Mon Sep 17 00:00:00 2001 From: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com> Date: Wed, 30 Oct 2024 16:35:34 -0400 Subject: [PATCH 22/35] =?UTF-8?q?Revert=20"Bump=20version:=200.53.2=20?= =?UTF-8?q?=E2=86=92=200.53.3-dev.0"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 17ecdf01013a7e8d1f8a202b0fdfe8a42f76edad. --- pyproject.toml | 2 +- xclim/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 056c39f11..046c7f9bd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -135,7 +135,7 @@ target-version = [ ] [tool.bumpversion] -current_version = "0.53.3-dev.0" +current_version = "0.53.2" commit = true commit_args = "--no-verify" tag = false diff --git a/xclim/__init__.py b/xclim/__init__.py index c6bb279b2..2680845d2 100644 --- a/xclim/__init__.py +++ b/xclim/__init__.py @@ -13,7 +13,7 @@ __author__ = """Travis Logan""" __email__ = "logan.travis@ouranos.ca" -__version__ = "0.53.3-dev.0" +__version__ = "0.53.2" with _resources.as_file(_resources.files("xclim.data")) as _module_data: From 5e2e05e23d2ae6a002797029cc18020ff2bb7786 Mon Sep 17 00:00:00 2001 From: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com> Date: Wed, 30 Oct 2024 16:37:55 -0400 Subject: [PATCH 23/35] add missing files to ignore --- .github/workflows/bump-version.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml index 7a765896a..7a58ef1ef 100644 --- a/.github/workflows/bump-version.yml +++ b/.github/workflows/bump-version.yml @@ -8,6 +8,8 @@ on: - .* - .github/*/*.md - .github/*/*.yml + - .github/*.md + - .github/*.yml - CHANGELOG.rst - CI/*.in - CI/*.txt From 9d530d99b449b294e6b4c6e99c7fdd30c5c4012f Mon Sep 17 00:00:00 2001 From: Pascal Bourgault Date: Wed, 30 Oct 2024 18:04:26 -0400 Subject: [PATCH 24/35] Fix indexer injection --- CHANGELOG.rst | 1 + docs/notebooks/example/example.yml | 5 ++- docs/notebooks/extendxclim.ipynb | 69 ++++++++++++++++++++++-------- tests/test_modules.py | 6 +++ xclim/core/indicator.py | 46 +++++++++++++------- 5 files changed, 91 insertions(+), 36 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index a20bd834e..c80fba2a4 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -15,6 +15,7 @@ Bug fixes * Fixed a bug where the units could be changed before a conversion of the magnitudes could occur. Conversion of units for multivariate ``DataArray`` is now properly handled in `sdba.TrainAdjust` and `sdba.Adjust`. (:pull:`1972`). * Fixed a units formatting bug with indicators that output "delta" Celsius degrees. (:pull:`1973`). * Corrected the ``"choices"`` of parameter ``op`` in the docstring of ``frost_free_spell_max_length``. (:pull:`1977`). +* Reorganised how ``Indicator`` subclasses can added arguments to the call signature. Injecting such arguments now works. For xclim's subclasses, this bug only affected the ``indexer`` argument of indicators subclassing ``xc.core.indicator.IndexingIndicator``. (:pull:`1981`). v0.53.1 (2024-10-21) -------------------- diff --git a/docs/notebooks/example/example.yml b/docs/notebooks/example/example.yml index 6b5201b5e..30cdb575c 100644 --- a/docs/notebooks/example/example.yml +++ b/docs/notebooks/example/example.yml @@ -12,10 +12,13 @@ variables: description: Precipitation flux on the outer surface of the forest standard_name: precipitation_flux_onto_canopy indicators: - RX1day: + RX1day_summer: base: rx1day cf_attrs: long_name: Highest 1-day precipitation amount + parameters: + indexer: + month: [5, 6, 7, 8, 9] context: hydro RX5day_canopy: base: max_n_day_precipitation_amount diff --git a/docs/notebooks/extendxclim.ipynb b/docs/notebooks/extendxclim.ipynb index 8293e3ba5..f71f814cb 100644 --- a/docs/notebooks/extendxclim.ipynb +++ b/docs/notebooks/extendxclim.ipynb @@ -4,7 +4,8 @@ "cell_type": "code", "execution_count": null, "metadata": { - "nbsphinx": "hidden" + "nbsphinx": "hidden", + "tags": [] }, "outputs": [], "source": [ @@ -89,7 +90,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [] + }, "outputs": [], "source": [ "import xarray as xr\n", @@ -214,7 +217,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [] + }, "outputs": [], "source": [ "from xclim.core.indicator import registry\n", @@ -231,7 +236,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [] + }, "outputs": [], "source": [ "display(Code(tg_mean_c.__doc__, language=\"rst\"))" @@ -249,7 +256,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [] + }, "outputs": [], "source": [ "tg_mean_c.__module__ == xclim.atmos.tg_mean.__module__" @@ -265,7 +274,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [] + }, "outputs": [], "source": [ "# Passing module\n", @@ -277,7 +288,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [] + }, "outputs": [], "source": [ "# Conventional class inheritance, uses the current module name\n", @@ -319,7 +332,8 @@ "cell_type": "code", "execution_count": null, "metadata": { - "nbsphinx": "hidden" + "nbsphinx": "hidden", + "tags": [] }, "outputs": [], "source": [ @@ -338,7 +352,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [] + }, "outputs": [], "source": [ "# These variables were generated by a hidden cell above that syntax-colored them.\n", @@ -362,7 +378,7 @@ "\n", "\n", "\n", - "- `RX1day` is simply the same as `registry['RX1DAY']`, but with an updated `long_name`.\n", + "- `RX1day` is as `registry['RX1DAY']`, but with an updated `long_name` and an injected argument : its `indexer` arg is not set to only compute over may to september.\n", "- `RX5day_canopy` is based on `registry['MAX_N_DAY_PRECIPITATION_AMOUNT']`, changed the `long_name` and injects the `window` and `freq` arguments.\n", " * It also requests a different variable than the original indicator : `prveg` instead of `pr`. As xclim doesn't know about `prveg`, a definition is given in the `variables` section.\n", "- `R75pdays` is based on `registry['DAYS_OVER_PRECIP_THRESH']`, injects the `thresh` argument and changes the description of the `per` argument.\n", @@ -397,7 +413,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [] + }, "outputs": [], "source": [ "from importlib.resources import files\n", @@ -431,7 +449,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [] + }, "outputs": [], "source": [ "import xclim as xc\n", @@ -444,7 +464,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [] + }, "outputs": [], "source": [ "docstring = f\"{example.__doc__}\\n---\\n\\n{xc.indicators.example.R99p.__doc__}\"\n", @@ -461,7 +483,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [] + }, "outputs": [], "source": [ "from xclim.testing import open_dataset\n", @@ -505,7 +529,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [] + }, "outputs": [], "source": [ "out = xr.merge(outs)\n", @@ -527,7 +553,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [] + }, "outputs": [], "source": [ "from xclim.core.indicator import build_indicator_module, registry\n", @@ -565,7 +593,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [] + }, "outputs": [], "source": [ "print(xc.indicators.awesome.__doc__)" @@ -575,7 +605,8 @@ "cell_type": "code", "execution_count": null, "metadata": { - "nbsphinx": "hidden" + "nbsphinx": "hidden", + "tags": [] }, "outputs": [], "source": [ @@ -597,7 +628,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.12.5" + "version": "3.12.6" }, "toc": { "base_numbering": 1, diff --git a/tests/test_modules.py b/tests/test_modules.py index d2817b37b..1acad05de 100644 --- a/tests/test_modules.py +++ b/tests/test_modules.py @@ -104,6 +104,12 @@ def test_custom_indices(open_dataset): example_path / "example.yml", name="ex4", mode="ignore" ) + # Check that indexer was added and injected correctly + assert "indexer" not in ex1.RX1day_summer.parameters + assert ex1.RX1day_summer.injected_parameters["indexer"] == { + "month": [5, 6, 7, 8, 9] + } + @pytest.mark.requires_docs def test_indicator_module_translations(): diff --git a/xclim/core/indicator.py b/xclim/core/indicator.py index 768a580c8..eda17e7c5 100644 --- a/xclim/core/indicator.py +++ b/xclim/core/indicator.py @@ -88,6 +88,8 @@ In the following, the section under `` is referred to as `data`. When creating indicators from a dictionary, with :py:meth:`Indicator.from_dict`, the input dict must follow the same structure of `data`. +Note that kwargs-like parameters like ``indexer`` must be injected as a dictionary (``param data`` above should be a dictionary). + When a module is built from a yaml file, the yaml is first validated against the schema (see xclim/data/schema.yml) using the YAMALE library (:cite:p:`lopker_yamale_2022`). See the "Extending xclim" notebook for more info. @@ -301,7 +303,7 @@ class Indicator(IndicatorRegistrar): Both are simply views of :py:attr:`xclim.core.indicator.Indicator._all_parameters`. Compared to their base `compute` function, indicators add the possibility of using dataset as input, - with the injected argument `ds` in the call signature. All arguments that were indicated + with the added argument `ds` in the call signature. All arguments that were indicated by the compute function to be variables (DataArrays) through annotations will be promoted to also accept strings that correspond to variable names in the `ds` dataset. @@ -425,12 +427,13 @@ def __new__(cls, **kwds): # noqa: C901 # title, abstract, references, notes, long_name kwds.setdefault(name, value) - # Inject parameters (subclasses can override or extend this through _injected_parameters) - for name, param in cls._injected_parameters(): + # Inject parameters + # Subclasses can override or extend this through the classmethod _added_parameters + for name, param in cls._added_parameters(): if name in parameters: raise ValueError( f"Class {cls.__name__} can't wrap indices that have a `{name}`" - " argument as it conflicts with arguments it injects." + " argument as it conflicts with an argument it adds." ) parameters[name] = param else: # inherit parameters from base class @@ -529,8 +532,13 @@ def _parse_indice(compute, passed_parameters): # noqa: F841 return parameters, docmeta @classmethod - def _injected_parameters(cls): - """Create a list of tuples for arguments to inject, (name, Parameter).""" + def _added_parameters(cls): + """Create a list of tuples for arguments to add to the call signature (name, Parameter). + + These can't be in the compute function signature, the class is in charge of removing them + from the params passed to the compute function, likely through an override of + _preprocess_and_checks. + """ return [ ( "ds", @@ -1536,16 +1544,22 @@ def _preprocess_and_checks(self, das, params): class IndexingIndicator(Indicator): """Indicator that also injects "indexer" kwargs to subset the inputs before computation.""" - def __init__(self, *args, **kwargs): - self._all_parameters["indexer"] = Parameter( - kind=InputKind.KWARGS, - description=( - "Indexing parameters to compute the indicator on a temporal " - "subset of the data. It accepts the same arguments as " - ":py:func:`xclim.indices.generic.select_time`." - ), - ) - super().__init__(*args, **kwargs) + @classmethod + def _added_parameters(cls): + """Create a list of tuples for arguments to add (name, Parameter).""" + return super()._added_parameters() + [ + ( + "indexer", + Parameter( + kind=InputKind.KWARGS, + description=( + "Indexing parameters to compute the indicator on a temporal " + "subset of the data. It accepts the same arguments as " + ":py:func:`xclim.indices.generic.select_time`." + ), + ), + ) + ] def _preprocess_and_checks(self, das: dict[str, DataArray], params: dict[str, Any]): """Perform parent's checks and also check if freq is allowed.""" From 5f2d6dc063946d90087b6084169b611ee45486bc Mon Sep 17 00:00:00 2001 From: Pascal Bourgault Date: Wed, 30 Oct 2024 18:12:08 -0400 Subject: [PATCH 25/35] language fixes --- docs/notebooks/extendxclim.ipynb | 2 +- xclim/core/indicator.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/notebooks/extendxclim.ipynb b/docs/notebooks/extendxclim.ipynb index f71f814cb..179bc200e 100644 --- a/docs/notebooks/extendxclim.ipynb +++ b/docs/notebooks/extendxclim.ipynb @@ -378,7 +378,7 @@ "\n", "\n", "\n", - "- `RX1day` is as `registry['RX1DAY']`, but with an updated `long_name` and an injected argument : its `indexer` arg is not set to only compute over may to september.\n", + "- `RX1day` is as `registry['RX1DAY']`, but with an updated `long_name` and an injected argument : its `indexer` arg is now set to only compute over may to september.\n", "- `RX5day_canopy` is based on `registry['MAX_N_DAY_PRECIPITATION_AMOUNT']`, changed the `long_name` and injects the `window` and `freq` arguments.\n", " * It also requests a different variable than the original indicator : `prveg` instead of `pr`. As xclim doesn't know about `prveg`, a definition is given in the `variables` section.\n", "- `R75pdays` is based on `registry['DAYS_OVER_PRECIP_THRESH']`, injects the `thresh` argument and changes the description of the `per` argument.\n", diff --git a/xclim/core/indicator.py b/xclim/core/indicator.py index eda17e7c5..1822d04c4 100644 --- a/xclim/core/indicator.py +++ b/xclim/core/indicator.py @@ -427,7 +427,7 @@ def __new__(cls, **kwds): # noqa: C901 # title, abstract, references, notes, long_name kwds.setdefault(name, value) - # Inject parameters + # Added parameters # Subclasses can override or extend this through the classmethod _added_parameters for name, param in cls._added_parameters(): if name in parameters: @@ -957,7 +957,7 @@ def _preprocess_and_checks(self, das, params): def _get_compute_args(self, das, params): """Rename variables and parameters to match the compute function's names and split VAR_KEYWORD arguments.""" # Get correct variable names for the compute function. - # Exclude param without a mapping inside the compute functions (those injected by the indicator class) + # Exclude param without a mapping inside the compute functions (those added by the indicator class) args = {} for key, p in self._all_parameters.items(): if p.compute_name is not _empty: @@ -1542,7 +1542,7 @@ def _preprocess_and_checks(self, das, params): class IndexingIndicator(Indicator): - """Indicator that also injects "indexer" kwargs to subset the inputs before computation.""" + """Indicator that also adds the "indexer" kwargs to subset the inputs before computation.""" @classmethod def _added_parameters(cls): @@ -1573,7 +1573,7 @@ def _preprocess_and_checks(self, das: dict[str, DataArray], params: dict[str, An class ResamplingIndicatorWithIndexing(ResamplingIndicator, IndexingIndicator): - """Resampling indicator that also injects "indexer" kwargs to subset the inputs before computation.""" + """Resampling indicator that also adds "indexer" kwargs to subset the inputs before computation.""" class Daily(ResamplingIndicator): From b1ccc75631fcf757213cbe95b0257759493acaa9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Dupuis?= Date: Thu, 31 Oct 2024 09:58:54 -0400 Subject: [PATCH 26/35] fix all_nan slices in ExtremeValues (1d) --- tests/test_sdba/test_adjustment.py | 15 +++++++++++++++ xclim/sdba/_adjustment.py | 4 ++++ 2 files changed, 19 insertions(+) diff --git a/tests/test_sdba/test_adjustment.py b/tests/test_sdba/test_adjustment.py index f7d1c47f8..706bc5a29 100644 --- a/tests/test_sdba/test_adjustment.py +++ b/tests/test_sdba/test_adjustment.py @@ -725,6 +725,8 @@ def dist(ref, sim): assert (ref - scen).mean().tasmin < 5e-3 +# TODO: below we use `.adjust(scen,sim)`, but in the function signature, `sim` comes before +# are we testing the right thing below? class TestExtremeValues: @pytest.mark.parametrize( "c_thresh,q_thresh,frac,power", @@ -805,6 +807,19 @@ def test_real_data(self, open_dataset): new_scen = EX.adjust(scen, hist, frac=0.000000001) new_scen.load() + def test_nan_values(self): + times = xr.cftime_range("1990-01-01", periods=365, calendar="noleap") + ref = xr.DataArray( + np.arange(365), + dims=("time"), + coords={"time": times}, + attrs={"units": "mm/day"}, + ) + hist = (ref.copy() * np.nan).assign_attrs(ref.attrs) + EX = ExtremeValues.train(ref, hist, cluster_thresh="10 mm/day", q_thresh=0.9) + new_scen = EX.adjust(sim=hist, scen=ref) + assert new_scen.isnull().all() + class TestOTC: def test_compare_sbck(self, random, series): diff --git a/xclim/sdba/_adjustment.py b/xclim/sdba/_adjustment.py index 431df0195..b84bd7d03 100644 --- a/xclim/sdba/_adjustment.py +++ b/xclim/sdba/_adjustment.py @@ -778,6 +778,10 @@ def _fit_on_cluster(data, thresh, dist, cluster_thresh): def _extremes_train_1d(ref, hist, ref_params, *, q_thresh, cluster_thresh, dist, N): """Train for method ExtremeValues, only for 1D input along time.""" + # Fast-track, do nothing for all-nan slices + if all(np.isnan(ref)) or all(np.isnan(hist)): + return np.full(N, np.nan), np.full(N, np.nan), np.nan + # Find quantile q_thresh thresh = ( np.quantile(ref[ref >= cluster_thresh], q_thresh) From dfc344b6e99c5665ff9454cffcdf25bc8b2a5cb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Dupuis?= Date: Thu, 31 Oct 2024 10:01:44 -0400 Subject: [PATCH 27/35] update CHANGELOG --- CHANGELOG.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index a20bd834e..75b0b3227 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -15,6 +15,7 @@ Bug fixes * Fixed a bug where the units could be changed before a conversion of the magnitudes could occur. Conversion of units for multivariate ``DataArray`` is now properly handled in `sdba.TrainAdjust` and `sdba.Adjust`. (:pull:`1972`). * Fixed a units formatting bug with indicators that output "delta" Celsius degrees. (:pull:`1973`). * Corrected the ``"choices"`` of parameter ``op`` in the docstring of ``frost_free_spell_max_length``. (:pull:`1977`). +* All-nan slices are now treated correctly in method `ExtremeValues`. (:issue:`1982`, :pull:`1983`). v0.53.1 (2024-10-21) -------------------- From 87d4e79fab087461d2d68f839f41eb123ab5ed54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Dupuis?= Date: Thu, 31 Oct 2024 10:16:29 -0400 Subject: [PATCH 28/35] quantile -> nanquantile for mixed cases --- xclim/sdba/_adjustment.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xclim/sdba/_adjustment.py b/xclim/sdba/_adjustment.py index b84bd7d03..ed7b4e36c 100644 --- a/xclim/sdba/_adjustment.py +++ b/xclim/sdba/_adjustment.py @@ -784,8 +784,8 @@ def _extremes_train_1d(ref, hist, ref_params, *, q_thresh, cluster_thresh, dist, # Find quantile q_thresh thresh = ( - np.quantile(ref[ref >= cluster_thresh], q_thresh) - + np.quantile(hist[hist >= cluster_thresh], q_thresh) + np.nanquantile(ref[ref >= cluster_thresh], q_thresh) + + np.nanquantile(hist[hist >= cluster_thresh], q_thresh) ) / 2 # Fit genpareto on cluster maximums on ref (if needed) and hist. From 3d2be15351bf51c0305ac83a704d865f6c216700 Mon Sep 17 00:00:00 2001 From: Ouranos Helper Bot Date: Thu, 31 Oct 2024 14:32:58 +0000 Subject: [PATCH 29/35] =?UTF-8?q?Bump=20version:=200.53.2=20=E2=86=92=200.?= =?UTF-8?q?53.3-dev.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pyproject.toml | 2 +- xclim/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 046c7f9bd..056c39f11 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -135,7 +135,7 @@ target-version = [ ] [tool.bumpversion] -current_version = "0.53.2" +current_version = "0.53.3-dev.0" commit = true commit_args = "--no-verify" tag = false diff --git a/xclim/__init__.py b/xclim/__init__.py index 2680845d2..c6bb279b2 100644 --- a/xclim/__init__.py +++ b/xclim/__init__.py @@ -13,7 +13,7 @@ __author__ = """Travis Logan""" __email__ = "logan.travis@ouranos.ca" -__version__ = "0.53.2" +__version__ = "0.53.3-dev.0" with _resources.as_file(_resources.files("xclim.data")) as _module_data: From b517f4c676835de76b43446517fc8ff6b8e678e9 Mon Sep 17 00:00:00 2001 From: Ouranos Helper Bot Date: Thu, 31 Oct 2024 14:58:41 +0000 Subject: [PATCH 30/35] =?UTF-8?q?Bump=20version:=200.53.3-dev.0=20?= =?UTF-8?q?=E2=86=92=200.53.3-dev.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pyproject.toml | 2 +- xclim/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 056c39f11..20973542b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -135,7 +135,7 @@ target-version = [ ] [tool.bumpversion] -current_version = "0.53.3-dev.0" +current_version = "0.53.3-dev.1" commit = true commit_args = "--no-verify" tag = false diff --git a/xclim/__init__.py b/xclim/__init__.py index c6bb279b2..f9468bfe2 100644 --- a/xclim/__init__.py +++ b/xclim/__init__.py @@ -13,7 +13,7 @@ __author__ = """Travis Logan""" __email__ = "logan.travis@ouranos.ca" -__version__ = "0.53.3-dev.0" +__version__ = "0.53.3-dev.1" with _resources.as_file(_resources.files("xclim.data")) as _module_data: From 079a8888314b680a9bc5a825e111bd23b6c0099f Mon Sep 17 00:00:00 2001 From: Zeitsperre <10819524+Zeitsperre@users.noreply.github.com> Date: Thu, 31 Oct 2024 11:00:36 -0400 Subject: [PATCH 31/35] unblock port --- .github/workflows/publish-pypi.yml | 1 + .github/workflows/tag-testpypi.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml index 5744ffaa5..e257a4f20 100644 --- a/.github/workflows/publish-pypi.yml +++ b/.github/workflows/publish-pypi.yml @@ -26,6 +26,7 @@ jobs: files.pythonhosted.org:443 github.com:443 pypi.org:443 + ruf-repo-cdn.sigstore.dev:443 upload.pypi.org:443 - name: Checkout Repository uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 diff --git a/.github/workflows/tag-testpypi.yml b/.github/workflows/tag-testpypi.yml index b35b7c0ce..ed02073b3 100644 --- a/.github/workflows/tag-testpypi.yml +++ b/.github/workflows/tag-testpypi.yml @@ -26,6 +26,7 @@ jobs: files.pythonhosted.org:443 github.com:443 pypi.org:443 + ruf-repo-cdn.sigstore.dev:443 test.pypi.org:443 - name: Checkout Repository uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 From 1008128d93f2fa6ed76b29eae4d9d70c71523da9 Mon Sep 17 00:00:00 2001 From: Zeitsperre <10819524+Zeitsperre@users.noreply.github.com> Date: Thu, 31 Oct 2024 11:01:34 -0400 Subject: [PATCH 32/35] =?UTF-8?q?Bump=20version:=200.53.3-dev.1=20?= =?UTF-8?q?=E2=86=92=200.53.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pyproject.toml | 2 +- xclim/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 20973542b..046c7f9bd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -135,7 +135,7 @@ target-version = [ ] [tool.bumpversion] -current_version = "0.53.3-dev.1" +current_version = "0.53.2" commit = true commit_args = "--no-verify" tag = false diff --git a/xclim/__init__.py b/xclim/__init__.py index f9468bfe2..2680845d2 100644 --- a/xclim/__init__.py +++ b/xclim/__init__.py @@ -13,7 +13,7 @@ __author__ = """Travis Logan""" __email__ = "logan.travis@ouranos.ca" -__version__ = "0.53.3-dev.1" +__version__ = "0.53.2" with _resources.as_file(_resources.files("xclim.data")) as _module_data: From d9df737a7ecbc96ac5de22d8fd7c0a0bbbdfca88 Mon Sep 17 00:00:00 2001 From: Zeitsperre <10819524+Zeitsperre@users.noreply.github.com> Date: Thu, 31 Oct 2024 11:02:51 -0400 Subject: [PATCH 33/35] update release date --- CHANGELOG.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index ecda8c215..432a414f5 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -2,7 +2,7 @@ Changelog ========= -v0.53.2 (2024-10-30) +v0.53.2 (2024-10-31) -------------------- Contributors to this version: Éric Dupuis (:user:`coxipi`), Pascal Bourgault (:user:`aulemahal`), Trevor James Smith (:user:`Zeitsperre`). From 2b03d09619536e50b765dc55f1f0b808b09b16ba Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Nov 2024 12:54:21 +0000 Subject: [PATCH 34/35] Bump the python group with 2 updates Bumps the python group with 2 updates: [bump-my-version](https://github.com/callowayproject/bump-my-version) and [flit](https://github.com/pypa/flit). Updates `bump-my-version` from 0.28.0 to 0.28.1 - [Release notes](https://github.com/callowayproject/bump-my-version/releases) - [Changelog](https://github.com/callowayproject/bump-my-version/blob/master/CHANGELOG.md) - [Commits](https://github.com/callowayproject/bump-my-version/compare/0.28.0...0.28.1) Updates `flit` from 3.9.0 to 3.10.1 - [Changelog](https://github.com/pypa/flit/blob/main/doc/history.rst) - [Commits](https://github.com/pypa/flit/compare/3.9.0...3.10.1) --- updated-dependencies: - dependency-name: bump-my-version dependency-type: direct:production update-type: version-update:semver-patch dependency-group: python - dependency-name: flit dependency-type: direct:production update-type: version-update:semver-minor dependency-group: python ... Signed-off-by: dependabot[bot] --- CI/requirements_ci.in | 4 ++-- CI/requirements_ci.txt | 18 +++++++++--------- pyproject.toml | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/CI/requirements_ci.in b/CI/requirements_ci.in index 57e716975..dbff75495 100644 --- a/CI/requirements_ci.in +++ b/CI/requirements_ci.in @@ -1,6 +1,6 @@ -bump-my-version==0.28.0 +bump-my-version==0.28.1 deptry==0.20.0 -flit==3.9.0 +flit==3.10.1 pip==24.3.1 pylint==3.3.1 tox==4.23.2 diff --git a/CI/requirements_ci.txt b/CI/requirements_ci.txt index e78775817..14c8334ea 100644 --- a/CI/requirements_ci.txt +++ b/CI/requirements_ci.txt @@ -16,9 +16,9 @@ bracex==2.4 \ --hash=sha256:a27eaf1df42cf561fed58b7a8f3fdf129d1ea16a81e1fadd1d17989bc6384beb \ --hash=sha256:efdc71eff95eaff5e0f8cfebe7d01adf2c8637c8c92edaf63ef348c241a82418 # via wcmatch -bump-my-version==0.28.0 \ - --hash=sha256:cc84ace477022a4cc8c401ef5c035f2f752df45488be90ccb764a47f7de0e395 \ - --hash=sha256:ff3cb51bb15509ae8ebb8e8efa3eaa7c02209677f45457c8b007ef2f5bef7179 +bump-my-version==0.28.1 \ + --hash=sha256:df7fdb02a1b43c122a6714df6d1fe4efc7a1220b5638ca5a0eb3018813c1b222 \ + --hash=sha256:e608def5191baf505b6cde88bd679a0a95fc4cfeace4247adb60ac0f8a7e57ee # via -r CI/requirements_ci.in cachetools==5.5.0 \ --hash=sha256:02134e8439cdc2ffb62023ce1debca2944c3f289d66bb17ead3ab3dede74b292 \ @@ -167,13 +167,13 @@ filelock==3.16.1 \ # via # tox # virtualenv -flit==3.9.0 \ - --hash=sha256:076c3aaba5ac24cf0ad3251f910900d95a08218e6bcb26f21fef1036cc4679ca \ - --hash=sha256:d75edf5eb324da20d53570a6a6f87f51e606eee8384925cd66a90611140844c7 +flit==3.10.1 \ + --hash=sha256:9c6258ae76d218ce60f9e39a43ca42006a3abcc5c44ea6bb2a1daa13857a8f1a \ + --hash=sha256:d79c19c2caae73cc486d3d827af6a11c1a84b9efdfab8d9683b714ec8d1dc1f1 # via -r CI/requirements_ci.in -flit-core==3.9.0 \ - --hash=sha256:72ad266176c4a3fcfab5f2930d76896059851240570ce9a98733b658cb786eba \ - --hash=sha256:7aada352fb0c7f5538c4fafeddf314d3a6a92ee8e2b1de70482329e42de70301 +flit-core==3.10.1 \ + --hash=sha256:66e5b87874a0d6e39691f0e22f09306736b633548670ad3c09ec9db03c5662f7 \ + --hash=sha256:cb31a76e8b31ad3351bb89e531f64ef2b05d1e65bd939183250bf81ddf4922a8 # via flit idna==3.7 \ --hash=sha256:028ff3aadf0609c1fd278d8ea3089299412a7a8b9bd005dd08b9f8285bcb5cfc \ diff --git a/pyproject.toml b/pyproject.toml index 046c7f9bd..082108e7a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,7 @@ dev = [ # Dev tools and testing "black[jupyter] ==24.10.0", "blackdoc ==0.3.9", - "bump-my-version ==0.28.0", + "bump-my-version ==0.28.1", "codespell ==2.3.0", "coverage[toml] >=7.5.0", "coveralls >=4.0.1", # coveralls is not yet compatible with Python 3.13 From 432e560fb4cbfc870783e1eac7e13b27da79927d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 4 Nov 2024 22:39:10 +0000 Subject: [PATCH 35/35] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/asottile/pyupgrade: v3.18.0 → v3.19.0](https://github.com/asottile/pyupgrade/compare/v3.18.0...v3.19.0) - [github.com/astral-sh/ruff-pre-commit: v0.7.0 → v0.7.2](https://github.com/astral-sh/ruff-pre-commit/compare/v0.7.0...v0.7.2) - [github.com/kynan/nbstripout: 0.7.1 → 0.8.0](https://github.com/kynan/nbstripout/compare/0.7.1...0.8.0) - [github.com/gitleaks/gitleaks: v8.21.1 → v8.21.2](https://github.com/gitleaks/gitleaks/compare/v8.21.1...v8.21.2) --- .pre-commit-config.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c10978044..56181b7ae 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ default_language_version: repos: - repo: https://github.com/asottile/pyupgrade - rev: v3.18.0 + rev: v3.19.0 hooks: - id: pyupgrade args: ['--py39-plus'] @@ -37,7 +37,7 @@ repos: hooks: - id: black - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.7.0 + rev: v0.7.2 hooks: - id: ruff args: [ '--fix', '--show-fixes' ] @@ -65,7 +65,7 @@ repos: - id: nbqa-black additional_dependencies: [ 'black==24.10.0' ] - repo: https://github.com/kynan/nbstripout - rev: 0.7.1 + rev: 0.8.0 hooks: - id: nbstripout files: '.ipynb' @@ -99,7 +99,7 @@ repos: - id: codespell additional_dependencies: [ 'tomli' ] - repo: https://github.com/gitleaks/gitleaks - rev: v8.21.1 + rev: v8.21.2 hooks: - id: gitleaks - repo: https://github.com/python-jsonschema/check-jsonschema