Skip to content

Commit 5ed542d

Browse files
authored
Merge branch 'main' into release-v4.1.0
2 parents 1428907 + 70a18f5 commit 5ed542d

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

CHANGELOG.md

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

1616
## [v4.1.0] - 2025-05-04
1717

18+
### Added
19+
20+
- Added code coverage reporting to the test suite using pytest-cov. [#87](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/issues/87)
21+
1822
### Changed
1923

20-
- Updated dynamic mapping for items to map long values to double versus float [#326](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/326)
24+
- Updated dynamic mapping for items to map long values to double versus float. [#326](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/326)
2125
- 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)
22-
26+
- Changed item update operation to use Elasticsearch index API instead of delete and create for better efficiency and atomicity. [#75](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/issues/75)
2327

2428
## [v4.0.0] - 2025-04-23
2529

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,10 @@ test-opensearch:
7575

7676
.PHONY: test
7777
test:
78-
-$(run_es) /bin/bash -c 'export && ./scripts/wait-for-it-es.sh elasticsearch:9200 && cd stac_fastapi/tests/ && pytest'
78+
-$(run_es) /bin/bash -c 'export && ./scripts/wait-for-it-es.sh elasticsearch:9200 && cd stac_fastapi/tests/ && pytest --cov=stac_fastapi --cov-report=term-missing'
7979
docker compose down
8080

81-
-$(run_os) /bin/bash -c 'export && ./scripts/wait-for-it-es.sh opensearch:9202 && cd stac_fastapi/tests/ && pytest'
81+
-$(run_os) /bin/bash -c 'export && ./scripts/wait-for-it-es.sh opensearch:9202 && cd stac_fastapi/tests/ && pytest --cov=stac_fastapi --cov-report=term-missing'
8282
docker compose down
8383

8484
.PHONY: run-database-es

stac_fastapi/core/stac_fastapi/core/core.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -742,8 +742,7 @@ async def update_item(
742742
item["properties"]["updated"] = now
743743

744744
await self.database.check_collection_exists(collection_id)
745-
await self.delete_item(item_id=item_id, collection_id=collection_id)
746-
await self.create_item(collection_id=collection_id, item=Item(**item), **kwargs)
745+
await self.database.create_item(item, refresh=kwargs.get("refresh", False))
747746

748747
return ItemSerializer.db_to_stac(item, base_url)
749748

0 commit comments

Comments
 (0)