Skip to content

Commit a2ec61e

Browse files
committed
Merge branch 'main' of github.com:stac-utils/stac-fastapi-elasticsearch into extend_datetime_search
2 parents 0c1e08f + 49fecf9 commit a2ec61e

File tree

21 files changed

+50
-349
lines changed

21 files changed

+50
-349
lines changed

CHANGELOG.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,19 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77

88
## [Unreleased]
99

10+
## [v3.0.0a1]
11+
12+
### Changed
13+
14+
- Unskip temporal open window test [#254](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/254)
15+
- Removed deprecated context extension [#255](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/255)
16+
- Remove duplicated code from stac_fastapi.types [#257](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/257)
17+
18+
## [v3.0.0a0]
19+
1020
### Added
1121

22+
- Symlinks from project-specific readme files to main readme [#250](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/250)
1223
- Support for Python 3.12 [#234](https://github.com/stac-utils/stac-fastapi-elasticsearch/pull/234)
1324
- Extended Datetime Search to search on start_datetime and end_datetime as well as datetime fields. [#182](https://github.com/stac-utils/stac-fastapi-elasticsearch/pull/182)
1425

@@ -194,7 +205,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
194205
- Added db_to_stac serializer to item_collection method in core.py.
195206

196207

197-
[Unreleased]: <https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v2.4.1...main>
208+
[Unreleased]: <https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v3.0.0a1...main>
209+
[v3.0.0a1]: <https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v3.0.0a0...v3.0.0a1>
210+
[v3.0.0a0]: <https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v2.4.1...v3.0.0a0>
198211
[v2.4.1]: <https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v2.4.0...v2.4.1>
199212
[v2.4.0]: <https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v2.3.0...v2.4.0>
200213
[v2.3.0]: <https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v2.2.0...v2.3.0>

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<p align="left">
66
<img src="https://github.com/radiantearth/stac-site/raw/master/images/logo/stac-030-long.png" width=600>
77
<p align="left"><b>Elasticsearch and Opensearch backends for the stac-fastapi project.</b></p>
8+
<p align="left"><b>Featuring stac-fastapi.core for simplifying the creation and maintenance of custom STAC api backends.</b></p>
89
</p>
910

1011

docker-compose.basic_auth_protected.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ services:
1111
environment:
1212
- STAC_FASTAPI_TITLE=stac-fastapi-elasticsearch
1313
- STAC_FASTAPI_DESCRIPTION=A STAC FastAPI with an Elasticsearch backend
14-
- STAC_FASTAPI_VERSION=2.1
14+
- STAC_FASTAPI_VERSION=3.0.0a1
1515
- APP_HOST=0.0.0.0
1616
- APP_PORT=8080
1717
- RELOAD=true

docker-compose.basic_auth_public.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ services:
1111
environment:
1212
- STAC_FASTAPI_TITLE=stac-fastapi-elasticsearch
1313
- STAC_FASTAPI_DESCRIPTION=A STAC FastAPI with an Elasticsearch backend
14-
- STAC_FASTAPI_VERSION=2.1
14+
- STAC_FASTAPI_VERSION=3.0.0a1
1515
- APP_HOST=0.0.0.0
1616
- APP_PORT=8080
1717
- RELOAD=true

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ services:
4343
environment:
4444
- STAC_FASTAPI_TITLE=stac-fastapi-opensearch
4545
- STAC_FASTAPI_DESCRIPTION=A STAC FastAPI with an Opensearch backend
46-
- STAC_FASTAPI_VERSION=2.1
46+
- STAC_FASTAPI_VERSION=3.0.0a1
4747
- APP_HOST=0.0.0.0
4848
- APP_PORT=8082
4949
- RELOAD=true

stac_fastapi/core/README.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

stac_fastapi/core/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../README.md

stac_fastapi/core/stac_fastapi/core/core.py

Lines changed: 11 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,6 @@
2626
from stac_fastapi.core.models.links import PagingLinks
2727
from stac_fastapi.core.serializers import CollectionSerializer, ItemSerializer
2828
from stac_fastapi.core.session import Session
29-
from stac_fastapi.core.types.core import (
30-
AsyncBaseCoreClient,
31-
AsyncBaseTransactionsClient,
32-
)
3329
from stac_fastapi.extensions.third_party.bulk_transactions import (
3430
BaseBulkTransactionsClient,
3531
BulkTransactionMethod,
@@ -38,7 +34,11 @@
3834
from stac_fastapi.types import stac as stac_types
3935
from stac_fastapi.types.config import Settings
4036
from stac_fastapi.types.conformance import BASE_CONFORMANCE_CLASSES
41-
from stac_fastapi.types.core import AsyncBaseFiltersClient
37+
from stac_fastapi.types.core import (
38+
AsyncBaseCoreClient,
39+
AsyncBaseFiltersClient,
40+
AsyncBaseTransactionsClient,
41+
)
4242
from stac_fastapi.types.extension import ApiExtension
4343
from stac_fastapi.types.requests import get_base_url
4444
from stac_fastapi.types.rfc3339 import DateTimeType
@@ -313,22 +313,14 @@ async def item_collection(
313313
self.item_serializer.db_to_stac(item, base_url=base_url) for item in items
314314
]
315315

316-
context_obj = None
317-
if self.extension_is_enabled("ContextExtension"):
318-
context_obj = {
319-
"returned": len(items),
320-
"limit": limit,
321-
}
322-
if maybe_count is not None:
323-
context_obj["matched"] = maybe_count
324-
325316
links = await PagingLinks(request=request, next=next_token).get_links()
326317

327318
return stac_types.ItemCollection(
328319
type="FeatureCollection",
329320
features=items,
330321
links=links,
331-
context=context_obj,
322+
numReturned=len(items),
323+
numMatched=maybe_count,
332324
)
333325

334326
async def get_item(
@@ -634,22 +626,14 @@ async def post_search(
634626
for feat in items
635627
]
636628

637-
context_obj = None
638-
if self.extension_is_enabled("ContextExtension"):
639-
context_obj = {
640-
"returned": len(items),
641-
"limit": limit,
642-
}
643-
if maybe_count is not None:
644-
context_obj["matched"] = maybe_count
645-
646629
links = await PagingLinks(request=request, next=next_token).get_links()
647630

648631
return stac_types.ItemCollection(
649632
type="FeatureCollection",
650633
features=items,
651634
links=links,
652-
context=context_obj,
635+
numReturned=len(items),
636+
numMatched=maybe_count,
653637
)
654638

655639

@@ -774,7 +758,7 @@ async def create_collection(
774758

775759
@overrides
776760
async def update_collection(
777-
self, collection: Collection, **kwargs
761+
self, collection_id: str, collection: Collection, **kwargs
778762
) -> stac_types.Collection:
779763
"""
780764
Update a collection.
@@ -787,6 +771,7 @@ async def update_collection(
787771
The updated collection is then returned.
788772
789773
Args:
774+
collection_id: id of the existing collection to be updated
790775
collection: A STAC collection that needs to be updated.
791776
kwargs: Additional keyword arguments.
792777
@@ -798,10 +783,6 @@ async def update_collection(
798783

799784
base_url = str(kwargs["request"].base_url)
800785

801-
collection_id = kwargs["request"].query_params.get(
802-
"collection_id", collection["id"]
803-
)
804-
805786
collection = self.database.collection_serializer.stac_to_db(
806787
collection, base_url
807788
)

0 commit comments

Comments
 (0)