Skip to content

Commit b6c3410

Browse files
update pgstac to 0.8.x (#107)
* update pgstac to 0.8.x * patch None
1 parent 9887fdc commit b6c3410

File tree

5 files changed

+9
-5
lines changed

5 files changed

+9
-5
lines changed

CHANGES.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
## [Unreleased]
44

5+
### Changed
6+
7+
- update pgstac version to `0.8.x`
58

69
## [2.5.0] - 2024-04-25
710

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ services:
4545

4646
database:
4747
container_name: stac-db
48-
image: ghcr.io/stac-utils/pgstac:v0.7.10
48+
image: ghcr.io/stac-utils/pgstac:v0.8.5
4949
environment:
5050
- POSTGRES_USER=username
5151
- POSTGRES_PASSWORD=password

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717
"buildpg",
1818
"brotli_asgi",
1919
"pygeofilter>=0.2",
20-
"pypgstac==0.7.*",
20+
"pypgstac==0.8.*",
2121
]
2222

2323
extra_reqs = {
2424
"dev": [
2525
"pystac[validation]",
26-
"pypgstac[psycopg]==0.7.*",
26+
"pypgstac[psycopg]==0.8.*",
2727
"pytest-postgresql",
2828
"pytest",
2929
"pytest-cov",

stac_fastapi/pgstac/core.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,9 @@ async def _get_base_item(collection_id: str) -> Dict[str, Any]:
226226

227227
for feature in collection.get("features") or []:
228228
base_item = await base_item_cache.get(feature.get("collection"))
229+
# Exclude None values
230+
base_item = {k: v for k, v in base_item.items() if v is not None}
231+
229232
feature = hydrate(base_item, feature)
230233

231234
# Grab ids needed for links that may be removed by the fields extension.

tests/api/test_api.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,6 @@ async def test_base_queryables(load_test_data, app_client, load_test_collection)
476476
assert q["type"] == "object"
477477
assert "properties" in q
478478
assert "id" in q["properties"]
479-
assert "eo:cloud_cover" in q["properties"]
480479

481480

482481
@pytest.mark.asyncio
@@ -488,7 +487,6 @@ async def test_collection_queryables(load_test_data, app_client, load_test_colle
488487
assert q["type"] == "object"
489488
assert "properties" in q
490489
assert "id" in q["properties"]
491-
assert "eo:cloud_cover" in q["properties"]
492490

493491

494492
@pytest.mark.asyncio

0 commit comments

Comments
 (0)