Skip to content

Conversation

@vincentsarago
Copy link
Contributor

Note: This could be considered as a breaking change

I've noticed that Polygon was imported twice:

  • from geojson_pydantic
  • from shapely.geometry

Because the one from shapely was imported later, it was the one used in the GeoJson type:

GeoJson = Union[FeatureCollection, Feature, GeometryCollection, MultiPolygon, Polygon]

resulting in the type being an Union of pydantic model and Shapely object

I personally think that using shapely only for the polygon object is kinda overkill, but if users really need it, it might better be in a BoundingBox.to_shapely() method

@ValentinaHutter
Copy link
Collaborator

Thanks for pointing this out! I will have a closer look at the PR within the next three days.

@ValentinaHutter
Copy link
Collaborator

I now checked and I think we can switch to geojson_pydantic polygon! One thing to check before we can merge the PR, is how to trigger the tests though. They might be switched off for forked repositories. Could you maybe check if you can switch on the tests manually?

@ValentinaHutter
Copy link
Collaborator

Seems like tests are only failing because the pre-commit hooks are not activated. The can be activated in poetry, so when you add new commits they will automatically run: https://github.com/Open-EO/openeo-pg-parser-networkx?tab=readme-ov-file#pre-commit-hooks

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