From 892337553d93d787171558d33cb79c89214e3a62 Mon Sep 17 00:00:00 2001 From: Julien Seguinot <1186928+juseg@users.noreply.github.com> Date: Tue, 4 Jun 2024 10:58:19 +0200 Subject: [PATCH 1/5] Assign new variables without coords. --- hyoga/core/accessor.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hyoga/core/accessor.py b/hyoga/core/accessor.py index c03a726..214e8fa 100644 --- a/hyoga/core/accessor.py +++ b/hyoga/core/accessor.py @@ -1,4 +1,4 @@ -# Copyright (c) 2021-2022, Julien Seguinot (juseg.github.io) +# Copyright (c) 2021-2024, Julien Seguinot (juseg.dev) # GNU General Public License v3.0+ (https://www.gnu.org/licenses/gpl-3.0.txt) """ @@ -179,8 +179,8 @@ def assign(self, **standard_variables): f"{variable_name}_ instead", UserWarning) variable_name += '_' - # link variable data to short name - variables[variable_name] = data + # link variable data to short name (skip coords, see #74) + variables[variable_name] = data.variable # assign new variables and return a new dataset return self._ds.assign(variables) From 4c495df758749f9d799b59c880d0f9327408bf77 Mon Sep 17 00:00:00 2001 From: Julien Seguinot <1186928+juseg@users.noreply.github.com> Date: Tue, 4 Jun 2024 11:01:31 +0200 Subject: [PATCH 2/5] Support cf-xarray 0.8.0 and newer. --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index dfb48fd..f4432e2 100644 --- a/setup.cfg +++ b/setup.cfg @@ -22,7 +22,7 @@ classifiers = [options] packages = find: install_requires = - cf_xarray<0.8.0 + cf_xarray geopandas matplotlib requests From 3021b23044421fe60d092b9c259601e5b212ff8a Mon Sep 17 00:00:00 2001 From: Julien Seguinot <1186928+juseg@users.noreply.github.com> Date: Tue, 4 Jun 2024 11:15:30 +0200 Subject: [PATCH 3/5] Document changes in whatsnew. --- doc/whatsnew.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/whatsnew.rst b/doc/whatsnew.rst index 86547eb..bfd21d1 100644 --- a/doc/whatsnew.rst +++ b/doc/whatsnew.rst @@ -29,7 +29,8 @@ v0.3.1 (unreleased) Bug fixes ~~~~~~~~~ -- Add missing optional dependency to dask_ (:issue:`73`, :pull:`76`). +- Add missing optional dependency to dask_ (:issue:`74`, :pull:`76`). +- Fix incompatibility with cf_xarray_ 0.8.0 (:issue:`73`, :pull:`78`). .. _dask: https://www.dask.org From be52247d05994c2e60ab744677de31c4a0283e19 Mon Sep 17 00:00:00 2001 From: Julien Seguinot <1186928+juseg@users.noreply.github.com> Date: Tue, 4 Jun 2024 11:16:17 +0200 Subject: [PATCH 4/5] Drop support for Python 3.8. --- .github/workflows/tests.yaml | 2 +- setup.cfg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index d3c5231..83f5184 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + python-version: ["3.9", "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v3 diff --git a/setup.cfg b/setup.cfg index f4432e2..c7bc17c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -29,7 +29,7 @@ install_requires = rioxarray scipy xarray -python_requires = >=3.8 +python_requires = >=3.9 [options.extras_require] docs = From 649e7aa97ffbd9cd2271d55386e9c0777e01192c Mon Sep 17 00:00:00 2001 From: Julien Seguinot <1186928+juseg@users.noreply.github.com> Date: Tue, 4 Jun 2024 11:57:59 +0200 Subject: [PATCH 5/5] Document that in whatsnew. --- doc/whatsnew.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/whatsnew.rst b/doc/whatsnew.rst index bfd21d1..5e8ba00 100644 --- a/doc/whatsnew.rst +++ b/doc/whatsnew.rst @@ -26,6 +26,11 @@ What's new v0.3.1 (unreleased) ------------------- +Breaking changes +~~~~~~~~~~~~~~~~ + +- Require Python 3.9 or newer (:pull:`78`). + Bug fixes ~~~~~~~~~