Skip to content

Commit 0a6b9f1

Browse files
committed
Merge branch main
2 parents 8ed0928 + a1d076a commit 0a6b9f1

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

+1629
-584
lines changed

.github/workflows/cicd.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
- 9202:9202
6666
strategy:
6767
matrix:
68-
python-version: [ "3.8", "3.9", "3.10", "3.11"]
68+
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12"]
6969

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

@@ -78,13 +78,21 @@ jobs:
7878
uses: actions/setup-python@v5
7979
with:
8080
python-version: ${{ matrix.python-version }}
81+
8182
- name: Lint code
82-
uses: pre-commit/[email protected]
83+
if: ${{ matrix.python-version == 3.11 }}
84+
run: |
85+
python -m pip install pre-commit
86+
pre-commit run --all-files
8387
8488
- name: Install pipenv
8589
run: |
8690
python -m pip install --upgrade pipenv wheel
8791
92+
- name: Install core library stac-fastapi
93+
run: |
94+
pip install ./stac_fastapi/core
95+
8896
- name: Install elasticsearch stac-fastapi
8997
run: |
9098
pip install ./stac_fastapi/elasticsearch[dev,server]
@@ -93,16 +101,12 @@ jobs:
93101
run: |
94102
pip install ./stac_fastapi/opensearch[dev,server]
95103
96-
- name: Install core library stac-fastapi
97-
run: |
98-
pip install ./stac_fastapi/core
99-
100104
- name: Run test suite against Elasticsearch 7.x
101105
run: |
102106
pipenv run pytest -svvv
103107
env:
104108
ENVIRONMENT: testing
105-
ES_PORT: 9200
109+
ES_PORT: 9400
106110
ES_HOST: 172.17.0.1
107111
ES_USE_SSL: false
108112
ES_VERIFY_CERTS: false
@@ -113,7 +117,7 @@ jobs:
113117
pipenv run pytest -svvv
114118
env:
115119
ENVIRONMENT: testing
116-
ES_PORT: 9400
120+
ES_PORT: 9200
117121
ES_HOST: 172.17.0.1
118122
ES_USE_SSL: false
119123
ES_VERIFY_CERTS: false
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Publish docs via GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
# Rebuild website when docs have changed or code has changed
9+
- "README.md"
10+
- "docs/**"
11+
- "**.py"
12+
workflow_dispatch:
13+
14+
jobs:
15+
build:
16+
name: Deploy docs
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: Checkout main
21+
uses: actions/checkout@v4
22+
23+
- name: Set up Python 3.8
24+
uses: actions/setup-python@v5
25+
with:
26+
python-version: 3.8
27+
28+
- name: Install dependencies
29+
run: |
30+
python -m pip install --upgrade pip
31+
python -m pip install \
32+
stac_fastapi/core \
33+
stac_fastapi/elasticsearch[docs] \
34+
stac_fastapi/opensearch \
35+
36+
- name: update API docs
37+
run: |
38+
pdocs as_markdown \
39+
--output_dir docs/src/api/ \
40+
--exclude_source \
41+
--overwrite \
42+
stac_fastapi
43+
env:
44+
APP_PORT: 8082
45+
ES_PORT: 9202
46+
47+
- name: Deploy docs
48+
run: mkdocs gh-deploy --force -f docs/mkdocs.yml

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,4 +135,6 @@ dmypy.json
135135
# Virtualenv
136136
venv
137137

138+
/docs/src/api/*
139+
138140
.DS_Store

CHANGELOG.md

Lines changed: 52 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,56 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
99

1010
### Added
1111

12+
- Support for Python 3.12 [#234](https://github.com/stac-utils/stac-fastapi-elasticsearch/pull/234)
13+
- Extended Datetime Search to search on start_datetime and end_datetime as well as datetime fields. [#182](https://github.com/stac-utils/stac-fastapi-elasticsearch/pull/182)
14+
15+
### Changed
16+
17+
- Updated stac-fastapi parent libraries to v3.0.0a0 [#234](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/234)
18+
- Removed pystac dependency [#234](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/234)
19+
20+
### Fixed
21+
22+
- 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)
23+
24+
## [v2.4.1]
25+
26+
### Added
27+
28+
- 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)
29+
30+
### Fixed
31+
32+
- Fixed issue where searches return an empty `links` array [#241](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/241)
33+
34+
## [v2.4.0]
35+
36+
### Added
37+
38+
- Added option to include Basic Auth [#232](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/232)
39+
40+
### Changed
41+
42+
- Upgrade stac-fastapi libaries to v2.5.5 [#237](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/237)
43+
44+
### Fixed
45+
46+
- Fixed `POST /collections/test-collection/items` returning an item with an empty links array [#236](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/236)
47+
48+
## [v2.3.0]
49+
50+
### Changed
51+
52+
- Upgraded stac-fastapi libraries to v2.5.3 from v2.4.9 [#172](https://github.com/stac-utils/stac-fastapi-elasticsearch/pull/172)
53+
54+
## [v2.2.0]
55+
56+
### Added
57+
1258
- use index templates for Collection and Item indices [#208](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/discussions/208)
1359
- Added API `title`, `version`, and `description` parameters from environment variables `STAC_FASTAPI_TITLE`, `STAC_FASTAPI_VERSION` and `STAC_FASTAPI_DESCRIPTION`, respectively. [#207](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/207)
1460
- Added a `STAC_FASTAPI_ROOT_PATH` environment variable to define the root path. Useful when working with an API gateway or load balancer. [#221](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/221)
15-
- Extended Datetime Search to search on start_datetime and end_datetime as well as datetime fields. [#182](https://github.com/stac-utils/stac-fastapi-elasticsearch/pull/182)
61+
- Added mkdocs, pdocs, to generate docs and push to gh pages via workflow. Updated documentation. [#223](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/223)
1662

1763
### Changed
1864

@@ -148,7 +194,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
148194
- Added db_to_stac serializer to item_collection method in core.py.
149195

150196

151-
[Unreleased]: <https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v2.1.0...main>
197+
[Unreleased]: <https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v2.4.1...main>
198+
[v2.4.1]: <https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v2.4.0...v2.4.1>
199+
[v2.4.0]: <https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v2.3.0...v2.4.0>
200+
[v2.3.0]: <https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v2.2.0...v2.3.0>
201+
[v2.2.0]: <https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v2.1.0...v2.2.0>
152202
[v2.1.0]: <https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v2.0.0...v2.1.0>
153203
[v2.0.0]: <https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v1.1.0...v2.0.0>
154204
[v1.1.0]: <https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v1.0.0...v1.1.0>

CONTRIBUTING.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Contributing
2+
3+
Issues and pull requests are more than welcome.
4+
5+
6+
### Development Environment Setup
7+
8+
To install the classes in your local Python env, run:
9+
10+
```shell
11+
pip install -e 'stac_fastapi/elasticsearch[dev]'
12+
```
13+
14+
or
15+
16+
```shell
17+
pip install -e 'stac_fastapi/opensearch[dev]'
18+
```
19+
20+
### Pre-commit
21+
22+
Install [pre-commit](https://pre-commit.com/#install).
23+
24+
Prior to commit, run:
25+
26+
```shell
27+
pre-commit install
28+
pre-commit run --all-files
29+
```
30+
31+
### Testing
32+
33+
```shell
34+
make test
35+
```
36+
Test against OpenSearch only
37+
38+
```shell
39+
make test-opensearch
40+
```
41+
42+
Test against Elasticsearch only
43+
44+
```shell
45+
make test-elasticsearch
46+
```
47+
48+
### Docs
49+
50+
```shell
51+
make docs
52+
```
53+
54+
Hot-reloading docs locally:
55+
56+
```shell
57+
mkdocs serve -f docs/mkdocs.yml
58+
```

Makefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,13 @@ install-es: pybase-install
104104
.PHONY: install-os
105105
install-os: pybase-install
106106
pip install -e ./stac_fastapi/opensearch[dev,server]
107+
108+
.PHONY: docs-image
109+
docs-image:
110+
docker-compose -f docker-compose.docs.yml \
111+
build
112+
113+
.PHONY: docs
114+
docs: docs-image
115+
docker-compose -f docker-compose.docs.yml \
116+
run docs

0 commit comments

Comments
 (0)