-
Notifications
You must be signed in to change notification settings - Fork 18
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
Upgrade to stac-fastapi v2.5.5 #237
Conversation
I don't know why the collections extension test broke? |
@@ -107,6 +107,7 @@ async def test_returns_valid_collection(ctx, app_client): | |||
collection.validate() | |||
|
|||
|
|||
@pytest.mark.skip(reason="Broken as of stac-fastapi v2.5.5") |
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.
Is this fine to skip? Or do we need a new test?
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.
I did make an issue for this. I am not too sure about collection extensions and if people are using them. Ideally we would understand why this test started failing. If no one knows why it's failing, it should be fine to skip it for now and have it referenced as an issue I think.
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.
I added a new test. It's working with adding a collection but not updating one.
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.
I went through this with the debugger and it seems like Pydantic is omitting the field when validating the request model (stac_fastapi.types.stac.Collection
), only retaining the defined fields.
https://github.com/tiangolo/fastapi/blob/0.98.0/fastapi/dependencies/utils.py#L785
So I'd expect this to happen on all request models, but we just don't notice it on Items objects because all extra fields are defined inside the properties field.
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.
It makes sense but when I POST a collection and then GET the collection after, the iten_assets
field is still there? It's only with PUT that it disappears?
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.
I made an issue here - hopefully this can be straightened out with the upcoming stac-fastpapi v3.0.0
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.
Related Issue(s):
Description:
Upgrade stac-fastapi libraries to v2.5.5
PR Checklist:
pre-commit run --all-files
)make test
)