Skip to content

Shapely-like __geo_interface__#32

Merged
mindflayer merged 2 commits intomainfrom
shapely-geo-interface
Dec 10, 2025
Merged

Shapely-like __geo_interface__#32
mindflayer merged 2 commits intomainfrom
shapely-geo-interface

Conversation

@mindflayer
Copy link
Copy Markdown
Owner

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR converts __geo_interface__ from a method to a property across all geometry classes to match Shapely's API design. This is a breaking API change that aligns ToGo more closely with Shapely's interface conventions.

  • Added @property decorator to __geo_interface__ in Geometry, Point, Line, and Poly classes
  • Updated all usage sites from __geo_interface__() method call syntax to __geo_interface__ property access syntax
  • Version bumped from 0.2.4 to 0.2.5 and removed unnecessary compiler warning flag

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
togo.pyx Added @property decorator to __geo_interface__ in all four geometry classes (Geometry, Point, Line, Poly)
tests/test_shapely_api.py Updated all five test cases to access __geo_interface__ as a property instead of calling it as a method
examples/shapely_api_demo.py Updated example to use property syntax for __geo_interface__
SHAPELY_API.md Updated documentation to show __geo_interface__ as a property in all examples and API reference
QUICK_REFERENCE.md Updated quick reference to use property syntax for __geo_interface__
pyproject.toml Bumped version from 0.2.4 to 0.2.5
setup.py Removed -Wno-int-in-bool-context compiler flag

@mindflayer mindflayer merged commit 795d2be into main Dec 10, 2025
13 checks passed
@mindflayer mindflayer deleted the shapely-geo-interface branch December 10, 2025 06:46
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.

2 participants