Skip to content

Commit 4d2eea5

Browse files
authored
Merge pull request #700 from MiraGeoscience/hotfix/0.10.1
Hotfix 0.10.1
2 parents 594454e + a369782 commit 4d2eea5

File tree

7 files changed

+18
-11
lines changed

7 files changed

+18
-11
lines changed

docs/conf.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
from datetime import datetime
1919
from pathlib import Path
2020
from importlib.metadata import version
21+
from packaging.version import Version
2122

2223
sys.path.append(str(Path("_ext").resolve()))
2324
sys.path.append(str(Path().parent.resolve()))
@@ -44,8 +45,8 @@
4445

4546
# The full version, including alpha/beta/rc tags.
4647
release = version("geoh5py")
47-
# The short X.Y.Z version.
48-
version = ".".join(release.split(".")[:3])
48+
# The shorter X.Y.Z version.
49+
version = Version(release).base_version
4950

5051
# If your documentation needs a minimal Sphinx version, state it here.
5152
needs_sphinx = "2.2.1"

geoh5py/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
# flake8: noqa
2222

23-
__version__ = "0.10.0"
23+
__version__ = "0.10.1"
2424

2525
import inspect
2626

geoh5py/objects/drillhole.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -811,12 +811,10 @@ def compute_intervals(survey: np.ndarray, collar, end_of_hole) -> dict:
811811
norm[norm == 0.0] = INFINITE_RADIUS
812812
tangential /= norm[:, None]
813813
alpha = np.abs(0.5 * np.pi - np.arctan2(dot, vr))
814+
alpha[alpha == 0.0] = INFINITE_RADIUS**-1.0
814815
delta_depth = np.diff(full_survey[:, 0])
815816
radius = delta_depth / alpha
816817

817-
radius[alpha == 0.0] = delta_depth[alpha == 0.0] * INFINITE_RADIUS
818-
alpha[alpha == 0.0] = delta_depth[alpha == 0.0] / radius[alpha == 0.0]
819-
820818
intervals = {
821819
"depths": np.r_[full_survey[:, 0]],
822820
"rad": np.r_[radius, INFINITE_RADIUS],

geoh5py/objects/grid_object.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,11 @@ def origin(self, values: np.ndarray | list | tuple):
120120
raise ValueError(f"Array of 'origin' must be of dtype = {ORIGIN_TYPE}")
121121

122122
self._centroids = None
123+
self._origin = values
123124

124-
if getattr(self, "_origin", None) is not None and self.on_file:
125+
if self.on_file:
125126
self.workspace.update_attribute(self, "attributes")
126127

127-
self._origin = values
128-
129128
@property
130129
@abstractmethod
131130
def shape(self) -> np.ndarray:

geoh5py/objects/octree.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,9 @@ def u_cell_size(self, value: Real):
223223
raise TypeError("Attribute 'u_cell_size' must be type(float).")
224224

225225
self._u_cell_size = float(value)
226+
self._centroids = None
227+
if self.on_file:
228+
self.workspace.update_attribute(self, "attributes")
226229

227230
@property
228231
def u_count(self) -> int:
@@ -244,6 +247,9 @@ def v_cell_size(self, value: Real):
244247
raise TypeError("Attribute 'v_cell_size' must be type(float).")
245248

246249
self._v_cell_size = float(value)
250+
self._centroids = None
251+
if self.on_file:
252+
self.workspace.update_attribute(self, "attributes")
247253

248254
@property
249255
def v_count(self) -> int:
@@ -323,6 +329,9 @@ def w_cell_size(self, value: Real):
323329
raise TypeError("Attribute 'w_cell_size' must be type(float).")
324330

325331
self._w_cell_size = float(value)
332+
self._centroids = None
333+
if self.on_file:
334+
self.workspace.update_attribute(self, "attributes")
326335

327336
@property
328337
def w_count(self) -> int:

meta.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{% set name = "geoh5py" %}
2-
{% set version = "0.10.0" %}
2+
{% set version = "0.10.1" %}
33

44
package:
55
name: {{ name|lower }}

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[tool.poetry]
22
name = "geoh5py"
33

4-
version = "0.10.0"
4+
version = "0.10.1"
55

66
license = "LGPL-3.0-or-later"
77
description = "Python API for geoh5, an open file format for geoscientific data"

0 commit comments

Comments
 (0)