Closed angaither closed 5 months ago
There's a number of geometry: Optional[dict]
though the typing intention is now including str
(ref)
I haven't dug enough to see if it's even possible (or useful) to try to specify a GeoJSON type (like by applying more type variables to dict keys, though honestly it doesn't feel useful)...
But something like this might be a nice compromise (untested in mypy or other static checker)
from typing import Union
# GeoJSON is a python dict that conforms to the specification
GeoJSON = dict
# GeoRef is a reference to a feature, either as a file or URI, that if resolved, would yield GeoJSON
GeomRef = str
# Geom is some inline or reference to a Geometry
Geom = Union[GeoJSON, GeomRef]
I see this MR includes integration tests for the Data API/CLI, and the Subscriptions CLI. @angaither Do you think we also need tests for the Subscriptions API and Orders API/CLI?
I see this MR includes integration tests for the Data API/CLI, and the Subscriptions CLI. @angaither Do you think we also need tests for the Subscriptions API and Orders API/CLI?
We probably only need CLI tests since that is doing a bit more manipulation and allowing strings, so I added a test for the orders CLI. The API tests probably aren't needed since
Related Issue(s):
Closes #
Proposed Changes:
For inclusion in changelog (if applicable):
Not intended for changelog:
Diff of User Interface
Old behavior: geojson was required to make a subscription or order.
New behavior: geojson or a geometry feature reference can be used
Or in the cli a ref can be used as a string
PR Checklist:
(Optional) @mentions for Notifications: