Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/python_analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
with:
package-manager: 'poetry'
app-name: 'geoh5py'
python-version: '3.10'
python-version: '3.12'
call-workflow-pytest:
name: Pytest
uses: MiraGeoscience/CI-tools/.github/workflows/reusable-python-pytest.yml@v2
Expand All @@ -42,10 +42,10 @@ jobs:
pull-requests: read
with:
package-manager: 'poetry'
python-versions: '["3.10", "3.11", "3.12"]'
python-versions: '["3.12", "3.13", "3.14"]'
os: '["ubuntu-latest", "windows-latest"]'
cache-number: 1
codecov-reference-python-version: '3.10'
codecov-reference-python-version: '3.12'
codecov-reference-os: '["windows-latest"]'
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/python_deploy_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
contents: write
with:
package-name: 'geoh5py'
python-version: '3.10'
python-version: '3.12'
source-repo-names: '["public-noremote-conda-dev"]'
conda-channels: '["conda-forge"]'
publish-repo-names: '["public-noremote-conda-dev"]'
Expand All @@ -35,7 +35,7 @@ jobs:
package-manager: 'poetry'
package-name: 'geoh5py'
version-tag: ${{ github.ref_name }}
python-version: '3.10'
python-version: '3.12'
virtual-repo-names: '["public-pypi-dev", "test-pypi"]'
secrets:
JFROG_ARTIFACTORY_URL: ${{ secrets.JFROG_ARTIFACTORY_URL }}
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ repos:
- id: mypy
additional_dependencies: [
# numpy==1.26.*, # TODO: fix mypy errors related to numpy
pydantic==2.5.*,
pydantic==2.12.*,
tomli, # to read config from pyproject.toml
types-toml,
types-PyYAML,
Expand Down
7 changes: 7 additions & 0 deletions geoh5py/data/referenced_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,3 +212,10 @@ def add_data_map(self, name: str, values: np.ndarray | dict, public: bool = True
"""
data = self.parent.add_data_map(self, name, values, public)
return data

@property
def nan_value(self):
"""
Nan-Data-Value
"""
return 0
753 changes: 381 additions & 372 deletions poetry.lock

Large diffs are not rendered by default.

13 changes: 6 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ build-backend = "poetry_dynamic_versioning.backend"

[project]
name = "geoh5py"
requires-python = ">=3.10,<4.0"
requires-python = ">=3.12,<3.15"


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

[tool.poetry.dependencies]
h5py = "^3.2.1"
numpy = "~1.26.0"
Pillow = "~10.3.0"
pydantic = "^2.12.0"
h5py = "^3.15.0"
numpy = "~2.4.0"
Pillow = "~12.1.0"
pydantic = "~2.12.0"

[tool.poetry.group.dev.dependencies]
lockfile = "^0.12.2"
Expand All @@ -76,11 +76,10 @@ pylint = "*"
pytest = "*"
pytest-cov = "*"
pyyaml = '*'
scipy = "~1.14.0"
scipy = "~1.17.0"
sphinx = "^3.0"
sphinx-autodoc-typehints = "^1.10"
sphinx-rtd-theme = "^0.4.3"
h5py = "^3.14.0"

[tool.poetry.requires-plugins]
poetry-dynamic-versioning = { version = ">=1.9.1,<2.0.0", extras = ["plugin"] }
Expand Down
12 changes: 6 additions & 6 deletions recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ schema_version: 1
context:
name: "geoh5py"
version: "0.0.0.dev0" # This will be replaced by the actual version in the build process
python_min: "3.10"
python_min: "3.12"
module_name: ${{ name|lower|replace("-", "_") }}

package:
Expand All @@ -27,10 +27,10 @@ requirements:
- pip
run:
- python >=${{ python_min }}
- h5py >=3.2.1, 3.*
- numpy >=1.26.0, 1.26.*
- pillow >=10.3.0, 10.3.*
- pydantic >=2.12.0, 2.*
- h5py >=3.15.0, 3.*
- numpy 2.4.*
- pillow 12.1.*
- pydantic 2.12.*

tests:
- python:
Expand All @@ -42,7 +42,7 @@ tests:
requirements:
run:
- pytest
- scipy >= 1.14.0, <1.15.dev
- scipy 1.17.*
files:
source:
- tests/
Expand Down
2 changes: 1 addition & 1 deletion tests/coordinate_system_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def test_coordinate_system(tmp_path):

# create and save a tiff
image = Image.fromarray(
np.random.randint(0, 255, (128, 128, 3)).astype("uint16"), "RGB"
np.random.randint(0, 255, (128, 128, 3)).astype("uint8"), "RGB"
)

for id_ in tag.items():
Expand Down
4 changes: 1 addition & 3 deletions tests/geo_image_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,9 +375,7 @@ def test_georeference_image(tmp_path):
assert isinstance(geoimage.image_georeferenced, Image.Image)

# test grid2d errors
with pytest.raises(
ValueError, match="conversion from RGB to bidon not supported"
):
with pytest.raises(ValueError, match="image has wrong mode"):
geoimage.to_grid2d(new_name="RGB", mode="bidon")

# test save_as
Expand Down