From d43bbadbdfc2cb23b9f800f4dae7f2e3fcf60f03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Hensgen?= Date: Fri, 24 Jan 2025 17:05:07 -0500 Subject: [PATCH 1/5] bump version to 0.10.1 beta.1 --- geoh5py/__init__.py | 2 +- meta.yaml | 2 +- pyproject.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/geoh5py/__init__.py b/geoh5py/__init__.py index e261d30ee..bfbea3ec3 100644 --- a/geoh5py/__init__.py +++ b/geoh5py/__init__.py @@ -20,7 +20,7 @@ # flake8: noqa -__version__ = "0.10.0" +__version__ = "0.10.1-beta.1" import inspect diff --git a/meta.yaml b/meta.yaml index b4dd2037f..070c41934 100644 --- a/meta.yaml +++ b/meta.yaml @@ -1,5 +1,5 @@ {% set name = "geoh5py" %} -{% set version = "0.10.0" %} +{% set version = "0.10.1b1" %} package: name: {{ name|lower }} diff --git a/pyproject.toml b/pyproject.toml index fcd09401e..25fc0d0b4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [tool.poetry] name = "geoh5py" -version = "0.10.0" +version = "0.10.1-beta.1" license = "LGPL-3.0-or-later" description = "Python API for geoh5, an open file format for geoscientific data" From 30cbf23802c6c579356c82df37d970e0ed108a6d Mon Sep 17 00:00:00 2001 From: dominiquef Date: Mon, 20 Jan 2025 15:00:19 -0800 Subject: [PATCH 2/5] Update value and write (cherry picked from commit 6e6806c6aab5bafa84dcb113ae85143d8a3775db) --- geoh5py/objects/grid_object.py | 5 ++--- geoh5py/objects/octree.py | 9 +++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/geoh5py/objects/grid_object.py b/geoh5py/objects/grid_object.py index 19430efb8..25665bf05 100644 --- a/geoh5py/objects/grid_object.py +++ b/geoh5py/objects/grid_object.py @@ -120,12 +120,11 @@ def origin(self, values: np.ndarray | list | tuple): raise ValueError(f"Array of 'origin' must be of dtype = {ORIGIN_TYPE}") self._centroids = None + self._origin = values - if getattr(self, "_origin", None) is not None and self.on_file: + if self.on_file: self.workspace.update_attribute(self, "attributes") - self._origin = values - @property @abstractmethod def shape(self) -> np.ndarray: diff --git a/geoh5py/objects/octree.py b/geoh5py/objects/octree.py index d3f6b26ab..6d37292d4 100644 --- a/geoh5py/objects/octree.py +++ b/geoh5py/objects/octree.py @@ -223,6 +223,9 @@ def u_cell_size(self, value: Real): raise TypeError("Attribute 'u_cell_size' must be type(float).") self._u_cell_size = float(value) + self._centroids = None + if self.on_file: + self.workspace.update_attribute(self, "attributes") @property def u_count(self) -> int: @@ -244,6 +247,9 @@ def v_cell_size(self, value: Real): raise TypeError("Attribute 'v_cell_size' must be type(float).") self._v_cell_size = float(value) + self._centroids = None + if self.on_file: + self.workspace.update_attribute(self, "attributes") @property def v_count(self) -> int: @@ -323,6 +329,9 @@ def w_cell_size(self, value: Real): raise TypeError("Attribute 'w_cell_size' must be type(float).") self._w_cell_size = float(value) + self._centroids = None + if self.on_file: + self.workspace.update_attribute(self, "attributes") @property def w_count(self) -> int: From 215d679ff02e68a4d7540912667e79aae9ee2db9 Mon Sep 17 00:00:00 2001 From: dominiquef Date: Wed, 15 Jan 2025 08:14:02 -0800 Subject: [PATCH 3/5] Catch 0 value early (cherry picked from commit 0e775c829f181c94c93628cc902dd554ea089e8c) --- geoh5py/objects/drillhole.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/geoh5py/objects/drillhole.py b/geoh5py/objects/drillhole.py index f82bf0df4..4e7bddab6 100644 --- a/geoh5py/objects/drillhole.py +++ b/geoh5py/objects/drillhole.py @@ -811,12 +811,10 @@ def compute_intervals(survey: np.ndarray, collar, end_of_hole) -> dict: norm[norm == 0.0] = INFINITE_RADIUS tangential /= norm[:, None] alpha = np.abs(0.5 * np.pi - np.arctan2(dot, vr)) + alpha[alpha == 0.0] = INFINITE_RADIUS**-1.0 delta_depth = np.diff(full_survey[:, 0]) radius = delta_depth / alpha - radius[alpha == 0.0] = delta_depth[alpha == 0.0] * INFINITE_RADIUS - alpha[alpha == 0.0] = delta_depth[alpha == 0.0] / radius[alpha == 0.0] - intervals = { "depths": np.r_[full_survey[:, 0]], "rad": np.r_[radius, INFINITE_RADIUS], From 912ac44cfe1aba32d148d4641c61ea68e88e27a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Hensgen?= Date: Fri, 7 Feb 2025 11:44:24 -0500 Subject: [PATCH 4/5] bump version to rc.1 --- docs/conf.py | 5 +++-- geoh5py/__init__.py | 2 +- meta.yaml | 2 +- pyproject.toml | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index b760ce158..873d9b097 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -18,6 +18,7 @@ from datetime import datetime from pathlib import Path from importlib.metadata import version +from packaging.version import Version sys.path.append(str(Path("_ext").resolve())) sys.path.append(str(Path().parent.resolve())) @@ -44,8 +45,8 @@ # The full version, including alpha/beta/rc tags. release = version("geoh5py") -# The short X.Y.Z version. -version = ".".join(release.split(".")[:3]) +# The shorter X.Y.Z version. +version = Version(release).base_version # If your documentation needs a minimal Sphinx version, state it here. needs_sphinx = "2.2.1" diff --git a/geoh5py/__init__.py b/geoh5py/__init__.py index bfbea3ec3..f7f6f653b 100644 --- a/geoh5py/__init__.py +++ b/geoh5py/__init__.py @@ -20,7 +20,7 @@ # flake8: noqa -__version__ = "0.10.1-beta.1" +__version__ = "0.10.1-rc.1" import inspect diff --git a/meta.yaml b/meta.yaml index 070c41934..ba9da9527 100644 --- a/meta.yaml +++ b/meta.yaml @@ -1,5 +1,5 @@ {% set name = "geoh5py" %} -{% set version = "0.10.1b1" %} +{% set version = "0.10.1rc1" %} package: name: {{ name|lower }} diff --git a/pyproject.toml b/pyproject.toml index 25fc0d0b4..e8a4dd95a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [tool.poetry] name = "geoh5py" -version = "0.10.1-beta.1" +version = "0.10.1-rc.1" license = "LGPL-3.0-or-later" description = "Python API for geoh5, an open file format for geoscientific data" From a369782d5bc5c04138782d012c9c13bee762b3ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Hensgen?= Date: Wed, 12 Feb 2025 23:41:05 -0500 Subject: [PATCH 5/5] set version to 0.10.1 --- geoh5py/__init__.py | 2 +- meta.yaml | 2 +- pyproject.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/geoh5py/__init__.py b/geoh5py/__init__.py index f7f6f653b..625def52c 100644 --- a/geoh5py/__init__.py +++ b/geoh5py/__init__.py @@ -20,7 +20,7 @@ # flake8: noqa -__version__ = "0.10.1-rc.1" +__version__ = "0.10.1" import inspect diff --git a/meta.yaml b/meta.yaml index ba9da9527..5fb5ca04c 100644 --- a/meta.yaml +++ b/meta.yaml @@ -1,5 +1,5 @@ {% set name = "geoh5py" %} -{% set version = "0.10.1rc1" %} +{% set version = "0.10.1" %} package: name: {{ name|lower }} diff --git a/pyproject.toml b/pyproject.toml index e8a4dd95a..6c56c3e0b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [tool.poetry] name = "geoh5py" -version = "0.10.1-rc.1" +version = "0.10.1" license = "LGPL-3.0-or-later" description = "Python API for geoh5, an open file format for geoscientific data"