Skip to content

Improve serialization compatibility#68

Merged
mindflayer merged 4 commits into
mainfrom
serialization-compatibility
Jun 8, 2026
Merged

Improve serialization compatibility#68
mindflayer merged 4 commits into
mainfrom
serialization-compatibility

Conversation

@mindflayer

Copy link
Copy Markdown
Owner

Improved serialization compatibility: ToGo now accepts LinearRing payloads in shape() and supports robust pickle/loky round-trips for geometry sub-objects (e.g., polygon exterior/boundary), reducing multiprocessing deserialization failures.

Copilot AI review requested due to automatic review settings June 8, 2026 19:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Improves serialization interoperability by making shape() accept GeoJSON-like LinearRing payloads (commonly emitted via __geo_interface__) and adds a dedicated test suite validating pickle and joblib/loky multiprocessing round-trips for core and sub-geometry objects.

Changes:

  • Extend shape() to normalize {"type": "LinearRing", ...} payloads into a Ring-derived polygon geometry.
  • Add comprehensive multiprocessing/serialization regression tests (pickle + joblib/loky).
  • Add joblib to requirements.txt to support the new loky/joblib tests.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 4 comments.

File Description
togo.pyx Updates shape() docs and adds a LinearRing normalization path for GeoJSON-like dict inputs.
tests/test_multiprocessing_serialization.py Introduces new regression tests covering shape(LinearRing) parsing and pickle/loky round-trips for geometry objects and sub-objects.
requirements.txt Adds joblib to ensure loky/joblib transfer tests can run in the standard test environment.

Comment thread tests/test_multiprocessing_serialization.py Outdated
Comment thread tests/test_multiprocessing_serialization.py Outdated
Comment thread tests/test_multiprocessing_serialization.py Outdated
Comment thread togo.pyx
@mindflayer mindflayer merged commit 8580c70 into main Jun 8, 2026
7 checks passed
@mindflayer mindflayer deleted the serialization-compatibility branch June 8, 2026 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants