Skip to content

Commit f1839d3

Browse files
authored
Merge pull request #237 from stac-utils/stac-fastapi-2.5.5
Upgrade to stac-fastapi v2.5.5
2 parents 9bbf03b + 66be514 commit f1839d3

File tree

4 files changed

+27
-6
lines changed

4 files changed

+27
-6
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1111

1212
- Added option to include Basic Auth [#232](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/232)
1313

14+
### Changed
15+
16+
- Upgrade stac-fastapi libaries to v2.5.5 [#237](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/237)
17+
1418
### Fixed
1519

1620
- Fixed `POST /collections/test-collection/items` returning an item with an empty links array [#236](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/236)

stac_fastapi/core/setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
"attrs",
1111
"pydantic[dotenv]<2",
1212
"stac_pydantic==2.0.*",
13-
"stac-fastapi.types==2.5.3",
14-
"stac-fastapi.api==2.5.3",
15-
"stac-fastapi.extensions==2.5.3",
13+
"stac-fastapi.types==2.5.5.post1",
14+
"stac-fastapi.api==2.5.5.post1",
15+
"stac-fastapi.extensions==2.5.5.post1",
1616
"pystac[validation]",
1717
"orjson",
1818
"overrides",

stac_fastapi/tests/resources/test_collection.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,24 @@ async def test_returns_valid_collection(ctx, app_client):
109109

110110
@pytest.mark.asyncio
111111
async def test_collection_extensions(ctx, app_client):
112+
"""Test that extensions can be used to define additional top-level properties"""
113+
ctx.collection.get("stac_extensions", []).append(
114+
"https://stac-extensions.github.io/item-assets/v1.0.0/schema.json"
115+
)
116+
test_asset = {"title": "test", "description": "test", "type": "test"}
117+
ctx.collection["item_assets"] = {"test": test_asset}
118+
ctx.collection["id"] = "test-item-assets"
119+
resp = await app_client.post("/collections", json=ctx.collection)
120+
121+
assert resp.status_code == 200
122+
assert resp.json().get("item_assets", {}).get("test") == test_asset
123+
124+
125+
@pytest.mark.skip(
126+
reason="Broken as of stac-fastapi v2.5.5, the PUT collections route is not allowing the item_assets field to persist."
127+
)
128+
@pytest.mark.asyncio
129+
async def test_collection_extensions_with_put(ctx, app_client):
112130
"""Test that extensions can be used to define additional top-level properties"""
113131
ctx.collection.get("stac_extensions", []).append(
114132
"https://stac-extensions.github.io/item-assets/v1.0.0/schema.json"

stac_fastapi/tests/resources/test_item.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -829,6 +829,5 @@ async def test_search_datetime_validation_errors(app_client):
829829
resp = await app_client.post("/search", json=body)
830830
assert resp.status_code == 400
831831

832-
# Getting this instead ValueError: Invalid RFC3339 datetime.
833-
# resp = await app_client.get("/search?datetime={}".format(dt))
834-
# assert resp.status_code == 400
832+
resp = await app_client.get("/search?datetime={}".format(dt))
833+
assert resp.status_code == 400

0 commit comments

Comments
 (0)