Skip to content

Add support for Python 3.11, update version to 0.3.0 #131

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jan 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
30 changes: 12 additions & 18 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand All @@ -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,
Expand All @@ -45,29 +50,18 @@ 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.
- Endpoints that return items (e.g., /search) now sort the results by 'properties.datetime,id,collection'.
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]: <https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v0.2.0...main>
- [v0.2.0]: <https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v0.1.0...v0.2.0>
- [v0.1.0]: <https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v0.1.0>
[Unreleased]: <https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v0.3.0...main>
[v0.3.0]: <https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v0.2.0...v0.3.0>
[v0.2.0]: <https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v0.1.0...v0.2.0>
[v0.1.0]: <https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v0.1.0>
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.2.0
0.3.0
5 changes: 3 additions & 2 deletions stac_fastapi/elasticsearch/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
"""library version."""
__version__ = "0.2.0"
__version__ = "0.3.0"
13 changes: 13 additions & 0 deletions stac_fastapi/elasticsearch/tests/api/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"}
Expand Down