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

Update dependency shapely to v2 #1642

Merged
merged 3 commits into from
Jan 9, 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
8 changes: 4 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- uses: actions/checkout@v3
- run: sudo rm /etc/apt/sources.list.d/*.list
- run: sudo apt update
- run: sudo apt-get install virtualenv libpq-dev libgeos-dev
- run: sudo apt-get install virtualenv libpq-dev
- name: Run make lint
run: make lint

Expand All @@ -21,7 +21,7 @@ jobs:
- uses: actions/checkout@v3
- run: sudo rm /etc/apt/sources.list.d/*.list
- run: sudo apt update
- run: sudo apt-get install virtualenv libpq-dev libgeos-dev
- run: sudo apt-get install virtualenv libpq-dev
- name: Run make git-attributes
run: make git-attributes

Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:
architecture: x64
- run: sudo rm /etc/apt/sources.list.d/*.list
- run: sudo apt update
- run: sudo apt-get install virtualenv libpq-dev libgeos-dev
- run: sudo apt-get install virtualenv libpq-dev
- name: Run tests for Python ${{ matrix.python-version }}
run: make tests
- name: Upload coverage to Codecov
Expand Down Expand Up @@ -101,7 +101,7 @@ jobs:
run: |
sudo rm /etc/apt/sources.list.d/*.list
sudo apt update
sudo apt-get install virtualenv libpq-dev libgeos-dev
sudo apt-get install virtualenv libpq-dev
make doc-html
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4.4.1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/daily_check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
- uses: actions/checkout@v3
- run: sudo rm /etc/apt/sources.list.d/*.list
- run: sudo apt update
- run: sudo apt-get install virtualenv libpq-dev libgeos-dev
- run: sudo apt-get install virtualenv libpq-dev
- name: Run tests for Python ${{ matrix.python-version }}
env:
PYTHON_TEST_VERSION: ${{ matrix.python-version }}
Expand Down
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ FROM python:3.7-buster
ENV DEBIAN_FRONTEND=noninteractive
ENV VIRTUALENV_PYTHON=/usr/bin/python3.7

ARG DEV_PACKAGES="python3.7-dev build-essential libgeos-dev"
ARG DEV_PACKAGES="python3-dev build-essential"

RUN apt-get update && \
apt-get install --yes --no-install-recommends \
python3-pip \
python3-venv \
virtualenv \
${DEV_PACKAGES} \
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pyramid==2.0.0
pyramid-debugtoolbar==4.10
qrcode==7.3.1
image==1.5.33
shapely==1.8.5.post1
shapely==2.0.0
SQLAlchemy==1.4.46
pyaml-env==1.2.1
urllib3==1.26.13
Expand Down
3 changes: 2 additions & 1 deletion tests/core/records/test_geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

from shapely.geometry import Polygon, MultiPolygon, LineString, Point, \
MultiPoint, MultiLineString, GeometryCollection
from shapely.errors import GEOSException, TopologicalError
import shapely.wkt

import pytest
Expand Down Expand Up @@ -335,7 +336,7 @@ def test_validity(geometry, valid, fixable):
assert is_multi_polygon or has_additional_rings
# unrepairable geometries should have raised an error up to here
assert fixable
except shapely.errors.TopologicalError:
except (TopologicalError, GEOSException):
if not fixable:
# this is an expected error
pass
Expand Down