diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 3f67f60b..4afa7757 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -48,7 +48,7 @@ jobs: - 9400:9400 strategy: matrix: - python-version: [ "3.8", "3.9", "3.10" ] + python-version: [ "3.8", "3.9", "3.10", "3.11"] name: Python ${{ matrix.python-version }} testing diff --git a/CHANGELOG.md b/CHANGELOG.md index 93f78872..0016eecb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +### Added +### Changed +### Fixed + +## [v0.3.0] + ### Added - Added bbox and datetime parameters and functionality to item_collection [#127](https://github.com/stac-utils/stac-fastapi-elasticsearch/pull/127) @@ -15,6 +21,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - The default Collection objects index can be overridden by the `STAC_COLLECTIONS_INDEX` environment variable [#128](https://github.com/stac-utils/stac-fastapi-elasticsearch/pull/128) - The default Item objects index prefix can be overridden by the `STAC_ITEMS_INDEX_PREFIX` environment variable [#128](https://github.com/stac-utils/stac-fastapi-elasticsearch/pull/128) - Fields Extension [#129](https://github.com/stac-utils/stac-fastapi-elasticsearch/pull/129) +- Support for Python 3.11 [#131](https://github.com/stac-utils/stac-fastapi-elasticsearch/pull/131) ### Changed @@ -23,8 +30,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [v0.2.0] -### Deprecated - ### Added - Filter Extension as GET with CQL2-Text and POST with CQL2-JSON, @@ -45,16 +50,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - When using bulk ingest, items will continue to be ingested if any of them fail. Previously, the call would fail immediately if any items failed. -### Removed - ## [v0.1.0] -### Deprecated - -### Added - -### Fixed - ### Changed - Elasticsearch index mappings updated to be more thorough. @@ -62,12 +59,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. Previously, there was no sort order defined. - Db_to_stac serializer moved to core.py for consistency as it existed in both core and database_logic previously. - Use genexp in execute_search and get_all_collections to return results. -- Added db_to_stac serializer to item_collection method in core.py. - -### Removed - -## Versions +- Added db_to_stac serializer to item_collection method in core.py. -- [Unreleased]: -- [v0.2.0]: -- [v0.1.0]: +[Unreleased]: +[v0.3.0]: +[v0.2.0]: +[v0.1.0]: diff --git a/README.md b/README.md index 1397fb14..bd87b112 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,11 @@ ## Elasticsearch backend for stac-fastapi -### Join our [Gitter](https://gitter.im/stac-fastapi-elasticsearch/community) page +#### Join our [Gitter](https://gitter.im/stac-fastapi-elasticsearch/community) page -### Check out the public Postman documentation [Postman](https://documenter.getpostman.com/view/12888943/2s8ZDSdRHA) +#### Check out the public Postman documentation [Postman](https://documenter.getpostman.com/view/12888943/2s8ZDSdRHA) -### For changes, see the [Changelog](CHANGELOG.md) +#### For changes, see the [Changelog](CHANGELOG.md) ## Development Environment Setup diff --git a/VERSION b/VERSION index 341cf11f..9325c3cc 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.2.0 \ No newline at end of file +0.3.0 \ No newline at end of file diff --git a/stac_fastapi/elasticsearch/setup.py b/stac_fastapi/elasticsearch/setup.py index 0533bfbe..3c48b2a7 100644 --- a/stac_fastapi/elasticsearch/setup.py +++ b/stac_fastapi/elasticsearch/setup.py @@ -34,12 +34,12 @@ "httpx", ], "docs": ["mkdocs", "mkdocs-material", "pdocs"], - "server": ["uvicorn[standard]>=0.12.0,<0.14.0"], + "server": ["uvicorn[standard]==0.19.0"], } setup( name="stac-fastapi.elasticsearch", - description="An implementation of STAC API based on the FastAPI framework.", + description="An implementation of STAC API based on the FastAPI framework with Elasticsearch.", long_description=desc, long_description_content_type="text/markdown", python_requires=">=3.8", @@ -50,6 +50,7 @@ "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", "License :: OSI Approved :: MIT License", ], url="https://github.com/stac-utils/stac-fastapi-elasticsearch", diff --git a/stac_fastapi/elasticsearch/stac_fastapi/elasticsearch/version.py b/stac_fastapi/elasticsearch/stac_fastapi/elasticsearch/version.py index 53e71d63..68999e11 100644 --- a/stac_fastapi/elasticsearch/stac_fastapi/elasticsearch/version.py +++ b/stac_fastapi/elasticsearch/stac_fastapi/elasticsearch/version.py @@ -1,2 +1,2 @@ """library version.""" -__version__ = "0.2.0" +__version__ = "0.3.0" diff --git a/stac_fastapi/elasticsearch/tests/api/test_api.py b/stac_fastapi/elasticsearch/tests/api/test_api.py index 204dfc40..7dbf3996 100644 --- a/stac_fastapi/elasticsearch/tests/api/test_api.py +++ b/stac_fastapi/elasticsearch/tests/api/test_api.py @@ -115,6 +115,19 @@ async def test_app_fields_extension(app_client, ctx, txn_client): assert list(resp_json["features"][0]["properties"]) == ["datetime"] +async def test_app_fields_extension_query(app_client, ctx, txn_client): + resp = await app_client.post( + "/search", + json={ + "query": {"proj:epsg": {"gte": ctx.item["properties"]["proj:epsg"]}}, + "collections": ["test-collection"], + }, + ) + assert resp.status_code == 200 + resp_json = resp.json() + assert list(resp_json["features"][0]["properties"]) == ["datetime", "proj:epsg"] + + async def test_app_fields_extension_no_properties_get(app_client, ctx, txn_client): resp = await app_client.get( "/search", params={"collections": ["test-collection"], "fields": "-properties"}