Skip to content

Commit 4623a43

Browse files
committed
Merge branch 'main' of github.com:stac-utils/stac-fastapi-elasticsearch into patch_endpoints
2 parents d94d8fe + b016945 commit 4623a43

File tree

33 files changed

+1122
-358
lines changed

33 files changed

+1122
-358
lines changed

.github/workflows/cicd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565

6666
strategy:
6767
matrix:
68-
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12"]
68+
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
6969
backend: [ "elasticsearch7", "elasticsearch8", "opensearch"]
7070

7171
name: Python ${{ matrix.python-version }} testing with ${{ matrix.backend }}

.github/workflows/publish.yml

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*.*.*" # Triggers when a tag like 'v3.2.0' is pushed
7+
8+
jobs:
9+
build-and-publish-pypi:
10+
name: Build and Publish Packages
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Set up Python 3.10
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: "3.10"
20+
21+
- name: Install build dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install setuptools wheel twine
25+
26+
- name: Build and publish stac-fastapi-core
27+
working-directory: stac_fastapi/core
28+
env:
29+
TWINE_USERNAME: "__token__"
30+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
31+
run: |
32+
# Build package
33+
python setup.py sdist bdist_wheel
34+
35+
# Publish to PyPI
36+
twine upload dist/*
37+
38+
- name: Build and publish stac-fastapi-elasticsearch
39+
working-directory: stac_fastapi/elasticsearch
40+
env:
41+
TWINE_USERNAME: "__token__"
42+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
43+
run: |
44+
# Build package
45+
python setup.py sdist bdist_wheel
46+
47+
# Publish to PyPI
48+
twine upload dist/*
49+
50+
- name: Build and publish stac-fastapi-opensearch
51+
working-directory: stac_fastapi/opensearch
52+
env:
53+
TWINE_USERNAME: "__token__"
54+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
55+
run: |
56+
# Build package
57+
python setup.py sdist bdist_wheel
58+
59+
# Publish to PyPI
60+
twine upload dist/*
61+
62+
build-and-push-images:
63+
name: Build and Push Docker Images
64+
runs-on: ubuntu-latest
65+
permissions:
66+
contents: read
67+
packages: write
68+
69+
steps:
70+
- name: Checkout repository
71+
uses: actions/checkout@v4
72+
73+
- name: Set up QEMU
74+
uses: docker/setup-qemu-action@v3
75+
76+
- name: Set up Docker Buildx
77+
uses: docker/setup-buildx-action@v3
78+
79+
- name: Log in to GitHub Container Registry
80+
uses: docker/login-action@v3
81+
with:
82+
registry: ghcr.io
83+
username: ${{ github.actor }}
84+
password: ${{ secrets.GITHUB_TOKEN }}
85+
86+
- name: Extract metadata for Elasticsearch image
87+
id: meta-es
88+
uses: docker/metadata-action@v5
89+
with:
90+
images: ghcr.io/${{ github.repository_owner }}/stac-fastapi-es
91+
tags: |
92+
type=raw,value=latest
93+
type=ref,event=tag
94+
95+
- name: Push Elasticsearch image
96+
uses: docker/build-push-action@v6
97+
with:
98+
context: .
99+
file: dockerfiles/Dockerfile.ci.es
100+
platforms: linux/amd64,linux/arm64
101+
push: true
102+
tags: ${{ steps.meta-es.outputs.tags }}
103+
labels: ${{ steps.meta-es.outputs.labels }}
104+
cache-from: type=gha
105+
cache-to: type=gha,mode=max
106+
107+
- name: Extract metadata for OpenSearch image
108+
id: meta-os
109+
uses: docker/metadata-action@v5
110+
with:
111+
images: ghcr.io/${{ github.repository_owner }}/stac-fastapi-os
112+
tags: |
113+
type=raw,value=latest
114+
type=ref,event=tag
115+
116+
- name: Push OpenSearch image
117+
uses: docker/build-push-action@v6
118+
with:
119+
context: .
120+
file: dockerfiles/Dockerfile.ci.os
121+
platforms: linux/amd64,linux/arm64
122+
push: true
123+
tags: ${{ steps.meta-os.outputs.tags }}
124+
labels: ${{ steps.meta-os.outputs.labels }}
125+
cache-from: type=gha
126+
cache-to: type=gha,mode=max

CHANGELOG.md

Lines changed: 86 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,31 +8,90 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
88
## [Unreleased]
99

1010
### Changed
11+
12+
## [v3.2.4] - 2025-03-14
13+
14+
### Added
15+
16+
- Support python 3.13 in SFEOS Core, Opensearch and ElasticSearch. [#330](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/330)
17+
18+
## [v3.2.3] - 2025-02-11
19+
20+
### Changed
21+
22+
- Added note on the use of the default `*` use in route authentication dependecies. [#325](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/325)
23+
- Update item index naming and aliasing to allow capitalisation of collection ids [#329](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/329)
24+
- Bugfixes for the `IsNull` operator and datetime filtering [#330](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/330)
25+
26+
## [v3.2.2] - 2024-12-15
27+
28+
### Changed
29+
30+
- Use base64 encoded JSON string of sort keys as pagination token instead of comma-separated string [#323](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/323)
31+
32+
## [v3.2.1] - 2024-11-14
33+
34+
### Added
35+
36+
- Added `dockerfiles/Dockerfile.ci.os` and `dockerfiles/Dockerfile.ci.es`, along with their respective entrypoints [#311](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/311)
37+
38+
### Changed
39+
40+
- Updated the `publish.yml` workflow to include Docker image publishing to GitHub Container Registry [#311](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/311)
41+
- Improved the README with detailed descriptions of the new Docker images, providing guidance for images. [#311](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/311)
42+
- Aggregation ElasticSearch `total_count` bugfix, moved aggregation text to docs. [#314](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/314)
43+
44+
## [v3.2.0] - 2024-10-09
45+
46+
### Added
47+
48+
- Added `datetime_frequency_interval` parameter for `datetime_frequency` aggregation. [#294](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/294)
49+
- 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)
50+
- Added publish.yml to automatically publish new releases to PyPI [#305](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/305)
51+
52+
### Changed
53+
54+
- Updated CollectionLinks to generate correct `self` link for collections endpoint. [#297](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/297)
55+
- Refactored aggregation in database logic. [#294](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/294)
56+
- Fixed the `self` link for the `/collections/{collection_id}/aggregations` endpoint. [#295](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/295)
57+
58+
## [v3.1.0] - 2024-09-02
59+
60+
### Added
61+
62+
- Added support for FreeTextExtension. [#227](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/227)
63+
64+
### Changed
65+
1166
- 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)
1267

1368
## [v3.0.0] - 2024-08-14
1469

1570
### Changed
71+
1672
- Aggregation bug fixes [#281](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/281)
1773
- Updated stac-fastapi libraries to v3.0.0 [#282](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/282)
1874

1975
## [v3.0.0a3] - 2024-07-17
2076

2177
### Added
22-
- 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)
23-
- 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)
24-
- 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)
25-
- 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)
78+
79+
- 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)
80+
- 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)
81+
- 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)
82+
- 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)
2683

2784
### Changed
85+
2886
- Updated to stac-fastapi 3.0.0a4. [#275](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/275)
2987
- 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)
3088
- 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)
3189

3290
## [v3.0.0a2]
3391

3492
### Added
35-
- Queryables landing page and collection links when the Filter Extension is enabled [#267](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/267)
93+
94+
- Queryables landing page and collection links when the Filter Extension is enabled [#267](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/267)
3695

3796
### Changed
3897

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

70-
### Fixed
129+
### Fixed
71130

72131
- 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)
73132

74133
## [v2.4.1]
75134

76-
### Added
135+
### Added
77136

78137
- 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)
79138

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

98157
## [v2.3.0]
99158

100-
### Changed
159+
### Changed
101160

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

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

194-
195253
## [v0.3.0]
196254

197255
### Added
@@ -208,7 +266,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
208266

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

211-
212269
## [v0.2.0]
213270

214271
### Added
@@ -231,7 +288,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
231288
- When using bulk ingest, items will continue to be ingested if any of them fail. Previously, the call would fail
232289
immediately if any items failed.
233290

234-
235291
## [v0.1.0]
236292

237293
### Changed
@@ -243,17 +299,22 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
243299
- Use genexp in execute_search and get_all_collections to return results.
244300
- Added db_to_stac serializer to item_collection method in core.py.
245301

246-
247-
[Unreleased]: <https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v3.0.0...main>
248-
[v3.0.0]: <https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v2.4.1...v3.0.0>
249-
[v2.4.1]: <https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v2.4.0...v2.4.1>
250-
[v2.4.0]: <https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v2.3.0...v2.4.0>
251-
[v2.3.0]: <https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v2.2.0...v2.3.0>
252-
[v2.2.0]: <https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v2.1.0...v2.2.0>
253-
[v2.1.0]: <https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v2.0.0...v2.1.0>
254-
[v2.0.0]: <https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v1.1.0...v2.0.0>
255-
[v1.1.0]: <https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v1.0.0...v1.1.0>
256-
[v1.0.0]: <https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v0.3.0...v1.0.0>
257-
[v0.3.0]: <https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v0.2.0...v0.3.0>
258-
[v0.2.0]: <https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v0.1.0...v0.2.0>
259-
[v0.1.0]: <https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v0.1.0>
302+
[Unreleased]: https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v3.2.4...main
303+
[v3.2.4]: https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v3.2.3...v3.2.4
304+
[v3.2.3]: https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v3.2.2...v3.2.3
305+
[v3.2.2]: https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v3.2.1...v3.2.2
306+
[v3.2.1]: https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v3.2.0...v3.2.1
307+
[v3.2.0]: https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v3.1.0...v3.2.0
308+
[v3.1.0]: https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v3.0.0...v3.1.0
309+
[v3.0.0]: https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v2.4.1...v3.0.0
310+
[v2.4.1]: https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v2.4.0...v2.4.1
311+
[v2.4.0]: https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v2.3.0...v2.4.0
312+
[v2.3.0]: https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v2.2.0...v2.3.0
313+
[v2.2.0]: https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v2.1.0...v2.2.0
314+
[v2.1.0]: https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v2.0.0...v2.1.0
315+
[v2.0.0]: https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v1.1.0...v2.0.0
316+
[v1.1.0]: https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v1.0.0...v1.1.0
317+
[v1.0.0]: https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v0.3.0...v1.0.0
318+
[v0.3.0]: https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v0.2.0...v0.3.0
319+
[v0.2.0]: https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v0.1.0...v0.2.0
320+
[v0.1.0]: https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v0.1.0

0 commit comments

Comments
 (0)