Repository navigation
Vertex order of Polygon.from_bounds differs between shapely versions,… - #540
Open
EmileSonneveld wants to merge 1 commit into
Open
EmileSonneveld wants to merge 1 commit into
EmileSonneveld wants to merge 1 commit into
Conversation
… so compare geometrically or use normalize.
Member
Author
|
@soxofaan Do you think it is safe to let the update to shapely 2.2 happen, or should we pin 2.1.2 for a while? |
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The focused test changes preserve meaningful validation while removing version-dependent vertex ordering assumptions.
Review effort: Balanced
Findings: None
What changed in this PR
Updates geometry assertions to tolerate equivalent vertex ordering across Shapely versions.
Changes:
- Normalizes feature geometries before comparison.
- Uses geometric equality for bounding-box GeoJSON.
| File | Description |
|---|---|
tests/util/test_geometry.py |
Normalizes geometries in affected assertions. |
tests/test_vectorcube.py |
Replaces order-sensitive comparison with geometric equality. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
… so compare geometrically or use normalize.
Master branch started failing: https://jenkins.vgt.vito.be/job/openEO/job/openeo-python-driver-python311/job/master/ This should fix it
This is probably due to a shapely update. It does not happen when doing
pip install "shapely==2.1.0"norpip install "shapely==2.1.2"Thapely 2.2 was released a few hours ago https://pypi.org/project/shapely/#history