diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index b7a704b..d03fd84 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -14,6 +14,7 @@ on: permissions: contents: read + id-token: write jobs: deploy: @@ -23,7 +24,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v3 + uses: actions/setup-python@v4 with: python-version: '3.x' - name: Install dependencies @@ -33,7 +34,6 @@ jobs: - name: Build package run: python -m build - name: Publish package - uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 + uses: pypa/gh-action-pypi-publish@release/v1 with: - user: __token__ - password: ${{ secrets.PYPI_API_TOKEN }} + repository-url: https://upload.pypi.org/legacy/ diff --git a/pyproject.toml b/pyproject.toml index b8befdf..3853b63 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "rasters" -version = "1.18.0" +version = "1.19.0" description = "raster processing toolkit" readme = "README.md" authors = [ diff --git a/rasters/wrap_geometry.py b/rasters/wrap_geometry.py index c1b2623..1750de8 100644 --- a/rasters/wrap_geometry.py +++ b/rasters/wrap_geometry.py @@ -50,9 +50,8 @@ def wrap_geometry(geometry: Any, crs: Union[CRS, str] = None) -> SpatialGeometry # If the geometry is a RasterGeometry, return it as is return geometry - # Check if the geometry is already a SpatialGeometry by checking for specific types - if isinstance(geometry, (Point, MultiPoint, Polygon, MultiPolygon)): - # If the geometry is already a SpatialGeometry, return it as is + # If the geometry is already a SpatialGeometry (e.g., BBox), return it as is. + if isinstance(geometry, SpatialGeometry): return geometry if isinstance(geometry, GeoSeries) and all(geometry.geom_type == 'Point'):