Skip to content

Commit 8738bdc

Browse files
authored
Merge branch 'main' into extend_datetime_search
2 parents fb41c03 + bbbba05 commit 8738bdc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+68540
-1098
lines changed

.github/workflows/cicd.yml

Lines changed: 13 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,9 @@ on:
1212
jobs:
1313
test:
1414
runs-on: ubuntu-latest
15-
timeout-minutes: 10
15+
timeout-minutes: 20
1616

1717
services:
18-
1918
elasticsearch_8_svc:
2019
image: docker.elastic.co/elasticsearch/elasticsearch:8.11.0
2120
env:
@@ -63,21 +62,25 @@ jobs:
6362
OPENSEARCH_JAVA_OPTS: -Xms512m -Xmx512m
6463
ports:
6564
- 9202:9202
65+
6666
strategy:
6767
matrix:
6868
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12"]
69+
backend: [ "elasticsearch7", "elasticsearch8", "opensearch"]
6970

70-
name: Python ${{ matrix.python-version }} testing
71+
name: Python ${{ matrix.python-version }} testing with ${{ matrix.backend }}
7172

7273
steps:
7374
- name: Check out repository code
7475
uses: actions/checkout@v4
7576

76-
# Setup Python (faster than using Python container)
7777
- name: Setup Python
7878
uses: actions/setup-python@v5
7979
with:
8080
python-version: ${{ matrix.python-version }}
81+
cache: 'pip'
82+
cache-dependency-path: |
83+
**/setup.py
8184
8285
- name: Lint code
8386
if: ${{ matrix.python-version == 3.11 }}
@@ -101,35 +104,17 @@ jobs:
101104
run: |
102105
pip install ./stac_fastapi/opensearch[dev,server]
103106
104-
- name: Run test suite against Elasticsearch 7.x
105-
run: |
106-
pipenv run pytest -svvv
107-
env:
108-
ENVIRONMENT: testing
109-
ES_PORT: 9400
110-
ES_HOST: 172.17.0.1
111-
ES_USE_SSL: false
112-
ES_VERIFY_CERTS: false
113-
BACKEND: elasticsearch
114-
115-
- name: Run test suite against Elasticsearch 8.x
107+
- name: Install pytest-timeout
116108
run: |
117-
pipenv run pytest -svvv
118-
env:
119-
ENVIRONMENT: testing
120-
ES_PORT: 9200
121-
ES_HOST: 172.17.0.1
122-
ES_USE_SSL: false
123-
ES_VERIFY_CERTS: false
124-
BACKEND: elasticsearch
109+
pip install pytest-timeout
125110
126-
- name: Run test suite against OpenSearch 2.11.1
111+
- name: Run test suite
127112
run: |
128-
pipenv run pytest -svvv
113+
pipenv run pytest -svvv --timeout=300
129114
env:
130115
ENVIRONMENT: testing
131-
ES_PORT: 9202
116+
ES_PORT: ${{ matrix.backend == 'elasticsearch7' && '9400' || matrix.backend == 'elasticsearch8' && '9200' || '9202' }}
132117
ES_HOST: 172.17.0.1
133118
ES_USE_SSL: false
134119
ES_VERIFY_CERTS: false
135-
BACKEND: opensearch
120+
BACKEND: ${{ matrix.backend == 'elasticsearch7' && 'elasticsearch' || matrix.backend == 'elasticsearch8' && 'elasticsearch' || 'opensearch' }}

CHANGELOG.md

Lines changed: 64 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,61 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77

88
## [Unreleased]
99

10+
### Added
11+
12+
- Added `datetime_frequency_interval` parameter for `datetime_frequency` aggregation. [#294](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/294)
13+
- Added rate limiting functionality with configurable limits using environment variable `STAC_FASTAPI_RATE_LIMIT`, example: `500/minute`. [#303](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/303)
14+
15+
### Changed
16+
17+
- Updated CollectionLinks to generate correct `self` link for collections endpoint. [#297](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/297)
18+
- Refactored aggregation in database logic. [#294](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/294)
19+
- Fixed the `self` link for the `/collections/{collection_id}/aggregations` endpoint. [#295](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/295)
20+
21+
## [v3.1.0] - 2024-09-02
22+
23+
### Added
24+
25+
- Added support for FreeTextExtension. [#227](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/227)
26+
27+
### Changed
28+
29+
- Support escaped backslashes in CQL2 `LIKE` queries, and reject invalid (or incomplete) escape sequences. [#286](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/286)
30+
31+
## [v3.0.0] - 2024-08-14
32+
33+
### Changed
34+
35+
- Aggregation bug fixes [#281](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/281)
36+
- Updated stac-fastapi libraries to v3.0.0 [#282](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/282)
37+
38+
## [v3.0.0a3] - 2024-07-17
39+
40+
### Added
41+
42+
- Added an implementation of the Aggregation Extension. Enables spatial, frequency distribution, and datetime distribution aggregations. [#276](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/276)
43+
- Added support for route depndencies configuration through the STAC_FASTAPI_ROUTE_DEPENDENCIES environment variable, directly or via json file. Allows for fastapi's inbuilt OAuth2 flows to be used as dependencies. Custom dependencies can also be written, see Basic Auth for an example. [#251](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/251)
44+
- Added docker-compose.route_dependencies_file.yml that gives an example of OAuth2 workflow using keycloak as the identity provider. [#251](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/251)
45+
- Added docker-compose.route_dependencies_env.yml that gives an example using the STAC_FASTAPI_ROUTE_DEPENDENCIES environment variable. [#251](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/251)
46+
47+
### Changed
48+
49+
- Updated to stac-fastapi 3.0.0a4. [#275](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/275)
50+
- Converted Basic auth to a route dependency and merged with new route depndencies method. [#251](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/251)
51+
- Updated docker-compose.basic_auth_protected.yml to use STAC_FASTAPI_ROUTE_DEPENDENCIES environment variable. [#251](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/251)
52+
1053
## [v3.0.0a2]
1154

1255
### Added
13-
- Queryables landing page and collection links when the Filter Extension is enabled [#267](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/267)
56+
57+
- Queryables landing page and collection links when the Filter Extension is enabled [#267](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/267)
1458

1559
### Changed
1660

1761
- Updated stac-fastapi libraries to v3.0.0a1 [#265](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/265)
1862
- Updated stac-fastapi libraries to v3.0.0a3 [#269](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/269)
63+
- Converted Basic auth to a route dependency and merged with new route depndencies method. [#251](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/251)
64+
- Updated docker-compose.basic_auth_protected.yml to use STAC_FASTAPI_ROUTE_DEPENDENCIES environment variable. [#251](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/251)
1965

2066
### Fixed
2167

@@ -44,13 +90,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
4490
- Updated stac-fastapi parent libraries to v3.0.0a0 [#234](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/234)
4591
- Removed pystac dependency [#234](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/234)
4692

47-
### Fixed
93+
### Fixed
4894

4995
- Fixed issue where paginated search queries would return a `next_token` on the last page [#243](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/243)
5096

5197
## [v2.4.1]
5298

53-
### Added
99+
### Added
54100

55101
- A test to ensure that pagination correctly returns expected links, particularly verifying the absence of a 'next' link on the last page of results [#244](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/244)
56102

@@ -74,7 +120,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
74120

75121
## [v2.3.0]
76122

77-
### Changed
123+
### Changed
78124

79125
- Upgraded stac-fastapi libraries to v2.5.3 from v2.4.9 [#172](https://github.com/stac-utils/stac-fastapi-elasticsearch/pull/172)
80126

@@ -168,7 +214,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
168214
- Remove unsupported characters from Elasticsearch index names [#153](https://github.com/stac-utils/stac-fastapi-elasticsearch/issues/153)
169215
- Fixed GET /search sortby requests [#25](https://github.com/stac-utils/stac-fastapi-elasticsearch/issues/25)
170216

171-
172217
## [v0.3.0]
173218

174219
### Added
@@ -185,7 +230,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
185230

186231
- Updated core stac-fastapi libraries to 2.4.3 from 2.3.0 [#127](https://github.com/stac-utils/stac-fastapi-elasticsearch/pull/127)
187232

188-
189233
## [v0.2.0]
190234

191235
### Added
@@ -208,7 +252,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
208252
- When using bulk ingest, items will continue to be ingested if any of them fail. Previously, the call would fail
209253
immediately if any items failed.
210254

211-
212255
## [v0.1.0]
213256

214257
### Changed
@@ -220,19 +263,17 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
220263
- Use genexp in execute_search and get_all_collections to return results.
221264
- Added db_to_stac serializer to item_collection method in core.py.
222265

223-
224-
[Unreleased]: <https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v3.0.0a2...main>
225-
[v3.0.0a2]: <https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v3.0.0a1...v3.0.0a2>
226-
[v3.0.0a1]: <https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v3.0.0a0...v3.0.0a1>
227-
[v3.0.0a0]: <https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v2.4.1...v3.0.0a0>
228-
[v2.4.1]: <https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v2.4.0...v2.4.1>
229-
[v2.4.0]: <https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v2.3.0...v2.4.0>
230-
[v2.3.0]: <https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v2.2.0...v2.3.0>
231-
[v2.2.0]: <https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v2.1.0...v2.2.0>
232-
[v2.1.0]: <https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v2.0.0...v2.1.0>
233-
[v2.0.0]: <https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v1.1.0...v2.0.0>
234-
[v1.1.0]: <https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v1.0.0...v1.1.0>
235-
[v1.0.0]: <https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v0.3.0...v1.0.0>
236-
[v0.3.0]: <https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v0.2.0...v0.3.0>
237-
[v0.2.0]: <https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v0.1.0...v0.2.0>
238-
[v0.1.0]: <https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v0.1.0>
266+
[Unreleased]: https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v3.1.0...main
267+
[v3.1.0]: https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v3.0.0...v3.1.0
268+
[v3.0.0]: https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v2.4.1...v3.0.0
269+
[v2.4.1]: https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v2.4.0...v2.4.1
270+
[v2.4.0]: https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v2.3.0...v2.4.0
271+
[v2.3.0]: https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v2.2.0...v2.3.0
272+
[v2.2.0]: https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v2.1.0...v2.2.0
273+
[v2.1.0]: https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v2.0.0...v2.1.0
274+
[v2.0.0]: https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v1.1.0...v2.0.0
275+
[v1.1.0]: https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v1.0.0...v1.1.0
276+
[v1.0.0]: https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v0.3.0...v1.0.0
277+
[v0.3.0]: https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v0.2.0...v0.3.0
278+
[v0.2.0]: https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v0.1.0...v0.2.0
279+
[v0.1.0]: https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v0.1.0

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!make
22
APP_HOST ?= 0.0.0.0
3-
EXTERNAL_APP_PORT ?= ${APP_PORT}
3+
EXTERNAL_APP_PORT ?= 8080
44

55
ES_APP_PORT ?= 8080
66
ES_HOST ?= docker.for.mac.localhost

0 commit comments

Comments
 (0)