-
Notifications
You must be signed in to change notification settings - Fork 25
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
Pydantic 2 and STAC API 1.0 #127
Conversation
@thomas-maschler thanks a lot for this 🙏 , just a couple comments for now but that's a really good start. |
Thanks for the PR! I should have done this sooner, but I've been hoping to archive stac-pydantic, as I find that it solves most of the same problems as pystac without much additional benefit. I've created this RFC to (briefly) lay out that rationale and gather feedback. @thomas-maschler (and anyone else), can you comment on that RFC with the reasons for updating and maintaining stac-pydantic? Once we have a discussion there, we can either close this PR and archive this repo, or get this PR to merge and continue maintaining. Sorry again about the bait-and-switch, and thanks in advance for your input. |
Codecov ReportAttention:
📢 Thoughts on this report? Let us know!. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution! In general makes sense to me -- the API structures in particular do seem to make more sense as pydantic models. Couple of nits about the tests to change.
At a higher level, could you add a note to the README clarifying the relationship between this library and pystac? My main motivation behind radiantearth/stac-spec#1252 is to avoid confusion in the community (and, until this PR, drop an un-maintained repo), and even a fixed up stac-pydantic may confuse newcomers as to "which repo should I use"? A README explanation could help that.
curious if thiswill be merged soon? I'd like to use it in conjunction with a module I'm writing that uses Pydantic v2 to model a STAC extension for machine learning models. It seems like there are only two nits to fix, @gadomski @thomas-maschler is it ok if I address these by removing the commented tests and the leftover print? are there other blockers to merging after that? |
@rbavery , that would be great. I had to change focus in the meantime and I didn't get a chance to work on this again. I am not sure if I am testing the right way and removing the test probably won't do any harm. |
Yeah, @rbavery if those nits get cleaned up we can merge, then we'll want a release I reckon. I'm still hoping for some sort of resolution in radiantearth/stac-spec#1252 but for now no reason not to use @thomas-maschler's work ❤️. |
Ok, this wasn't big of an issue. There were still some STAC API specific features which were tested in the the wrong place. As for finding a resolution for radiantearth/stac-spec#1252 I suggest we create a separate PR and update the Readme, clarifying that the main purpose of this library is to provide reusable request/response models for tools such as fastapi. For more comprehensive schema validation and usage of extensions, pystac is the recommended tool. I am not sure if there is consensus about the lifecycle of this library, but it would be worth mentioning, that this library will be archived eventually. |
Probably yes, but I need to look over again to be sure. Don't bother bumping in this PR, we'll have a separate release PR.
I like this a lot 👍🏼. |
I've created a release branch, which includes a README note about this repo's relationship to pystac: #129. |
This PR addresses #124 and picks up the work started in #126 which seems stale.
It is currently blocked by developmentseed/geojson-pydantic#147