Skip to content
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 stac-fastapi to next major version #108

Merged
merged 11 commits into from
May 7, 2024

Conversation

vincentsarago
Copy link
Member

For visibility purpose

This PR aims to update stac-fastapi-pgstac to the next stac-fastapi major version (3.0)

@vincentsarago
Copy link
Member Author

vincentsarago commented Apr 26, 2024

Tests are failing right now because there was a change in the transaction extension

https://github.com/stac-utils/stac-fastapi/blob/maint-2.x/stac_fastapi/extensions/stac_fastapi/extensions/core/transaction.py#L112-L125
# stac-fastapi 2.5
            endpoint=create_async_endpoint(
                self.client.create_collection, stac_types.Collection
            ),


https://github.com/stac-utils/stac-fastapi/blob/main/stac_fastapi/extensions/stac_fastapi/extensions/core/transaction.py#L136-L156
# stac-fastapi 3.0
           endpoint=create_async_endpoint(self.client.create_collection, Collection),
```

This means that the input body is now validated and will be a Pydantic Object, with 2.5 the model was a Typed dict 

@vincentsarago vincentsarago force-pushed the feature/update-stac-fastapi-3.0 branch from 1ca76b9 to 4bf1a40 Compare April 26, 2024 22:19
jonhealy1 and others added 5 commits April 30, 2024 00:58
* update test item tests

* test collection tests

* lint

* test postgres

* test api

* more

* update item

* revert

* remove hack

* Update stac_fastapi/pgstac/core.py

Co-authored-by: Vincent Sarago <vincent.sarago@gmail.com>

* fix types

---------

Co-authored-by: Vincent Sarago <vincent.sarago@gmail.com>
@vincentsarago
Copy link
Member Author

😬 I don't understand, tests passes here but not locally 🤦

@jonhealy1
Copy link
Collaborator

So weird. The queryables and PUT /collections tests are both failing for me ...

@vincentsarago
Copy link
Member Author

alright everything seems fine locally now (it's hard to manage dependencies with gitsha pinning).

we should make a pre-release in stac-fastapi to ease the transition

@jonhealy1
Copy link
Collaborator

pre-release sounds good

@vincentsarago
Copy link
Member Author

vincentsarago commented May 7, 2024

ToDo

  • remove ContextExtension
  • update to pgstac 0.9.x Will do in another PR

@vincentsarago vincentsarago marked this pull request as ready for review May 7, 2024 12:26
@vincentsarago vincentsarago requested a review from jonhealy1 May 7, 2024 12:27
Copy link
Collaborator

@jonhealy1 jonhealy1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work

@jonhealy1
Copy link
Collaborator

Changelog maybe?

@jonhealy1
Copy link
Collaborator

Are we going to release an alpha version of stac-fastapi-pgstac or are we going to release v3.0.0 of stac-fastapi first?

@jonhealy1
Copy link
Collaborator

I copied this strategy for sfeos as well - finally got the tests to pass - stac-utils/stac-fastapi-elasticsearch-opensearch#234

@vincentsarago
Copy link
Member Author

Are we going to release an alpha version of stac-fastapi-pgstac or are we going to release v3.0.0 of stac-fastapi first?

I don't think there is any rush publishing an alpha version here! I think I'm going to focus on finishing reviewing the PR on the different repos and also finish the PR in stac-pydantic first.

@jonhealy1
Copy link
Collaborator

True makes sense

@vincentsarago vincentsarago merged commit 9163c6b into main May 7, 2024
7 checks passed
@vincentsarago vincentsarago deleted the feature/update-stac-fastapi-3.0 branch May 7, 2024 15:13
jonhealy1 added a commit to stac-utils/stac-fastapi-elasticsearch-opensearch that referenced this pull request May 10, 2024
**Related Issue(s):**

- #238 
- #247 
- #249 
- stac-utils/stac-fastapi-pgstac#108
- stac-utils/stac-fastapi#685
- stac-utils/stac-fastapi#687
- stac-utils/stac-fastapi#690
- 

**Description:**

Update stac-fastapi parent libraries to v3.0.0a. There are quite a few
changes made in this pr.

**PR Checklist:**

- [x] Code is formatted and linted (run `pre-commit run --all-files`)
- [x] Tests pass (run `make test`)
- [x] Documentation has been updated to reflect changes, if applicable
- [x] Changes are added to the changelog

---------

Co-authored-by: pedro-cf <pedro_fernandes@live.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants