-
Notifications
You must be signed in to change notification settings - Fork 112
support custom models #147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…eed to define (de)serialization in the same place
As a novice attrs user I was confused about the factory= parameter, which is just syntatic sugar for a default with an attr.Factory. The default=attr.Factory is used in other similar scenarios, and this aligns with the other examples for readability
Include eo etension in collection as the summary entries reference it
Otherwise this throws a JSON serialization error
This is done by the tile extension to perform a redirect
This logic was previosly just in the transaction extension, but is required across all deserializations
TypedDicts require that either all attributes are considered required, or None. Because STAC has optional attributes that we don't want users to put "None" into (and therefore make the serialized responses have "null" values in fields, which produces invalid STAC), it's better to allow all fields to be optional. This allows users to utilize the type information in the TypedDict when constructing STAC objects, but not be told by type hinting to supply optional fields they don't have. This produces some type errors around direct dict access to fields of the potential for the dict key to not be present.
This commit adds pystac as a development dependency, and adds tests around collection and item fetching to validate the output of the API routes
Required changing the Item to make it valid for EO, which included removing existing invalid bands objects from properties and setting on the assets. Did this via grabbing example JSON from a Planetary Computer landsat-8-c2-l2 Item
Ended up keeping |
@lossyrob your commits look great! I can't approve the PR since I opened it but this is ready to merge. Once it's merged I'm going to do a follow up PR to add documentation for some of the new features we've introduced. |
closes #58
See #147 (comment) for more info.