From 97cbef4142fd09b5a28c0a208331f2df409e0737 Mon Sep 17 00:00:00 2001 From: Martin Fleischmann Date: Sat, 1 Feb 2025 10:56:06 +0100 Subject: [PATCH 1/3] require python 3.10 --- .github/workflows/tests.yaml | 6 +++--- ci/{39.yaml => 313.yaml} | 2 +- pyproject.toml | 2 +- xvec/accessor.py | 4 ++-- xvec/zonal.py | 6 +++--- 5 files changed, 10 insertions(+), 10 deletions(-) rename ci/{39.yaml => 313.yaml} (94%) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index d2d6c52..8dcd70e 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -17,14 +17,14 @@ jobs: strategy: matrix: os: [macos-latest, ubuntu-latest, windows-latest] - environment-file: [ci/312.yaml] + environment-file: [ci/313.yaml] include: - - environment-file: ci/39.yaml - os: ubuntu-latest - environment-file: ci/310.yaml os: ubuntu-latest - environment-file: ci/311.yaml os: ubuntu-latest + - environment-file: ci/312.yaml + os: ubuntu-latest - environment-file: ci/dev.yaml os: ubuntu-latest defaults: diff --git a/ci/39.yaml b/ci/313.yaml similarity index 94% rename from ci/39.yaml rename to ci/313.yaml index 836fcee..090c5ce 100644 --- a/ci/39.yaml +++ b/ci/313.yaml @@ -2,7 +2,7 @@ name: xvec channels: - conda-forge dependencies: - - python=3.9 + - python=3.13 # required - shapely >=2 - xarray diff --git a/pyproject.toml b/pyproject.toml index a80baea..186f6b0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,7 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3", "Topic :: Scientific/Engineering :: GIS", ] -requires-python = ">=3.9" +requires-python = ">=3.10" dependencies = [ "xarray >= 2022.12.0", "pyproj >= 3.0.0", diff --git a/xvec/accessor.py b/xvec/accessor.py index 734cf0a..2bfbd8d 100644 --- a/xvec/accessor.py +++ b/xvec/accessor.py @@ -1,8 +1,8 @@ from __future__ import annotations import warnings -from collections.abc import Hashable, Mapping, Sequence -from typing import TYPE_CHECKING, Any, Callable, cast +from collections.abc import Callable, Hashable, Mapping, Sequence +from typing import TYPE_CHECKING, Any, cast import numpy as np import pandas as pd diff --git a/xvec/zonal.py b/xvec/zonal.py index 2de04ca..3e7fcf3 100644 --- a/xvec/zonal.py +++ b/xvec/zonal.py @@ -1,8 +1,8 @@ from __future__ import annotations import gc -from collections.abc import Hashable, Iterable, Sequence -from typing import Any, Callable +from collections.abc import Callable, Hashable, Iterable, Sequence +from typing import Any import numpy as np import pandas as pd @@ -52,7 +52,7 @@ def _zonal_stats_rasterize( transform = acc._obj.rio.transform() labels = features.rasterize( - zip(geometry, range(len(geometry))), + zip(geometry, range(len(geometry)), strict=False), out_shape=( acc._obj[y_coords].shape[0], acc._obj[x_coords].shape[0], From fb8586a598ed6f5dfd9e620c1506338b4205869e Mon Sep 17 00:00:00 2001 From: Martin Fleischmann Date: Sat, 1 Feb 2025 11:03:32 +0100 Subject: [PATCH 2/3] exactextract from pypi on win --- ci/312.yaml | 3 --- ci/313.yaml | 6 ++++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/ci/312.yaml b/ci/312.yaml index 189ae72..4c5f881 100644 --- a/ci/312.yaml +++ b/ci/312.yaml @@ -20,8 +20,5 @@ dependencies: - geodatasets - pyogrio - mypy - - pip - - pip: - - exactextract diff --git a/ci/313.yaml b/ci/313.yaml index 090c5ce..885550d 100644 --- a/ci/313.yaml +++ b/ci/313.yaml @@ -9,7 +9,6 @@ dependencies: - rioxarray - joblib - rasterio - - exactextract - tqdm - pyproj # testing @@ -19,4 +18,7 @@ dependencies: - pytest-reportlog - geopandas-base - geodatasets - - pyogrio \ No newline at end of file + - pyogrio + - pip + - pip: + - exactextract \ No newline at end of file From 395cb2ebaaf55138edbe852cb6672ba1316e83d1 Mon Sep 17 00:00:00 2001 From: Martin Fleischmann Date: Sat, 1 Feb 2025 11:07:11 +0100 Subject: [PATCH 3/3] ee --- ci/312.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/312.yaml b/ci/312.yaml index 4c5f881..36200f2 100644 --- a/ci/312.yaml +++ b/ci/312.yaml @@ -9,6 +9,7 @@ dependencies: - rioxarray - joblib - rasterio + - exactextract - tqdm - pyproj # testing