Skip to content

Commit b5a6001

Browse files
authored
Merge pull request #131 from stac-utils/python-3.11
Add support for Python 3.11, update version to 0.3.0
2 parents 0f75c89 + 0e5fe13 commit b5a6001

File tree

7 files changed

+34
-26
lines changed

7 files changed

+34
-26
lines changed

.github/workflows/cicd.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
- 9400:9400
4949
strategy:
5050
matrix:
51-
python-version: [ "3.8", "3.9", "3.10" ]
51+
python-version: [ "3.8", "3.9", "3.10", "3.11"]
5252

5353
name: Python ${{ matrix.python-version }} testing
5454

CHANGELOG.md

+12-18
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77

88
## [Unreleased]
99

10+
### Added
11+
### Changed
12+
### Fixed
13+
14+
## [v0.3.0]
15+
1016
### Added
1117

1218
- 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.
1521
- 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)
1622
- 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)
1723
- Fields Extension [#129](https://github.com/stac-utils/stac-fastapi-elasticsearch/pull/129)
24+
- Support for Python 3.11 [#131](https://github.com/stac-utils/stac-fastapi-elasticsearch/pull/131)
1825

1926

2027
### Changed
@@ -23,8 +30,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
2330

2431
## [v0.2.0]
2532

26-
### Deprecated
27-
2833
### Added
2934

3035
- Filter Extension as GET with CQL2-Text and POST with CQL2-JSON,
@@ -45,29 +50,18 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
4550
- When using bulk ingest, items will continue to be ingested if any of them fail. Previously, the call would fail
4651
immediately if any items failed.
4752

48-
### Removed
49-
5053
## [v0.1.0]
5154

52-
### Deprecated
53-
54-
### Added
55-
56-
### Fixed
57-
5855
### Changed
5956

6057
- Elasticsearch index mappings updated to be more thorough.
6158
- Endpoints that return items (e.g., /search) now sort the results by 'properties.datetime,id,collection'.
6259
Previously, there was no sort order defined.
6360
- Db_to_stac serializer moved to core.py for consistency as it existed in both core and database_logic previously.
6461
- Use genexp in execute_search and get_all_collections to return results.
65-
- Added db_to_stac serializer to item_collection method in core.py.
66-
67-
### Removed
68-
69-
## Versions
62+
- Added db_to_stac serializer to item_collection method in core.py.
7063

71-
- [Unreleased]: <https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v0.2.0...main>
72-
- [v0.2.0]: <https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v0.1.0...v0.2.0>
73-
- [v0.1.0]: <https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v0.1.0>
64+
[Unreleased]: <https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v0.3.0...main>
65+
[v0.3.0]: <https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v0.2.0...v0.3.0>
66+
[v0.2.0]: <https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v0.1.0...v0.2.0>
67+
[v0.1.0]: <https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v0.1.0>

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
## Elasticsearch backend for stac-fastapi
44

5-
### Join our [Gitter](https://gitter.im/stac-fastapi-elasticsearch/community) page
5+
#### Join our [Gitter](https://gitter.im/stac-fastapi-elasticsearch/community) page
66

7-
### Check out the public Postman documentation [Postman](https://documenter.getpostman.com/view/12888943/2s8ZDSdRHA)
7+
#### Check out the public Postman documentation [Postman](https://documenter.getpostman.com/view/12888943/2s8ZDSdRHA)
88

9-
### For changes, see the [Changelog](CHANGELOG.md)
9+
#### For changes, see the [Changelog](CHANGELOG.md)
1010

1111

1212
## Development Environment Setup

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.2.0
1+
0.3.0

stac_fastapi/elasticsearch/setup.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@
3434
"httpx",
3535
],
3636
"docs": ["mkdocs", "mkdocs-material", "pdocs"],
37-
"server": ["uvicorn[standard]>=0.12.0,<0.14.0"],
37+
"server": ["uvicorn[standard]==0.19.0"],
3838
}
3939

4040
setup(
4141
name="stac-fastapi.elasticsearch",
42-
description="An implementation of STAC API based on the FastAPI framework.",
42+
description="An implementation of STAC API based on the FastAPI framework with Elasticsearch.",
4343
long_description=desc,
4444
long_description_content_type="text/markdown",
4545
python_requires=">=3.8",
@@ -50,6 +50,7 @@
5050
"Programming Language :: Python :: 3.8",
5151
"Programming Language :: Python :: 3.9",
5252
"Programming Language :: Python :: 3.10",
53+
"Programming Language :: Python :: 3.11",
5354
"License :: OSI Approved :: MIT License",
5455
],
5556
url="https://github.com/stac-utils/stac-fastapi-elasticsearch",
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
"""library version."""
2-
__version__ = "0.2.0"
2+
__version__ = "0.3.0"

stac_fastapi/elasticsearch/tests/api/test_api.py

+13
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,19 @@ async def test_app_fields_extension(app_client, ctx, txn_client):
115115
assert list(resp_json["features"][0]["properties"]) == ["datetime"]
116116

117117

118+
async def test_app_fields_extension_query(app_client, ctx, txn_client):
119+
resp = await app_client.post(
120+
"/search",
121+
json={
122+
"query": {"proj:epsg": {"gte": ctx.item["properties"]["proj:epsg"]}},
123+
"collections": ["test-collection"],
124+
},
125+
)
126+
assert resp.status_code == 200
127+
resp_json = resp.json()
128+
assert list(resp_json["features"][0]["properties"]) == ["datetime", "proj:epsg"]
129+
130+
118131
async def test_app_fields_extension_no_properties_get(app_client, ctx, txn_client):
119132
resp = await app_client.get(
120133
"/search", params={"collections": ["test-collection"], "fields": "-properties"}

0 commit comments

Comments
 (0)