From 957e03c08c17eed1af252641c3d4e1065e87c347 Mon Sep 17 00:00:00 2001 From: jonhealy1 Date: Thu, 17 Apr 2025 11:11:35 +0800 Subject: [PATCH 01/20] update setup files for pep 625 --- stac_fastapi/core/setup.py | 5 ++--- stac_fastapi/elasticsearch/setup.py | 7 +++---- stac_fastapi/opensearch/setup.py | 7 +++---- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/stac_fastapi/core/setup.py b/stac_fastapi/core/setup.py index 43b3e911..4301e84b 100644 --- a/stac_fastapi/core/setup.py +++ b/stac_fastapi/core/setup.py @@ -22,16 +22,15 @@ ] setup( - name="stac_fastapi.core", + name="stac_fastapi_core", description="Core library for the Elasticsearch and Opensearch stac-fastapi backends.", long_description=desc, long_description_content_type="text/markdown", - python_requires=">=3.8", + python_requires=">=3.9", classifiers=[ "Intended Audience :: Developers", "Intended Audience :: Information Technology", "Intended Audience :: Science/Research", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", diff --git a/stac_fastapi/elasticsearch/setup.py b/stac_fastapi/elasticsearch/setup.py index 3355dbe3..c5a68f60 100644 --- a/stac_fastapi/elasticsearch/setup.py +++ b/stac_fastapi/elasticsearch/setup.py @@ -6,7 +6,7 @@ desc = f.read() install_requires = [ - "stac-fastapi.core==4.0.0a0", + "stac_fastapi_core==4.0.0a0", "elasticsearch[async]==8.11.0", "elasticsearch-dsl==8.11.0", "uvicorn", @@ -28,16 +28,15 @@ } setup( - name="stac_fastapi.elasticsearch", + name="stac_fastapi_elasticsearch", description="An implementation of STAC API based on the FastAPI framework with both Elasticsearch and Opensearch.", long_description=desc, long_description_content_type="text/markdown", - python_requires=">=3.8", + python_requires=">=3.9", classifiers=[ "Intended Audience :: Developers", "Intended Audience :: Information Technology", "Intended Audience :: Science/Research", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", diff --git a/stac_fastapi/opensearch/setup.py b/stac_fastapi/opensearch/setup.py index 8cae5dce..3e532fb7 100644 --- a/stac_fastapi/opensearch/setup.py +++ b/stac_fastapi/opensearch/setup.py @@ -6,7 +6,7 @@ desc = f.read() install_requires = [ - "stac-fastapi.core==4.0.0a0", + "stac_fastapi_core==4.0.0a0", "opensearch-py==2.4.2", "opensearch-py[async]==2.4.2", "uvicorn", @@ -28,16 +28,15 @@ } setup( - name="stac_fastapi.opensearch", + name="stac_fastapi_opensearch", description="Opensearch stac-fastapi backend.", long_description=desc, long_description_content_type="text/markdown", - python_requires=">=3.8", + python_requires=">=3.9", classifiers=[ "Intended Audience :: Developers", "Intended Audience :: Information Technology", "Intended Audience :: Science/Research", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", From 85b6acda8d64ac68bfe49fdc0987a51f1639b71a Mon Sep 17 00:00:00 2001 From: jonhealy1 Date: Thu, 17 Apr 2025 11:12:13 +0800 Subject: [PATCH 02/20] update readme --- README.md | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 84c38d12..bf0ccf3e 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@

- [![PyPI version](https://badge.fury.io/py/stac-fastapi.elasticsearch.svg)](https://badge.fury.io/py/stac-fastapi.elasticsearch) + [![PyPI version](https://badge.fury.io/py/stac-fastapi-elasticsearch.svg)](https://badge.fury.io/py/stac-fastapi-elasticsearch) [![PyPI version](https://badge.fury.io/py/stac-fastapi-opensearch.svg)](https://badge.fury.io/py/stac-fastapi-opensearch) [![Join the chat at https://gitter.im/stac-fastapi-elasticsearch/community](https://badges.gitter.im/stac-fastapi-elasticsearch/community.svg)](https://gitter.im/stac-fastapi-elasticsearch/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) @@ -35,14 +35,20 @@ ### To install from PyPI: -```shell -pip install stac_fastapi.elasticsearch -``` -or -``` -pip install stac_fastapi.opensearch +```bash +# For versions 4.0.0a1 and newer (PEP 625 compliant naming): +pip install stac_fastapi_elasticsearch # Elasticsearch backend +pip install stac_fastapi_opensearch # Opensearch backend +pip install stac_fastapi_core # Core library + +# For versions 4.0.0a0 and older: +pip install stac-fastapi.elasticsearch # Elasticsearch backend +pip install stac-fastapi.opensearch # Opensearch backend +pip install stac-fastapi.core # Core library ``` +> **Important Note:** Starting with version 4.0.0a1, package names have changed from using periods (e.g., `stac-fastapi.core`) to using underscores (e.g., `stac_fastapi_core`) to comply with PEP 625. Please update your requirements files accordingly. + ### To install and run via pre-built Docker Images We provide ready-to-use Docker images through GitHub Container Registry ([ElasticSearch](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pkgs/container/stac-fastapi-es) and [OpenSearch](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pkgs/container/stac-fastapi-os) backends). You can easily pull and run these images: From 69623267044cdb0d3924ac84f93c52fd014c6311 Mon Sep 17 00:00:00 2001 From: jonhealy1 Date: Thu, 17 Apr 2025 11:12:55 +0800 Subject: [PATCH 03/20] changelog --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ef0188bc..f76e0769 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Added ### Changed +- Updated package names in setup.py files to use underscores instead of periods for PEP 625 compliance + - Changed `stac_fastapi.opensearch` to `stac_fastapi_opensearch` + - Changed `stac_fastapi.elasticsearch` to `stac_fastapi_elasticsearch` + - Changed `stac_fastapi.core` to `stac_fastapi_core` + - Updated all related dependencies to use the new naming convention ### Fixed From db0e5698530af1af434664c8d99eed026264290b Mon Sep 17 00:00:00 2001 From: jonhealy1 Date: Thu, 17 Apr 2025 11:30:21 +0800 Subject: [PATCH 04/20] more setup changes --- stac_fastapi/core/setup.cfg | 2 +- stac_fastapi/elasticsearch/setup.cfg | 2 +- stac_fastapi/elasticsearch/setup.py | 2 +- stac_fastapi/opensearch/setup.cfg | 2 +- stac_fastapi/opensearch/setup.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/stac_fastapi/core/setup.cfg b/stac_fastapi/core/setup.cfg index 1eb3fa49..0e0b1290 100644 --- a/stac_fastapi/core/setup.cfg +++ b/stac_fastapi/core/setup.cfg @@ -1,2 +1,2 @@ [metadata] -version = attr: stac_fastapi.core.version.__version__ +version = attr: stac_fastapi_core.version.__version__ diff --git a/stac_fastapi/elasticsearch/setup.cfg b/stac_fastapi/elasticsearch/setup.cfg index 7a42432c..61a698f4 100644 --- a/stac_fastapi/elasticsearch/setup.cfg +++ b/stac_fastapi/elasticsearch/setup.cfg @@ -1,2 +1,2 @@ [metadata] -version = attr: stac_fastapi.elasticsearch.version.__version__ +version = attr: stac_fastapi_elasticsearch.version.__version__ diff --git a/stac_fastapi/elasticsearch/setup.py b/stac_fastapi/elasticsearch/setup.py index c5a68f60..66b2b05d 100644 --- a/stac_fastapi/elasticsearch/setup.py +++ b/stac_fastapi/elasticsearch/setup.py @@ -53,7 +53,7 @@ extras_require=extra_reqs, entry_points={ "console_scripts": [ - "stac-fastapi-elasticsearch=stac_fastapi.elasticsearch.app:run" + "stac-fastapi-elasticsearch=stac_fastapi_elasticsearch.app:run" ] }, ) diff --git a/stac_fastapi/opensearch/setup.cfg b/stac_fastapi/opensearch/setup.cfg index 9f0be4b7..cdf0184a 100644 --- a/stac_fastapi/opensearch/setup.cfg +++ b/stac_fastapi/opensearch/setup.cfg @@ -1,2 +1,2 @@ [metadata] -version = attr: stac_fastapi.opensearch.version.__version__ +version = attr: stac_fastapi_opensearch.version.__version__ diff --git a/stac_fastapi/opensearch/setup.py b/stac_fastapi/opensearch/setup.py index 3e532fb7..82ab078e 100644 --- a/stac_fastapi/opensearch/setup.py +++ b/stac_fastapi/opensearch/setup.py @@ -51,6 +51,6 @@ install_requires=install_requires, extras_require=extra_reqs, entry_points={ - "console_scripts": ["stac-fastapi-opensearch=stac_fastapi.opensearch.app:run"] + "console_scripts": ["stac-fastapi-opensearch=stac_fastapi_opensearch.app:run"] }, ) From ff3a5227aaf60e8126b85287b07315f5efe48bcc Mon Sep 17 00:00:00 2001 From: jonhealy1 Date: Thu, 17 Apr 2025 11:30:48 +0800 Subject: [PATCH 05/20] rename compose files --- docker-compose.docs.yml => compose.docs.yml | 0 docker-compose.yml => compose.yml | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename docker-compose.docs.yml => compose.docs.yml (100%) rename docker-compose.yml => compose.yml (100%) diff --git a/docker-compose.docs.yml b/compose.docs.yml similarity index 100% rename from docker-compose.docs.yml rename to compose.docs.yml diff --git a/docker-compose.yml b/compose.yml similarity index 100% rename from docker-compose.yml rename to compose.yml From d2af92353029ac4987e721a8de9d78416a8f5219 Mon Sep 17 00:00:00 2001 From: jonhealy1 Date: Thu, 17 Apr 2025 11:30:59 +0800 Subject: [PATCH 06/20] update makefile --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index e965d785..a16fe6d9 100644 --- a/Makefile +++ b/Makefile @@ -107,10 +107,10 @@ install-os: pybase-install .PHONY: docs-image docs-image: - docker compose -f docker compose.docs.yml \ + docker compose -f compose.docs.yml \ build .PHONY: docs docs: docs-image - docker compose -f docker compose.docs.yml \ + docker compose -f compose.docs.yml \ run docs \ No newline at end of file From c2f8df52675f53a163f364a24f8db81db1d97978 Mon Sep 17 00:00:00 2001 From: jonhealy1 Date: Thu, 17 Apr 2025 11:40:36 +0800 Subject: [PATCH 07/20] update readme --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index bf0ccf3e..09b85173 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ - Our Api core library can be used to create custom backends. See [stac-fastapi-mongo](https://github.com/Healy-Hyperspatial/stac-fastapi-mongo) for a working example. - Reach out on our [Gitter](https://app.gitter.im/#/room/#stac-fastapi-elasticsearch_community:gitter.im) channel or feel free to add to our [Discussions](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/discussions) page here on github. -- There is [Postman](https://documenter.getpostman.com/view/12888943/2s8ZDSdRHA) documentation here for examples on how to run some of the API routes locally - after starting the elasticsearch backend via the docker-compose.yml file. +- There is [Postman](https://documenter.getpostman.com/view/12888943/2s8ZDSdRHA) documentation here for examples on how to run some of the API routes locally - after starting the elasticsearch backend via the compose.yml file. - The `/examples` folder shows an example of running stac-fastapi-elasticsearch from PyPI in docker without needing any code from the repository. There is also a Postman collection here that you can load into Postman for testing the API routes. - For changes, see the [Changelog](CHANGELOG.md) @@ -63,15 +63,15 @@ docker pull ghcr.io/stac-utils/stac-fastapi-os:latest ## Run Elasticsearch API backend on localhost:8080 -You need to ensure [**Docker Compose**](https://docs.docker.com/compose/install/) or [**Podman Compose**](https://podman-desktop.io/docs/compose) installed and running on your machine. In the follwoing command instead of `docker-compose` you can use `podman-compose` as well. +You need to ensure [**Docker Compose**](https://docs.docker.com/compose/install/) or [**Podman Compose**](https://podman-desktop.io/docs/compose) installed and running on your machine. In the following command instead of `docker compose` you can use `podman-compose` as well. ```shell -docker-compose up elasticsearch app-elasticsearch +docker compose up elasticsearch app-elasticsearch ``` -By default, docker-compose uses Elasticsearch 8.x and OpenSearch 2.11.1. +By default, Docker Compose uses Elasticsearch 8.x and OpenSearch 2.11.1. If you wish to use a different version, put the following in a -file named `.env` in the same directory you run docker-compose from: +file named `.env` in the same directory you run Docker Compose from: ```shell ELASTICSEARCH_VERSION=7.17.1 @@ -171,7 +171,7 @@ These templates will be used implicitly when creating new Collection and Item in This section covers how to create a snapshot repository and then create and restore snapshots with this. Create a snapshot repository. This puts the files in the `elasticsearch/snapshots` in this git repo clone, as -the elasticsearch.yml and docker-compose files create a mapping from that directory to +the elasticsearch.yml and compose files create a mapping from that directory to `/usr/share/elasticsearch/snapshots` within the Elasticsearch container and grant permissions on using it. ```shell From 1ceadf9594fc54df3efa25e0e187af1e7957f60a Mon Sep 17 00:00:00 2001 From: jonhealy1 Date: Thu, 17 Apr 2025 11:41:55 +0800 Subject: [PATCH 08/20] docker-compose to compose --- .../{docker-compose.basic_auth.yml => compose.basic_auth.yml} | 0 examples/auth/{docker-compose.oauth2.yml => compose.oauth2.yml} | 0 ...pose.route_dependencies.yml => compose.route_dependencies.yml} | 0 examples/pip_docker/{docker-compose.yml => compose.yml} | 0 .../{docker-compose.rate_limit.yml => compose.rate_limit.yml} | 0 5 files changed, 0 insertions(+), 0 deletions(-) rename examples/auth/{docker-compose.basic_auth.yml => compose.basic_auth.yml} (100%) rename examples/auth/{docker-compose.oauth2.yml => compose.oauth2.yml} (100%) rename examples/auth/{docker-compose.route_dependencies.yml => compose.route_dependencies.yml} (100%) rename examples/pip_docker/{docker-compose.yml => compose.yml} (100%) rename examples/rate_limit/{docker-compose.rate_limit.yml => compose.rate_limit.yml} (100%) diff --git a/examples/auth/docker-compose.basic_auth.yml b/examples/auth/compose.basic_auth.yml similarity index 100% rename from examples/auth/docker-compose.basic_auth.yml rename to examples/auth/compose.basic_auth.yml diff --git a/examples/auth/docker-compose.oauth2.yml b/examples/auth/compose.oauth2.yml similarity index 100% rename from examples/auth/docker-compose.oauth2.yml rename to examples/auth/compose.oauth2.yml diff --git a/examples/auth/docker-compose.route_dependencies.yml b/examples/auth/compose.route_dependencies.yml similarity index 100% rename from examples/auth/docker-compose.route_dependencies.yml rename to examples/auth/compose.route_dependencies.yml diff --git a/examples/pip_docker/docker-compose.yml b/examples/pip_docker/compose.yml similarity index 100% rename from examples/pip_docker/docker-compose.yml rename to examples/pip_docker/compose.yml diff --git a/examples/rate_limit/docker-compose.rate_limit.yml b/examples/rate_limit/compose.rate_limit.yml similarity index 100% rename from examples/rate_limit/docker-compose.rate_limit.yml rename to examples/rate_limit/compose.rate_limit.yml From 8bbbdca718fd83aa8b04e86dc08b064b692337e5 Mon Sep 17 00:00:00 2001 From: jonhealy1 Date: Thu, 17 Apr 2025 11:57:35 +0800 Subject: [PATCH 09/20] v4.0.0a1 --- CHANGELOG.md | 17 ++++++++++++----- stac_fastapi/core/stac_fastapi/core/version.py | 2 +- stac_fastapi/elasticsearch/setup.py | 2 +- .../stac_fastapi/elasticsearch/version.py | 2 +- stac_fastapi/opensearch/setup.py | 2 +- .../stac_fastapi/opensearch/version.py | 2 +- 6 files changed, 17 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f76e0769..84ebe418 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,15 +10,21 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Added ### Changed -- Updated package names in setup.py files to use underscores instead of periods for PEP 625 compliance + +### Fixed + +## [v4.0.0a1] - 2925-04-17 + +### Changed +- Updated package names in setup.py files to use underscores instead of periods for PEP 625 compliance [#358](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/358) - Changed `stac_fastapi.opensearch` to `stac_fastapi_opensearch` - Changed `stac_fastapi.elasticsearch` to `stac_fastapi_elasticsearch` - Changed `stac_fastapi.core` to `stac_fastapi_core` - Updated all related dependencies to use the new naming convention +- Renamed `docker-compose.yml` to `compose.yml` to align with Docker Compose V2 conventions [#358](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/358) +- Bumped version from 4.0.0a0 to 4.0.0a1 for the PEP 625 compliant release [#358](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/358) -### Fixed - -## [v4.0.0a0] - 2025-04-17 +## [v4.0.0a0] - 2025-04-16 ### Added - Added support for dynamically-generated queryables based on Elasticsearch/OpenSearch mappings, with extensible metadata augmentation [#351](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/351) @@ -333,7 +339,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Use genexp in execute_search and get_all_collections to return results. - Added db_to_stac serializer to item_collection method in core.py. -[Unreleased]: https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v4.0.0a0...main +[Unreleased]: https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v4.0.0a1...main +[v4.0.0a1]: https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v4.0.0a0...v4.0.0a1 [v4.0.0a0]: https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v3.2.5...v4.0.0a0 [v3.2.5]: https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v3.2.4...v3.2.5 [v3.2.4]: https://github.com/stac-utils/stac-fastapi-elasticsearch/tree/v3.2.3...v3.2.4 diff --git a/stac_fastapi/core/stac_fastapi/core/version.py b/stac_fastapi/core/stac_fastapi/core/version.py index 3488c82b..af49b95b 100644 --- a/stac_fastapi/core/stac_fastapi/core/version.py +++ b/stac_fastapi/core/stac_fastapi/core/version.py @@ -1,2 +1,2 @@ """library version.""" -__version__ = "4.0.0a0" +__version__ = "4.0.0a1" diff --git a/stac_fastapi/elasticsearch/setup.py b/stac_fastapi/elasticsearch/setup.py index 66b2b05d..982beed4 100644 --- a/stac_fastapi/elasticsearch/setup.py +++ b/stac_fastapi/elasticsearch/setup.py @@ -6,7 +6,7 @@ desc = f.read() install_requires = [ - "stac_fastapi_core==4.0.0a0", + "stac_fastapi_core==4.0.0a1", "elasticsearch[async]==8.11.0", "elasticsearch-dsl==8.11.0", "uvicorn", diff --git a/stac_fastapi/elasticsearch/stac_fastapi/elasticsearch/version.py b/stac_fastapi/elasticsearch/stac_fastapi/elasticsearch/version.py index 3488c82b..af49b95b 100644 --- a/stac_fastapi/elasticsearch/stac_fastapi/elasticsearch/version.py +++ b/stac_fastapi/elasticsearch/stac_fastapi/elasticsearch/version.py @@ -1,2 +1,2 @@ """library version.""" -__version__ = "4.0.0a0" +__version__ = "4.0.0a1" diff --git a/stac_fastapi/opensearch/setup.py b/stac_fastapi/opensearch/setup.py index 82ab078e..7aab421a 100644 --- a/stac_fastapi/opensearch/setup.py +++ b/stac_fastapi/opensearch/setup.py @@ -6,7 +6,7 @@ desc = f.read() install_requires = [ - "stac_fastapi_core==4.0.0a0", + "stac_fastapi_core==4.0.0a1", "opensearch-py==2.4.2", "opensearch-py[async]==2.4.2", "uvicorn", diff --git a/stac_fastapi/opensearch/stac_fastapi/opensearch/version.py b/stac_fastapi/opensearch/stac_fastapi/opensearch/version.py index 3488c82b..af49b95b 100644 --- a/stac_fastapi/opensearch/stac_fastapi/opensearch/version.py +++ b/stac_fastapi/opensearch/stac_fastapi/opensearch/version.py @@ -1,2 +1,2 @@ """library version.""" -__version__ = "4.0.0a0" +__version__ = "4.0.0a1" From 899ea864f9982731d88e5ac568bfb3a892dd873e Mon Sep 17 00:00:00 2001 From: jonhealy1 Date: Thu, 17 Apr 2025 12:04:17 +0800 Subject: [PATCH 10/20] module path --- stac_fastapi/core/setup.cfg | 2 +- stac_fastapi/elasticsearch/setup.cfg | 2 +- stac_fastapi/elasticsearch/setup.py | 2 +- stac_fastapi/opensearch/setup.cfg | 2 +- stac_fastapi/opensearch/setup.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/stac_fastapi/core/setup.cfg b/stac_fastapi/core/setup.cfg index 0e0b1290..1eb3fa49 100644 --- a/stac_fastapi/core/setup.cfg +++ b/stac_fastapi/core/setup.cfg @@ -1,2 +1,2 @@ [metadata] -version = attr: stac_fastapi_core.version.__version__ +version = attr: stac_fastapi.core.version.__version__ diff --git a/stac_fastapi/elasticsearch/setup.cfg b/stac_fastapi/elasticsearch/setup.cfg index 61a698f4..7a42432c 100644 --- a/stac_fastapi/elasticsearch/setup.cfg +++ b/stac_fastapi/elasticsearch/setup.cfg @@ -1,2 +1,2 @@ [metadata] -version = attr: stac_fastapi_elasticsearch.version.__version__ +version = attr: stac_fastapi.elasticsearch.version.__version__ diff --git a/stac_fastapi/elasticsearch/setup.py b/stac_fastapi/elasticsearch/setup.py index 982beed4..df6dac46 100644 --- a/stac_fastapi/elasticsearch/setup.py +++ b/stac_fastapi/elasticsearch/setup.py @@ -53,7 +53,7 @@ extras_require=extra_reqs, entry_points={ "console_scripts": [ - "stac-fastapi-elasticsearch=stac_fastapi_elasticsearch.app:run" + "stac-fastapi-elasticsearch=stac_fastapi.elasticsearch.app:run" ] }, ) diff --git a/stac_fastapi/opensearch/setup.cfg b/stac_fastapi/opensearch/setup.cfg index cdf0184a..9f0be4b7 100644 --- a/stac_fastapi/opensearch/setup.cfg +++ b/stac_fastapi/opensearch/setup.cfg @@ -1,2 +1,2 @@ [metadata] -version = attr: stac_fastapi_opensearch.version.__version__ +version = attr: stac_fastapi.opensearch.version.__version__ diff --git a/stac_fastapi/opensearch/setup.py b/stac_fastapi/opensearch/setup.py index 7aab421a..757f7cfb 100644 --- a/stac_fastapi/opensearch/setup.py +++ b/stac_fastapi/opensearch/setup.py @@ -51,6 +51,6 @@ install_requires=install_requires, extras_require=extra_reqs, entry_points={ - "console_scripts": ["stac-fastapi-opensearch=stac_fastapi_opensearch.app:run"] + "console_scripts": ["stac-fastapi-opensearch=stac_fastapi.opensearch.app:run"] }, ) From a6d1722f320c25f7572a8417792bb00aa93626e6 Mon Sep 17 00:00:00 2001 From: jonhealy1 Date: Thu, 17 Apr 2025 12:19:35 +0800 Subject: [PATCH 11/20] remove 'version' from compose files --- CHANGELOG.md | 1 + compose.docs.yml | 2 -- examples/auth/compose.basic_auth.yml | 2 -- examples/auth/compose.oauth2.yml | 2 -- examples/auth/compose.route_dependencies.yml | 2 -- examples/pip_docker/compose.yml | 2 -- examples/rate_limit/compose.rate_limit.yml | 2 -- 7 files changed, 1 insertion(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 84ebe418..af2cb5fb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Changed `stac_fastapi.core` to `stac_fastapi_core` - Updated all related dependencies to use the new naming convention - Renamed `docker-compose.yml` to `compose.yml` to align with Docker Compose V2 conventions [#358](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/358) +- Removed deprecated `version` field from all compose files [#358](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/358) - Bumped version from 4.0.0a0 to 4.0.0a1 for the PEP 625 compliant release [#358](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/358) ## [v4.0.0a0] - 2025-04-16 diff --git a/compose.docs.yml b/compose.docs.yml index 4d91a06b..49573fbf 100644 --- a/compose.docs.yml +++ b/compose.docs.yml @@ -1,5 +1,3 @@ -version: '3' - services: docs: container_name: stac-fastapi-docs-dev diff --git a/examples/auth/compose.basic_auth.yml b/examples/auth/compose.basic_auth.yml index a6292a1f..00ff7313 100644 --- a/examples/auth/compose.basic_auth.yml +++ b/examples/auth/compose.basic_auth.yml @@ -1,5 +1,3 @@ -version: '3.9' - services: app-elasticsearch: container_name: stac-fastapi-es diff --git a/examples/auth/compose.oauth2.yml b/examples/auth/compose.oauth2.yml index 8cd8f72f..2c18a488 100644 --- a/examples/auth/compose.oauth2.yml +++ b/examples/auth/compose.oauth2.yml @@ -1,5 +1,3 @@ -version: '3.9' - services: app-elasticsearch: container_name: stac-fastapi-es diff --git a/examples/auth/compose.route_dependencies.yml b/examples/auth/compose.route_dependencies.yml index b10fbb6f..8689927f 100644 --- a/examples/auth/compose.route_dependencies.yml +++ b/examples/auth/compose.route_dependencies.yml @@ -1,5 +1,3 @@ -version: '3.9' - services: app-elasticsearch: container_name: stac-fastapi-es diff --git a/examples/pip_docker/compose.yml b/examples/pip_docker/compose.yml index 3b2e6926..c9b3d641 100644 --- a/examples/pip_docker/compose.yml +++ b/examples/pip_docker/compose.yml @@ -1,5 +1,3 @@ -version: '3' - services: app-elasticsearch: container_name: stac-fastapi-es diff --git a/examples/rate_limit/compose.rate_limit.yml b/examples/rate_limit/compose.rate_limit.yml index 5416e139..3df27c34 100644 --- a/examples/rate_limit/compose.rate_limit.yml +++ b/examples/rate_limit/compose.rate_limit.yml @@ -1,5 +1,3 @@ -version: '3.9' - services: app-elasticsearch: container_name: stac-fastapi-es From 05af30b41f0520859d4288a4020a7486b7eb6ceb Mon Sep 17 00:00:00 2001 From: jonhealy1 Date: Thu, 17 Apr 2025 12:28:18 +0800 Subject: [PATCH 12/20] update version compose envs --- CHANGELOG.md | 1 + compose.yml | 4 ++-- examples/auth/compose.basic_auth.yml | 4 ++-- examples/auth/compose.oauth2.yml | 4 ++-- examples/auth/compose.route_dependencies.yml | 4 ++-- examples/rate_limit/compose.rate_limit.yml | 4 ++-- 6 files changed, 11 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index af2cb5fb..1566d822 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Updated all related dependencies to use the new naming convention - Renamed `docker-compose.yml` to `compose.yml` to align with Docker Compose V2 conventions [#358](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/358) - Removed deprecated `version` field from all compose files [#358](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/358) +- Updated `STAC_FASTAPI_VERSION` environment variables to 4.0.0a1 in all compose files [#358](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/358) - Bumped version from 4.0.0a0 to 4.0.0a1 for the PEP 625 compliant release [#358](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/358) ## [v4.0.0a0] - 2025-04-16 diff --git a/compose.yml b/compose.yml index 8ec0701b..a66e584f 100644 --- a/compose.yml +++ b/compose.yml @@ -9,7 +9,7 @@ services: environment: - STAC_FASTAPI_TITLE=stac-fastapi-elasticsearch - STAC_FASTAPI_DESCRIPTION=A STAC FastAPI with an Elasticsearch backend - - STAC_FASTAPI_VERSION=2.1 + - STAC_FASTAPI_VERSION=4.0.0a1 - APP_HOST=0.0.0.0 - APP_PORT=8080 - RELOAD=true @@ -41,7 +41,7 @@ services: environment: - STAC_FASTAPI_TITLE=stac-fastapi-opensearch - STAC_FASTAPI_DESCRIPTION=A STAC FastAPI with an Opensearch backend - - STAC_FASTAPI_VERSION=3.0.0a2 + - STAC_FASTAPI_VERSION=4.0.0a1 - APP_HOST=0.0.0.0 - APP_PORT=8082 - RELOAD=true diff --git a/examples/auth/compose.basic_auth.yml b/examples/auth/compose.basic_auth.yml index 00ff7313..c3e069ec 100644 --- a/examples/auth/compose.basic_auth.yml +++ b/examples/auth/compose.basic_auth.yml @@ -9,7 +9,7 @@ services: environment: - STAC_FASTAPI_TITLE=stac-fastapi-elasticsearch - STAC_FASTAPI_DESCRIPTION=A STAC FastAPI with an Elasticsearch backend - - STAC_FASTAPI_VERSION=3.0.0a2 + - STAC_FASTAPI_VERSION=4.0.0a1 - APP_HOST=0.0.0.0 - APP_PORT=8080 - RELOAD=true @@ -42,7 +42,7 @@ services: environment: - STAC_FASTAPI_TITLE=stac-fastapi-opensearch - STAC_FASTAPI_DESCRIPTION=A STAC FastAPI with an Opensearch backend - - STAC_FASTAPI_VERSION=2.1 + - STAC_FASTAPI_VERSION=4.0.0a1 - APP_HOST=0.0.0.0 - APP_PORT=8082 - RELOAD=true diff --git a/examples/auth/compose.oauth2.yml b/examples/auth/compose.oauth2.yml index 2c18a488..ccd3bb1f 100644 --- a/examples/auth/compose.oauth2.yml +++ b/examples/auth/compose.oauth2.yml @@ -9,7 +9,7 @@ services: environment: - STAC_FASTAPI_TITLE=stac-fastapi-elasticsearch - STAC_FASTAPI_DESCRIPTION=A STAC FastAPI with an Elasticsearch backend - - STAC_FASTAPI_VERSION=3.0.0a1 + - STAC_FASTAPI_VERSION=4.0.0a1 - APP_HOST=0.0.0.0 - APP_PORT=8080 - RELOAD=true @@ -43,7 +43,7 @@ services: environment: - STAC_FASTAPI_TITLE=stac-fastapi-opensearch - STAC_FASTAPI_DESCRIPTION=A STAC FastAPI with an Opensearch backend - - STAC_FASTAPI_VERSION=2.1 + - STAC_FASTAPI_VERSION=4.0.0a1 - APP_HOST=0.0.0.0 - APP_PORT=8082 - RELOAD=true diff --git a/examples/auth/compose.route_dependencies.yml b/examples/auth/compose.route_dependencies.yml index 8689927f..0516fccd 100644 --- a/examples/auth/compose.route_dependencies.yml +++ b/examples/auth/compose.route_dependencies.yml @@ -9,7 +9,7 @@ services: environment: - STAC_FASTAPI_TITLE=stac-fastapi-elasticsearch - STAC_FASTAPI_DESCRIPTION=A STAC FastAPI with an Elasticsearch backend - - STAC_FASTAPI_VERSION=3.0.0a2 + - STAC_FASTAPI_VERSION=4.0.0a1 - APP_HOST=0.0.0.0 - APP_PORT=8080 - RELOAD=true @@ -42,7 +42,7 @@ services: environment: - STAC_FASTAPI_TITLE=stac-fastapi-opensearch - STAC_FASTAPI_DESCRIPTION=A STAC FastAPI with an Opensearch backend - - STAC_FASTAPI_VERSION=2.1 + - STAC_FASTAPI_VERSION=4.0.0a1 - APP_HOST=0.0.0.0 - APP_PORT=8082 - RELOAD=true diff --git a/examples/rate_limit/compose.rate_limit.yml b/examples/rate_limit/compose.rate_limit.yml index 3df27c34..3fa902ab 100644 --- a/examples/rate_limit/compose.rate_limit.yml +++ b/examples/rate_limit/compose.rate_limit.yml @@ -9,7 +9,7 @@ services: environment: - STAC_FASTAPI_TITLE=stac-fastapi-elasticsearch - STAC_FASTAPI_DESCRIPTION=A STAC FastAPI with an Elasticsearch backend - - STAC_FASTAPI_VERSION=2.1 + - STAC_FASTAPI_VERSION=4.0.0a1 - APP_HOST=0.0.0.0 - APP_PORT=8080 - RELOAD=true @@ -42,7 +42,7 @@ services: environment: - STAC_FASTAPI_TITLE=stac-fastapi-opensearch - STAC_FASTAPI_DESCRIPTION=A STAC FastAPI with an Opensearch backend - - STAC_FASTAPI_VERSION=3.0.0a2 + - STAC_FASTAPI_VERSION=4.0.0a1 - APP_HOST=0.0.0.0 - APP_PORT=8082 - RELOAD=true From d798f176f3334498450db681696bdadfad8bb78b Mon Sep 17 00:00:00 2001 From: jonhealy1 Date: Thu, 17 Apr 2025 13:43:23 +0800 Subject: [PATCH 13/20] update dependecies --- CHANGELOG.md | 1 + stac_fastapi/core/setup.py | 18 +++++++++--------- stac_fastapi/elasticsearch/setup.py | 26 +++++++++++++------------- stac_fastapi/opensearch/setup.py | 26 +++++++++++++------------- 4 files changed, 36 insertions(+), 35 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1566d822..0e217732 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Removed deprecated `version` field from all compose files [#358](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/358) - Updated `STAC_FASTAPI_VERSION` environment variables to 4.0.0a1 in all compose files [#358](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/358) - Bumped version from 4.0.0a0 to 4.0.0a1 for the PEP 625 compliant release [#358](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/358) +- Updated dependency requirements to use compatible release specifiers (~=) for more controlled updates while allowing for bug fixes and security patches [#358](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/issues/358) ## [v4.0.0a0] - 2025-04-16 diff --git a/stac_fastapi/core/setup.py b/stac_fastapi/core/setup.py index 4301e84b..db87f9c4 100644 --- a/stac_fastapi/core/setup.py +++ b/stac_fastapi/core/setup.py @@ -6,19 +6,19 @@ desc = f.read() install_requires = [ - "fastapi", + "fastapi~=0.109.0", "attrs>=23.2.0", - "pydantic", - "stac_pydantic==3.1.*", + "pydantic~=2.0.0", + "stac_pydantic~=3.1.0", "stac-fastapi.api==5.1.1", "stac-fastapi.extensions==5.1.1", "stac-fastapi.types==5.1.1", - "orjson", - "overrides", - "geojson-pydantic", - "pygeofilter==0.3.1", - "jsonschema", - "slowapi==0.1.9", + "orjson~=3.9.0", + "overrides~=7.4.0", + "geojson-pydantic~=0.5.0", + "pygeofilter~=0.3.1", + "jsonschema~=4.0.0", + "slowapi~=0.1.9", ] setup( diff --git a/stac_fastapi/elasticsearch/setup.py b/stac_fastapi/elasticsearch/setup.py index df6dac46..ae6c1976 100644 --- a/stac_fastapi/elasticsearch/setup.py +++ b/stac_fastapi/elasticsearch/setup.py @@ -7,24 +7,24 @@ install_requires = [ "stac_fastapi_core==4.0.0a1", - "elasticsearch[async]==8.11.0", - "elasticsearch-dsl==8.11.0", - "uvicorn", - "starlette", + "elasticsearch[async]~=9.0.0", + "elasticsearch-dsl~=8.18.0", + "uvicorn~=0.23.0", + "starlette~=0.27.0", ] extra_reqs = { "dev": [ - "pytest", - "pytest-cov", - "pytest-asyncio", - "pre-commit", - "requests", - "ciso8601", - "httpx<=0.27.2", + "pytest~=7.0.0", + "pytest-cov~=4.0.0", + "pytest-asyncio~=0.21.0", + "pre-commit~=3.0.0", + "requests~=2.28.0", + "ciso8601~=2.3.0", + "httpx>=0.24.0,<0.28.0", ], - "docs": ["mkdocs", "mkdocs-material", "pdocs"], - "server": ["uvicorn[standard]==0.19.0"], + "docs": ["mkdocs~=1.4.0", "mkdocs-material~=9.0.0", "pdocs~=1.2.0"], + "server": ["uvicorn[standard]~=0.19.0"], } setup( diff --git a/stac_fastapi/opensearch/setup.py b/stac_fastapi/opensearch/setup.py index 757f7cfb..aa6213e0 100644 --- a/stac_fastapi/opensearch/setup.py +++ b/stac_fastapi/opensearch/setup.py @@ -7,24 +7,24 @@ install_requires = [ "stac_fastapi_core==4.0.0a1", - "opensearch-py==2.4.2", - "opensearch-py[async]==2.4.2", - "uvicorn", - "starlette", + "opensearch-py~=2.8.0", + "opensearch-py[async]~=2.8.0", + "uvicorn~=0.23.0", + "starlette~=0.27.0", ] extra_reqs = { "dev": [ - "pytest", - "pytest-cov", - "pytest-asyncio", - "pre-commit", - "requests", - "ciso8601", - "httpx<=0.27.2", + "pytest~=7.0.0", + "pytest-cov~=4.0.0", + "pytest-asyncio~=0.21.0", + "pre-commit~=3.0.0", + "requests~=2.28.0", + "ciso8601~=2.3.0", + "httpx>=0.24.0,<0.28.0", ], - "docs": ["mkdocs", "mkdocs-material", "pdocs"], - "server": ["uvicorn[standard]==0.19.0"], + "docs": ["mkdocs~=1.4.0", "mkdocs-material~=9.0.0", "pdocs~=1.2.0"], + "server": ["uvicorn[standard]~=0.19.0"], } setup( From a635594092d78de408592bfbfb680ad509b3dca6 Mon Sep 17 00:00:00 2001 From: jonhealy1 Date: Thu, 17 Apr 2025 13:49:47 +0800 Subject: [PATCH 14/20] pydantic dependecy --- stac_fastapi/core/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stac_fastapi/core/setup.py b/stac_fastapi/core/setup.py index db87f9c4..502d7f63 100644 --- a/stac_fastapi/core/setup.py +++ b/stac_fastapi/core/setup.py @@ -8,7 +8,7 @@ install_requires = [ "fastapi~=0.109.0", "attrs>=23.2.0", - "pydantic~=2.0.0", + "pydantic>=2.4.1,<3.0.0", "stac_pydantic~=3.1.0", "stac-fastapi.api==5.1.1", "stac-fastapi.extensions==5.1.1", From 7e0666149a869cdbc2c5dd6729a18f5a5d595f40 Mon Sep 17 00:00:00 2001 From: jonhealy1 Date: Thu, 17 Apr 2025 13:52:33 +0800 Subject: [PATCH 15/20] update geojson-pydantic --- stac_fastapi/core/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stac_fastapi/core/setup.py b/stac_fastapi/core/setup.py index 502d7f63..adde5c82 100644 --- a/stac_fastapi/core/setup.py +++ b/stac_fastapi/core/setup.py @@ -15,7 +15,7 @@ "stac-fastapi.types==5.1.1", "orjson~=3.9.0", "overrides~=7.4.0", - "geojson-pydantic~=0.5.0", + "geojson-pydantic~=1.0.0", "pygeofilter~=0.3.1", "jsonschema~=4.0.0", "slowapi~=0.1.9", From 342b66e0311572460c874104fae324e7b7ba2454 Mon Sep 17 00:00:00 2001 From: jonhealy1 Date: Thu, 17 Apr 2025 13:57:46 +0800 Subject: [PATCH 16/20] update uvicorn --- stac_fastapi/elasticsearch/setup.py | 2 +- stac_fastapi/opensearch/setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stac_fastapi/elasticsearch/setup.py b/stac_fastapi/elasticsearch/setup.py index ae6c1976..3f42d9ba 100644 --- a/stac_fastapi/elasticsearch/setup.py +++ b/stac_fastapi/elasticsearch/setup.py @@ -24,7 +24,7 @@ "httpx>=0.24.0,<0.28.0", ], "docs": ["mkdocs~=1.4.0", "mkdocs-material~=9.0.0", "pdocs~=1.2.0"], - "server": ["uvicorn[standard]~=0.19.0"], + "server": ["uvicorn[standard]~=0.23.0"], } setup( diff --git a/stac_fastapi/opensearch/setup.py b/stac_fastapi/opensearch/setup.py index aa6213e0..59fb1cb6 100644 --- a/stac_fastapi/opensearch/setup.py +++ b/stac_fastapi/opensearch/setup.py @@ -24,7 +24,7 @@ "httpx>=0.24.0,<0.28.0", ], "docs": ["mkdocs~=1.4.0", "mkdocs-material~=9.0.0", "pdocs~=1.2.0"], - "server": ["uvicorn[standard]~=0.19.0"], + "server": ["uvicorn[standard]~=0.23.0"], } setup( From 7bcced3a2a29eea1337fbcc7b660edc040c179cd Mon Sep 17 00:00:00 2001 From: jonhealy1 Date: Thu, 17 Apr 2025 14:08:41 +0800 Subject: [PATCH 17/20] remove elasticsearch-dsl --- CHANGELOG.md | 1 + stac_fastapi/elasticsearch/setup.py | 1 - .../elasticsearch/stac_fastapi/elasticsearch/database_logic.py | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e217732..5b727634 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Updated `STAC_FASTAPI_VERSION` environment variables to 4.0.0a1 in all compose files [#358](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/358) - Bumped version from 4.0.0a0 to 4.0.0a1 for the PEP 625 compliant release [#358](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/358) - Updated dependency requirements to use compatible release specifiers (~=) for more controlled updates while allowing for bug fixes and security patches [#358](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/issues/358) +- Removed elasticsearch-dsl dependency as it's now part of the elasticsearch package since version 8.18.0 [#358](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/issues/358) ## [v4.0.0a0] - 2025-04-16 diff --git a/stac_fastapi/elasticsearch/setup.py b/stac_fastapi/elasticsearch/setup.py index 3f42d9ba..4e2a4da4 100644 --- a/stac_fastapi/elasticsearch/setup.py +++ b/stac_fastapi/elasticsearch/setup.py @@ -8,7 +8,6 @@ install_requires = [ "stac_fastapi_core==4.0.0a1", "elasticsearch[async]~=9.0.0", - "elasticsearch-dsl~=8.18.0", "uvicorn~=0.23.0", "starlette~=0.27.0", ] diff --git a/stac_fastapi/elasticsearch/stac_fastapi/elasticsearch/database_logic.py b/stac_fastapi/elasticsearch/stac_fastapi/elasticsearch/database_logic.py index 38d05e29..4bf989f3 100644 --- a/stac_fastapi/elasticsearch/stac_fastapi/elasticsearch/database_logic.py +++ b/stac_fastapi/elasticsearch/stac_fastapi/elasticsearch/database_logic.py @@ -8,7 +8,7 @@ from typing import Any, Dict, Iterable, List, Optional, Tuple, Type import attr -from elasticsearch_dsl import Q, Search +from elasticsearch.dsl import Q, Search from starlette.requests import Request from elasticsearch import exceptions, helpers # type: ignore From 01ccf79810f0994cd584ccd1d841a941cb90637b Mon Sep 17 00:00:00 2001 From: jonhealy1 Date: Thu, 17 Apr 2025 14:41:41 +0800 Subject: [PATCH 18/20] update for es 8.18.0 library --- stac_fastapi/elasticsearch/setup.py | 6 +++--- .../elasticsearch/stac_fastapi/elasticsearch/config.py | 2 +- .../stac_fastapi/elasticsearch/database_logic.py | 4 ++-- stac_fastapi/opensearch/setup.py | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/stac_fastapi/elasticsearch/setup.py b/stac_fastapi/elasticsearch/setup.py index 4e2a4da4..15d7815f 100644 --- a/stac_fastapi/elasticsearch/setup.py +++ b/stac_fastapi/elasticsearch/setup.py @@ -7,9 +7,9 @@ install_requires = [ "stac_fastapi_core==4.0.0a1", - "elasticsearch[async]~=9.0.0", + "elasticsearch[async]~=8.18.0", "uvicorn~=0.23.0", - "starlette~=0.27.0", + "starlette>=0.35.0,<0.36.0", ] extra_reqs = { @@ -18,7 +18,7 @@ "pytest-cov~=4.0.0", "pytest-asyncio~=0.21.0", "pre-commit~=3.0.0", - "requests~=2.28.0", + "requests>=2.32.0,<3.0.0", "ciso8601~=2.3.0", "httpx>=0.24.0,<0.28.0", ], diff --git a/stac_fastapi/elasticsearch/stac_fastapi/elasticsearch/config.py b/stac_fastapi/elasticsearch/stac_fastapi/elasticsearch/config.py index d14295f4..fb9e2e0f 100644 --- a/stac_fastapi/elasticsearch/stac_fastapi/elasticsearch/config.py +++ b/stac_fastapi/elasticsearch/stac_fastapi/elasticsearch/config.py @@ -31,7 +31,7 @@ def _es_config() -> Dict[str, Any]: # Initialize the configuration dictionary config: Dict[str, Any] = { "hosts": hosts, - "headers": {"accept": "application/vnd.elasticsearch+json; compatible-with=7"}, + "headers": {"accept": "application/vnd.elasticsearch+json; compatible-with=8"}, } # Handle API key diff --git a/stac_fastapi/elasticsearch/stac_fastapi/elasticsearch/database_logic.py b/stac_fastapi/elasticsearch/stac_fastapi/elasticsearch/database_logic.py index 4bf989f3..ec84de57 100644 --- a/stac_fastapi/elasticsearch/stac_fastapi/elasticsearch/database_logic.py +++ b/stac_fastapi/elasticsearch/stac_fastapi/elasticsearch/database_logic.py @@ -232,7 +232,7 @@ async def get_all_collections( body={ "sort": [{"id": {"order": "asc"}}], "size": limit, - "search_after": search_after, + **({"search_after": search_after} if search_after is not None else {}), }, ) @@ -497,7 +497,7 @@ async def execute_search( ignore_unavailable=ignore_unavailable, query=query, sort=sort or DEFAULT_SORT, - search_after=search_after, + **({"search_after": search_after} if search_after is not None else {}), size=size_limit, ) ) diff --git a/stac_fastapi/opensearch/setup.py b/stac_fastapi/opensearch/setup.py index 59fb1cb6..dc781e99 100644 --- a/stac_fastapi/opensearch/setup.py +++ b/stac_fastapi/opensearch/setup.py @@ -10,7 +10,7 @@ "opensearch-py~=2.8.0", "opensearch-py[async]~=2.8.0", "uvicorn~=0.23.0", - "starlette~=0.27.0", + "starlette>=0.35.0,<0.36.0", ] extra_reqs = { @@ -19,7 +19,7 @@ "pytest-cov~=4.0.0", "pytest-asyncio~=0.21.0", "pre-commit~=3.0.0", - "requests~=2.28.0", + "requests>=2.32.0,<3.0.0", "ciso8601~=2.3.0", "httpx>=0.24.0,<0.28.0", ], From 8726e574f326a87f2f76a91c45276dfaff557019 Mon Sep 17 00:00:00 2001 From: jonhealy1 Date: Thu, 17 Apr 2025 18:38:38 +0800 Subject: [PATCH 19/20] use hyphens --- README.md | 8 ++++---- stac_fastapi/core/setup.py | 2 +- stac_fastapi/elasticsearch/setup.py | 4 ++-- stac_fastapi/opensearch/setup.py | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 09b85173..9702dd83 100644 --- a/README.md +++ b/README.md @@ -37,9 +37,9 @@ ```bash # For versions 4.0.0a1 and newer (PEP 625 compliant naming): -pip install stac_fastapi_elasticsearch # Elasticsearch backend -pip install stac_fastapi_opensearch # Opensearch backend -pip install stac_fastapi_core # Core library +pip install stac-fastapi-elasticsearch # Elasticsearch backend +pip install stac-fastapi-opensearch # Opensearch backend +pip install stac-fastapi-core # Core library # For versions 4.0.0a0 and older: pip install stac-fastapi.elasticsearch # Elasticsearch backend @@ -47,7 +47,7 @@ pip install stac-fastapi.opensearch # Opensearch backend pip install stac-fastapi.core # Core library ``` -> **Important Note:** Starting with version 4.0.0a1, package names have changed from using periods (e.g., `stac-fastapi.core`) to using underscores (e.g., `stac_fastapi_core`) to comply with PEP 625. Please update your requirements files accordingly. +> **Important Note:** Starting with version 4.0.0a1, package names have changed from using periods (e.g., `stac-fastapi.core`) to using hyphens (e.g., `stac-fastapi-core`) to comply with PEP 625. Please update your requirements files accordingly. ### To install and run via pre-built Docker Images diff --git a/stac_fastapi/core/setup.py b/stac_fastapi/core/setup.py index adde5c82..ae758a5f 100644 --- a/stac_fastapi/core/setup.py +++ b/stac_fastapi/core/setup.py @@ -22,7 +22,7 @@ ] setup( - name="stac_fastapi_core", + name="stac-fastapi-core", description="Core library for the Elasticsearch and Opensearch stac-fastapi backends.", long_description=desc, long_description_content_type="text/markdown", diff --git a/stac_fastapi/elasticsearch/setup.py b/stac_fastapi/elasticsearch/setup.py index 15d7815f..89d2b2f8 100644 --- a/stac_fastapi/elasticsearch/setup.py +++ b/stac_fastapi/elasticsearch/setup.py @@ -6,7 +6,7 @@ desc = f.read() install_requires = [ - "stac_fastapi_core==4.0.0a1", + "stac-fastapi-core==4.0.0a1", "elasticsearch[async]~=8.18.0", "uvicorn~=0.23.0", "starlette>=0.35.0,<0.36.0", @@ -27,7 +27,7 @@ } setup( - name="stac_fastapi_elasticsearch", + name="stac-fastapi-elasticsearch", description="An implementation of STAC API based on the FastAPI framework with both Elasticsearch and Opensearch.", long_description=desc, long_description_content_type="text/markdown", diff --git a/stac_fastapi/opensearch/setup.py b/stac_fastapi/opensearch/setup.py index dc781e99..9f652c01 100644 --- a/stac_fastapi/opensearch/setup.py +++ b/stac_fastapi/opensearch/setup.py @@ -6,7 +6,7 @@ desc = f.read() install_requires = [ - "stac_fastapi_core==4.0.0a1", + "stac-fastapi-core==4.0.0a1", "opensearch-py~=2.8.0", "opensearch-py[async]~=2.8.0", "uvicorn~=0.23.0", @@ -28,7 +28,7 @@ } setup( - name="stac_fastapi_opensearch", + name="stac-fastapi-opensearch", description="Opensearch stac-fastapi backend.", long_description=desc, long_description_content_type="text/markdown", From 3d9e43ee77d9075c4f7cfd4c26bc51645cb10cb9 Mon Sep 17 00:00:00 2001 From: jonhealy1 Date: Thu, 17 Apr 2025 20:13:41 +0800 Subject: [PATCH 20/20] underscores for pypi --- README.md | 2 +- stac_fastapi/core/setup.py | 2 +- stac_fastapi/elasticsearch/setup.py | 2 +- stac_fastapi/opensearch/setup.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 9702dd83..d6e648f3 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ pip install stac-fastapi.opensearch # Opensearch backend pip install stac-fastapi.core # Core library ``` -> **Important Note:** Starting with version 4.0.0a1, package names have changed from using periods (e.g., `stac-fastapi.core`) to using hyphens (e.g., `stac-fastapi-core`) to comply with PEP 625. Please update your requirements files accordingly. +> **Important Note:** Starting with version 4.0.0a1, package names have changed from using periods (e.g., `stac-fastapi.core`) to using hyphens (e.g., `stac-fastapi-core`) to comply with PEP 625. The internal package structure uses underscores, but users should install with hyphens as shown above. Please update your requirements files accordingly. ### To install and run via pre-built Docker Images diff --git a/stac_fastapi/core/setup.py b/stac_fastapi/core/setup.py index ae758a5f..adde5c82 100644 --- a/stac_fastapi/core/setup.py +++ b/stac_fastapi/core/setup.py @@ -22,7 +22,7 @@ ] setup( - name="stac-fastapi-core", + name="stac_fastapi_core", description="Core library for the Elasticsearch and Opensearch stac-fastapi backends.", long_description=desc, long_description_content_type="text/markdown", diff --git a/stac_fastapi/elasticsearch/setup.py b/stac_fastapi/elasticsearch/setup.py index 89d2b2f8..1377211b 100644 --- a/stac_fastapi/elasticsearch/setup.py +++ b/stac_fastapi/elasticsearch/setup.py @@ -27,7 +27,7 @@ } setup( - name="stac-fastapi-elasticsearch", + name="stac_fastapi_elasticsearch", description="An implementation of STAC API based on the FastAPI framework with both Elasticsearch and Opensearch.", long_description=desc, long_description_content_type="text/markdown", diff --git a/stac_fastapi/opensearch/setup.py b/stac_fastapi/opensearch/setup.py index 9f652c01..ece68679 100644 --- a/stac_fastapi/opensearch/setup.py +++ b/stac_fastapi/opensearch/setup.py @@ -28,7 +28,7 @@ } setup( - name="stac-fastapi-opensearch", + name="stac_fastapi_opensearch", description="Opensearch stac-fastapi backend.", long_description=desc, long_description_content_type="text/markdown",