Skip to content

Commit

Permalink
Update CI (#96)
Browse files Browse the repository at this point in the history
* Update CI

* Fix

* Fix tests with GDAL 3.5
  • Loading branch information
caspervdw committed Aug 22, 2022
1 parent 771bc5a commit 269308a
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 50 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/test-conda.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Conda

# Run on PR requests. And on master itself.
on:
push:
branches:
- master
pull_request:

jobs:
TestConda:
name: Python ${{ matrix.python }} ${{ matrix.display_name }} (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python: ["3.9", "3.10"]

steps:
- uses: actions/checkout@v2

- name: Setup Conda
uses: s-weigand/setup-conda@v1
with:
activate-conda: false
conda-channels: conda-forge

- name: Setup Environment
shell: bash
run: |
conda create --name test python=${{ matrix.python }} pytest numpy gdal=3.* scipy pytz dask-core toolz geopandas pyproj>=2
source activate test
python -V
conda info
conda list
- name: Run tests
shell: bash
run: |
source activate test
pytest dask_geomodeling
14 changes: 9 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Linux
name: PyPI

# Run on PR requests. And on master itself.
on:
Expand All @@ -9,7 +9,7 @@ on:

jobs:
TestLinux:
name: Python ${{ matrix.python }} ${{ matrix.display_name }}
name: Python ${{ matrix.python }} ${{ matrix.display_name }} (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand All @@ -35,10 +35,14 @@ jobs:
python: 3.9
numpy: "==1.21.*"
pins: "pygdal==3.0.4.* scipy==1.7.* dask[delayed]==2021.* pandas==1.3.* geopandas==0.10.*"
- os: ubuntu-20.04
python: 3.9
- os: ubuntu-22.04
python: "3.10"
numpy: "==1.23.*"
pins: "pygdal==3.4.1.* scipy==1.9.* dask[delayed]==2021.7.* pandas==1.4.* geopandas==0.11.*"
- os: ubuntu-22.04
python: "3.10"
display_name: "latest"
pins: "pygdal==3.0.4.*"
pins: "pygdal==3.4.1.*"

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Changelog of dask-geomodeling
2.3.10 (unreleased)
-------------------

- Nothing changed yet.
- Fixed incompatibility with GDAL 3.4.


2.3.9 (2022-03-07)
Expand Down
42 changes: 0 additions & 42 deletions appveyor.yml

This file was deleted.

2 changes: 1 addition & 1 deletion dask_geomodeling/tests/test_geometry_sinks.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def setUp(self):
]
self.properties = [
{"int": 5, "float": 3.2, "str": "bla", "lst": [1], "dct": {"a": "b"}},
{"int": 7, "float": 5.2, "str": "bla2", "lst": [], "dct": {}},
{"int": 7, "float": 5.2, "str": "bla2", "lst": [2], "dct": {}},
]
self.source = MockGeometry(
self.polygons, projection="EPSG:3857", properties=self.properties
Expand Down
3 changes: 2 additions & 1 deletion dask_geomodeling/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,8 @@ def wkb_transform(wkb, src_sr, dst_sr):
"""
result = ogr.CreateGeometryFromWkb(wkb, src_sr)
result.TransformTo(dst_sr)
return result.ExportToWkb()
wkb = result.ExportToWkb()
return bytes(wkb) if not isinstance(wkb, bytes) else wkb


def shapely_transform(geometry, src_srs, dst_srs):
Expand Down

0 comments on commit 269308a

Please sign in to comment.