Skip to content

Commit 17f637b

Browse files
authored
Merge pull request #843 from MiraGeoscience/GEOPY-2661
GEOPY-2661: Update minimum requirement to python >=3.12, <3.15 and numpy 2.*
2 parents c8d825b + a5bcf4b commit 17f637b

9 files changed

Lines changed: 408 additions & 395 deletions

File tree

.github/workflows/python_analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
with:
3434
package-manager: 'poetry'
3535
app-name: 'geoh5py'
36-
python-version: '3.10'
36+
python-version: '3.12'
3737
call-workflow-pytest:
3838
name: Pytest
3939
uses: MiraGeoscience/CI-tools/.github/workflows/reusable-python-pytest.yml@v2
@@ -42,10 +42,10 @@ jobs:
4242
pull-requests: read
4343
with:
4444
package-manager: 'poetry'
45-
python-versions: '["3.10", "3.11", "3.12"]'
45+
python-versions: '["3.12", "3.13", "3.14"]'
4646
os: '["ubuntu-latest", "windows-latest"]'
4747
cache-number: 1
48-
codecov-reference-python-version: '3.10'
48+
codecov-reference-python-version: '3.12'
4949
codecov-reference-os: '["windows-latest"]'
5050
secrets:
5151
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/python_deploy_dev.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
contents: write
2020
with:
2121
package-name: 'geoh5py'
22-
python-version: '3.10'
22+
python-version: '3.12'
2323
source-repo-names: '["public-noremote-conda-dev"]'
2424
conda-channels: '["conda-forge"]'
2525
publish-repo-names: '["public-noremote-conda-dev"]'
@@ -35,7 +35,7 @@ jobs:
3535
package-manager: 'poetry'
3636
package-name: 'geoh5py'
3737
version-tag: ${{ github.ref_name }}
38-
python-version: '3.10'
38+
python-version: '3.12'
3939
virtual-repo-names: '["public-pypi-dev", "test-pypi"]'
4040
secrets:
4141
JFROG_ARTIFACTORY_URL: ${{ secrets.JFROG_ARTIFACTORY_URL }}

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ repos:
3636
- id: mypy
3737
additional_dependencies: [
3838
# numpy==1.26.*, # TODO: fix mypy errors related to numpy
39-
pydantic==2.5.*,
39+
pydantic==2.12.*,
4040
tomli, # to read config from pyproject.toml
4141
types-toml,
4242
types-PyYAML,

geoh5py/data/referenced_data.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,3 +212,10 @@ def add_data_map(self, name: str, values: np.ndarray | dict, public: bool = True
212212
"""
213213
data = self.parent.add_data_map(self, name, values, public)
214214
return data
215+
216+
@property
217+
def nan_value(self):
218+
"""
219+
Nan-Data-Value
220+
"""
221+
return 0

poetry.lock

Lines changed: 381 additions & 372 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ build-backend = "poetry_dynamic_versioning.backend"
1313

1414
[project]
1515
name = "geoh5py"
16-
requires-python = ">=3.10,<4.0"
16+
requires-python = ">=3.12,<3.15"
1717

1818

1919
description = "Python API for geoh5, an open file format for geoscientific data"
@@ -63,10 +63,10 @@ include = [
6363
version = "0.0.0.dev0"
6464

6565
[tool.poetry.dependencies]
66-
h5py = "^3.2.1"
67-
numpy = "~1.26.0"
68-
Pillow = "~10.3.0"
69-
pydantic = "^2.12.0"
66+
h5py = "^3.15.0"
67+
numpy = "~2.4.0"
68+
Pillow = "~12.1.0"
69+
pydantic = "~2.12.0"
7070

7171
[tool.poetry.group.dev.dependencies]
7272
lockfile = "^0.12.2"
@@ -76,11 +76,10 @@ pylint = "*"
7676
pytest = "*"
7777
pytest-cov = "*"
7878
pyyaml = '*'
79-
scipy = "~1.14.0"
79+
scipy = "~1.17.0"
8080
sphinx = "^3.0"
8181
sphinx-autodoc-typehints = "^1.10"
8282
sphinx-rtd-theme = "^0.4.3"
83-
h5py = "^3.14.0"
8483

8584
[tool.poetry.requires-plugins]
8685
poetry-dynamic-versioning = { version = ">=1.9.1,<2.0.0", extras = ["plugin"] }

recipe.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ schema_version: 1
33
context:
44
name: "geoh5py"
55
version: "0.0.0.dev0" # This will be replaced by the actual version in the build process
6-
python_min: "3.10"
6+
python_min: "3.12"
77
module_name: ${{ name|lower|replace("-", "_") }}
88

99
package:
@@ -27,10 +27,10 @@ requirements:
2727
- pip
2828
run:
2929
- python >=${{ python_min }}
30-
- h5py >=3.2.1, 3.*
31-
- numpy >=1.26.0, 1.26.*
32-
- pillow >=10.3.0, 10.3.*
33-
- pydantic >=2.12.0, 2.*
30+
- h5py >=3.15.0, 3.*
31+
- numpy 2.4.*
32+
- pillow 12.1.*
33+
- pydantic 2.12.*
3434

3535
tests:
3636
- python:
@@ -42,7 +42,7 @@ tests:
4242
requirements:
4343
run:
4444
- pytest
45-
- scipy >= 1.14.0, <1.15.dev
45+
- scipy 1.17.*
4646
files:
4747
source:
4848
- tests/

tests/coordinate_system_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def test_coordinate_system(tmp_path):
5252

5353
# create and save a tiff
5454
image = Image.fromarray(
55-
np.random.randint(0, 255, (128, 128, 3)).astype("uint16"), "RGB"
55+
np.random.randint(0, 255, (128, 128, 3)).astype("uint8"), "RGB"
5656
)
5757

5858
for id_ in tag.items():

tests/geo_image_test.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -375,9 +375,7 @@ def test_georeference_image(tmp_path):
375375
assert isinstance(geoimage.image_georeferenced, Image.Image)
376376

377377
# test grid2d errors
378-
with pytest.raises(
379-
ValueError, match="conversion from RGB to bidon not supported"
380-
):
378+
with pytest.raises(ValueError, match="image has wrong mode"):
381379
geoimage.to_grid2d(new_name="RGB", mode="bidon")
382380

383381
# test save_as

0 commit comments

Comments
 (0)