You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PgSTAC: API hydration of search result items (#397)
* Upgrade to pgstac 0.5.1
Initial changes to get most tests passing.
* Add option to hydrate pgstac search results in API
* Support fields extension in nohydrate mode
* Updates to hydrate and filter functionality.
This was done in a pairing session with @mmcfarland
* Fix fields extensions and reduce number of loops
* Tolerate missing required attributes with fields extension
Use of the fields extension can result in the return of invalid stac
items if excludes is used on required attributes. When injecting item
links, don't attempt to build links for which needed attributes aren't
available. When API Hydrate is enabled, the required attributes are
preserved prior to filtering and are used in the link generation.
* Run pgstac tests in db and api hydrate mode
* Merge dicts within lists during hydration
In practice, an asset on a base_item and an item may have mergable
dicts (ie, raster bands).
* Add note on settings in readme
* Pass request to base_item_cache
This will be used by implementors who need app state which is stored on
request.
* Upgrade pypgstac and use included hydrate function
The hydrate function was improved and moved to pypgstac so it could be
used in other projects outside of stac-fastapi. It was developed with a
corresponding dehydrate function to ensure parity between the two.
The version of pypgstac is unpublished and pinned to a draft commit at
the point and will be upgraded subsequently.
* Improve fields extension implementation
Correctly supports deeply nested property keys in both include and
exclude, as well as improves variable naming, comments, and test cases.
* Remove unused error type
* adjust tests for changes in api
* remove print statements
* add bbox back to items in tests
* Upgrade pgstac
* Fix conformance test fixtures
* Fix sqlalchemy test with new status for FK error
* Align fields ext behavior for invalid includes
* Lint
* Changelog
* Remove psycopg install dependency
* Relax dependency version of pgstac to 0.6.* series
* Update dev environment to pgstac 0.6.2
* Changelog fix
Co-authored-by: Rob Emanuele <[email protected]>
Co-authored-by: Ubuntu <planetarycomputer@pct-bitner-vm.kko0dpzi4g3udak2ovyb5nsdte.ax.internal.cloudapp.net>
* docker-compose now runs uvicorn with hot-reloading enabled
20
+
* Bump version of PGStac to 0.6.2 that includes support for hydrating results in the API backed ([#397](https://github.com/stac-utils/stac-fastapi/pull/397))
20
21
21
22
### Removed
22
23
@@ -27,7 +28,8 @@
27
28
* Fixes issues (and adds tests) for issues caused by regression in pgstac ([#345](https://github.com/stac-utils/stac-fastapi/issues/345)
28
29
* Update error response payloads to match the API spec. ([#361](https://github.com/stac-utils/stac-fastapi/pull/361))
29
30
* Fixed stray `/` before the `#` in several extension conformance class strings ([383](https://github.com/stac-utils/stac-fastapi/pull/383))
30
-
* SQLAlchemy backend bulk item insert now works ([#356]https://github.com/stac-utils/stac-fastapi/issues/356))
31
+
* SQLAlchemy backend bulk item insert now works ([#356](https://github.com/stac-utils/stac-fastapi/issues/356))
32
+
* PGStac Backend has stricter implementation of Fields Extension syntax ([#397](https://github.com/stac-utils/stac-fastapi/pull/397))
Copy file name to clipboardExpand all lines: stac_fastapi/pgstac/README.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,7 +46,12 @@ pip install -e \
46
46
stac_fastapi/pgstac[dev,server]
47
47
```
48
48
49
+
### Settings
50
+
51
+
To configure PGStac stac-fastapi to [hydrate search result items in the API](https://github.com/stac-utils/pgstac#runtime-configurations), set the `USE_API_HYDRATE` environment variable to `true` or explicitly set the option in the PGStac Settings object.
52
+
49
53
### Migrations
54
+
50
55
PGStac is an external project and the may be used by multiple front ends.
51
56
For Stac FastAPI development, a docker image (which is pulled as part of the docker-compose) is available at
52
57
bitner/pgstac:[version] that has the full database already set up for PGStac.
0 commit comments