Skip to content

Commit 353210d

Browse files
authored
update to v3.2.5 (#350)
1 parent dffba5d commit 353210d

File tree

9 files changed

+34
-16
lines changed

9 files changed

+34
-16
lines changed

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ repos:
1616
# E501 let black handle all line length decisions
1717
# W503 black conflicts with "line break before operator" rule
1818
# E203 black conflicts with "whitespace before ':'" rule
19-
'--ignore=E501,W503,E203,C901' ]
19+
'--ignore=E501,W503,E203,C901,E231' ]
2020
- repo: https://github.com/pre-commit/mirrors-mypy
2121
rev: v0.991
2222
hooks:

CHANGELOG.md

+8-2
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,15 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
88
## [Unreleased]
99

1010
### Added
11-
- Option to configure multiple Elasticsearch/OpenSearch hosts and enable `http_compress`. [#349](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/349)
1211

1312
### Changed
1413

14+
## [v3.2.5] - 2025-04-07
15+
16+
### Added
17+
18+
- Option to configure multiple Elasticsearch/OpenSearch hosts and enable `http_compress`. [#349](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/349)
19+
1520
## [v3.2.4] - 2025-03-14
1621

1722
### Added
@@ -302,7 +307,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
302307
- Use genexp in execute_search and get_all_collections to return results.
303308
- Added db_to_stac serializer to item_collection method in core.py.
304309

305-
[Unreleased]: https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v3.2.4...main
310+
[Unreleased]: https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v3.2.5...main
311+
[v3.2.5]: https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v3.2.4...v3.2.5
306312
[v3.2.4]: https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v3.2.3...v3.2.4
307313
[v3.2.3]: https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v3.2.2...v3.2.3
308314
[v3.2.2]: https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v3.2.1...v3.2.2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
"""library version."""
2-
__version__ = "3.2.4"
2+
__version__ = "3.2.5"

stac_fastapi/elasticsearch/setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
desc = f.read()
77

88
install_requires = [
9-
"stac-fastapi.core==3.2.4",
9+
"stac-fastapi.core==3.2.5",
1010
"elasticsearch[async]==8.11.0",
1111
"elasticsearch-dsl==8.11.0",
1212
"uvicorn",

stac_fastapi/elasticsearch/stac_fastapi/elasticsearch/config.py

+10-4
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,16 @@ def _es_config() -> Dict[str, Any]:
1616
scheme = "https" if use_ssl else "http"
1717

1818
# Configure the hosts parameter with the correct scheme
19-
hosts = [
20-
f"{scheme}://{host.strip()}:{os.getenv('ES_PORT')}"
21-
for host in os.getenv("ES_HOST").split(",")
22-
]
19+
es_hosts = os.getenv(
20+
"ES_HOST", "localhost"
21+
).strip() # Default to localhost if ES_HOST is not set
22+
es_port = os.getenv("ES_PORT", "9200") # Default to 9200 if ES_PORT is not set
23+
24+
# Validate ES_HOST
25+
if not es_hosts:
26+
raise ValueError("ES_HOST environment variable is empty or invalid.")
27+
28+
hosts = [f"{scheme}://{host.strip()}:{es_port}" for host in es_hosts.split(",")]
2329

2430
# Initialize the configuration dictionary
2531
config: Dict[str, Any] = {
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
"""library version."""
2-
__version__ = "3.2.4"
2+
__version__ = "3.2.5"

stac_fastapi/opensearch/setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
desc = f.read()
77

88
install_requires = [
9-
"stac-fastapi.core==3.2.4",
9+
"stac-fastapi.core==3.2.5",
1010
"opensearch-py==2.4.2",
1111
"opensearch-py[async]==2.4.2",
1212
"uvicorn",

stac_fastapi/opensearch/stac_fastapi/opensearch/config.py

+10-4
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,16 @@ def _es_config() -> Dict[str, Any]:
1515
scheme = "https" if use_ssl else "http"
1616

1717
# Configure the hosts parameter with the correct scheme
18-
hosts = [
19-
f"{scheme}://{host.strip()}:{os.getenv('ES_PORT')}"
20-
for host in os.getenv("ES_HOST").split(",")
21-
]
18+
es_hosts = os.getenv(
19+
"ES_HOST", "localhost"
20+
).strip() # Default to localhost if ES_HOST is not set
21+
es_port = os.getenv("ES_PORT", "9200") # Default to 9200 if ES_PORT is not set
22+
23+
# Validate ES_HOST
24+
if not es_hosts:
25+
raise ValueError("ES_HOST environment variable is empty or invalid.")
26+
27+
hosts = [f"{scheme}://{host.strip()}:{es_port}" for host in es_hosts.split(",")]
2228

2329
# Initialize the configuration dictionary
2430
config: Dict[str, Any] = {
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
"""library version."""
2-
__version__ = "3.2.4"
2+
__version__ = "3.2.5"

0 commit comments

Comments
 (0)