-
Notifications
You must be signed in to change notification settings - Fork 102
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
Update to stac-pydantic 2.0.0 #181
Update to stac-pydantic 2.0.0 #181
Conversation
d13108e
to
295ec37
Compare
Apologies if the failed linting is blowing up anyone's emails - I'm attempting to track down the options I'm failing to use which seem to be expected by CI's run of |
It looks as though stac-pydantic likes |
@@ -39,6 +39,7 @@ def create_collection( | |||
) -> schemas.Collection: | |||
"""Create collection.""" | |||
data = self.collection_table.from_schema(model) | |||
data.type = "collection" |
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.
This is most certainly not going to be kept. It ought to be removed before the PR is accepted as it is residue from debugging
c5257aa
to
cbac663
Compare
There's one test that is failing and which I'm having a hard time making heads or tails of: stac-fastapi/stac_fastapi/sqlalchemy/tests/resources/test_item.py Lines 163 to 189 in a568d87
At nearly every step along the request/response cycle that I can surface the stac-fastapi/stac_fastapi/sqlalchemy/stac_fastapi/sqlalchemy/models/database.py Lines 106 to 108 in a568d87
class Config . Nevertheless, whenever that field is inspected in test_item_timestamps , RFC 3339 formatting (which we expect) is not there.
A second or third pair of eyes might be useful at this point. |
@moradology I don't know why this is happening, but it's related to how FastAPI is applying the I'm still confused why adding a |
Thinking through this a little more:
Either way I've fixed this test in bfa203e |
@moradology I'm marking this ready for review, please take a look over the changes I made. |
@geospatial-jeff thinking through review strategy, which I have some time set aside for today - I'd like to review this PR and get it merged, and then update #147 with these changes and integrate while reviewing. I'll make tweaks along the way but will tag you for any larger review changes if I find them. Let me know if you want to tweak that plan, otherwise I'm going to get started. |
@lossyrob That sounds good to me. Either way the merge conflicts are going to be nasty :) |
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.
LGTM. Added a couple of commits on top that I needed for testing the PR in the dockerized environment. Will merge once this passes and integrate with #147
This PR upgrades the version of
stac-pydantic
to 2.0.0 so that the library can use stac-spec 1.0.0. Mostly, the changes are import updates, though collections are now represented asstac-pydantic
'sCollections
type rather than aList[Collection]