From 6562be2ca0356096671e95e4d32984acac966564 Mon Sep 17 00:00:00 2001 From: RondeauG Date: Thu, 29 Aug 2024 17:01:58 -0400 Subject: [PATCH 1/3] typo fix --- src/xdatasets/spatial.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xdatasets/spatial.py b/src/xdatasets/spatial.py index 12cacd3..986c83b 100644 --- a/src/xdatasets/spatial.py +++ b/src/xdatasets/spatial.py @@ -97,7 +97,7 @@ def clip_by_polygon(ds, space, dataset_name): data = xr.concat(arrays, dim="geom") - if "unique_id" in space: + if space.get("unique_id") is not None: try: data = data.swap_dims({"geom": space["unique_id"]}) data = data.drop_vars("geom") From c27c7f440c61998214f8aab490b6b643633fe6f5 Mon Sep 17 00:00:00 2001 From: RondeauG Date: Thu, 29 Aug 2024 17:32:08 -0400 Subject: [PATCH 2/3] upd changelog --- CHANGELOG.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index ccbb3c5..2c1bd74 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -7,7 +7,7 @@ Changelog v0.3.7 (unreleased) ------------------- -Contributors: Trevor James Smith (:user:`Zeitsperre`) +Contributors: Trevor James Smith (:user:`Zeitsperre`), Gabriel Rondeau-Genesse (:user:`RondeauG`) Changes ^^^^^^^ @@ -18,6 +18,7 @@ Changes * 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 a CI/requirements_ci.txt that uses hashes of packages for security. * Documentation has been added for ``$ make initialize-translations``. +* Fixed a bug where `clip_polygon` would not work if not given a `unique_id` during a `Query`. (:pull:`143). .. _changes_0.3.6: From 4c5badacf32e0c6e98de379eb3f6e0967ea4d09a Mon Sep 17 00:00:00 2001 From: RondeauG <38501935+RondeauG@users.noreply.github.com> Date: Fri, 30 Aug 2024 09:15:47 -0400 Subject: [PATCH 3/3] Update CHANGELOG.rst --- CHANGELOG.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 2c1bd74..d7ddfd2 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -18,7 +18,7 @@ Changes * 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 a CI/requirements_ci.txt that uses hashes of packages for security. * Documentation has been added for ``$ make initialize-translations``. -* Fixed a bug where `clip_polygon` would not work if not given a `unique_id` during a `Query`. (:pull:`143). +* Fixed a bug where `clip_polygon` would not work if not given a `unique_id` during a `Query`. (:pull:`143`). .. _changes_0.3.6: