Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SEDONA-227] Implemented Python geometry serializer as a native extension #767

Merged
merged 2 commits into from
Feb 15, 2023
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
55 changes: 55 additions & 0 deletions .github/workflows/python-extension.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Python build extension

on:
push:
branches:
- master
pull_request:
branches:
- '*'

jobs:
build:
strategy:
matrix:
os: ['ubuntu-latest', 'windows-latest', 'macos-latest']
python: ['3.10', '3.9', '3.8']

runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Install pipenv
run: pip install -U pipenv
- name: Install dependencies
run: |
cd python
pipenv --python ${{ matrix.python }}
pipenv install --dev
- name: Build extension
run: |
cd python
pipenv run python setup.py build_ext --inplace
- name: Run tests
run: |
cd python
pipenv run pytest tests/utils/test_geomserde_speedup.py
- name: Run tests on Shapely 2.0
run: |
cd python
pipenv install shapely~=2.0
pipenv run pytest tests/utils/test_geomserde_speedup.py
- name: Run tests on Shapley 1.7
# Shapely 1.7 only provides wheels for cp36 ~ cp39, so we'll skip running
# this test for recent python versions.
if: ${{ matrix.python == '3.9' || matrix.python == '3.8' }}
run: |
cd python
pipenv install shapely~=1.7
pipenv run pytest tests/utils/test_geomserde_speedup.py
33 changes: 33 additions & 0 deletions .github/workflows/python-wheel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Python build wheels

on:
push:
branches:
- master
pull_request:
branches:
- '*'

jobs:
build:
strategy:
matrix:
os: ['ubuntu-latest', 'windows-latest', 'macos-latest']

runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash

steps:
- uses: actions/checkout@v2
- name: Build wheels
uses: pypa/cibuildwheel@v2.12.0
env:
CIBW_SKIP: 'pp* *musl*'
CIBW_ARCHS: 'auto64'
with:
package-dir: python
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
3 changes: 2 additions & 1 deletion .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,12 @@ jobs:
SPARK_VERSION: ${{ matrix.spark }}
HADOOP_VERSION: ${{ matrix.hadoop }}
run: tar -xzf spark-${SPARK_VERSION}-bin-hadoop${HADOOP_VERSION}.tgz
- run: sudo apt-get -y install python3-pip python-dev libgeos-dev
- run: sudo apt-get -y install python3-pip python-dev
- run: sudo pip3 install -U setuptools
- run: sudo pip3 install -U wheel
- run: sudo pip3 install -U virtualenvwrapper
- run: python3 -m pip install pipenv
- run: cd python; python3 setup.py build_ext --inplace
- env:
SPARK_VERSION: ${{ matrix.spark }}
PYTHON_VERSION: ${{ matrix.python }}
Expand Down
Loading