diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 915929cd..e79fcecd 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -1,4 +1,5 @@ name: stac-fastapi-elasticsearch + on: push: branches: diff --git a/CHANGELOG.md b/CHANGELOG.md index 67882e2d..63e8b796 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,15 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Added +### Changed + +### Fixed + + +## [v2.1.0] + +### Added + - Added explicit mapping for ID in `ES_COLLECTIONS_MAPPINGS` [#198](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/198) ### Changed @@ -128,7 +137,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Added db_to_stac serializer to item_collection method in core.py. -[Unreleased]: +[Unreleased]: +[v2.1.0]: [v2.0.0]: [v1.1.0]: [v1.0.0]: diff --git a/Makefile b/Makefile index 545d2311..4dfb2aec 100644 --- a/Makefile +++ b/Makefile @@ -28,11 +28,11 @@ run_os = docker-compose \ .PHONY: image-deploy-es image-deploy-es: - docker build -f Dockerfile.dev.es -t stac-fastapi-elasticsearch:latest . + docker build -f dockerfiles/Dockerfile.dev.es -t stac-fastapi-elasticsearch:latest . .PHONY: image-deploy-os image-deploy-os: - docker build -f Dockerfile.dev.os -t stac-fastapi-opensearch:latest . + docker build -f dockerfiles/Dockerfile.dev.os -t stac-fastapi-opensearch:latest . .PHONY: run-deploy-locally run-deploy-locally: diff --git a/README.md b/README.md index 7c662480..fd0ab0fe 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,13 @@ # stac-fastapi-elasticsearch-opensearch (sfeos) -## Elasticsearch and Opensearch backends for the stac-fastapi project - -[![PyPI version](https://badge.fury.io/py/stac-fastapi.elasticsearch.svg)](https://badge.fury.io/py/stac-fastapi.elasticsearch) +## Elasticsearch and Opensearch backends for the stac-fastapi project + + [![PyPI version](https://badge.fury.io/py/stac-fastapi.elasticsearch.svg)](https://badge.fury.io/py/stac-fastapi.elasticsearch) + +- 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. -To install from PyPI: +### To install from PyPI: ```shell pip install stac_fastapi.elasticsearch diff --git a/data_loader/data_loader.py b/data_loader/data_loader.py index c438811d..315068b6 100644 --- a/data_loader/data_loader.py +++ b/data_loader/data_loader.py @@ -13,6 +13,7 @@ DATA_DIR = os.path.join(os.path.dirname(__file__), "setup_data/") backend = sys.argv[1].lower() + if backend == "opensearch": STAC_API_BASE_URL = "http://localhost:8082" elif backend == "elasticsearch": diff --git a/docker-compose.yml b/docker-compose.yml index 9d665bce..ee6e995f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,7 +7,7 @@ services: restart: always build: context: . - dockerfile: Dockerfile.dev.es + dockerfile: dockerfiles/Dockerfile.dev.es environment: - APP_HOST=0.0.0.0 - APP_PORT=8080 @@ -36,7 +36,7 @@ services: restart: always build: context: . - dockerfile: Dockerfile.dev.os + dockerfile: dockerfiles/Dockerfile.dev.os environment: - APP_HOST=0.0.0.0 - APP_PORT=8082 diff --git a/Dockerfile.deploy.es b/dockerfiles/Dockerfile.deploy.es similarity index 100% rename from Dockerfile.deploy.es rename to dockerfiles/Dockerfile.deploy.es diff --git a/Dockerfile.deploy.os b/dockerfiles/Dockerfile.deploy.os similarity index 100% rename from Dockerfile.deploy.os rename to dockerfiles/Dockerfile.deploy.os diff --git a/Dockerfile.dev.es b/dockerfiles/Dockerfile.dev.es similarity index 100% rename from Dockerfile.dev.es rename to dockerfiles/Dockerfile.dev.es diff --git a/Dockerfile.dev.os b/dockerfiles/Dockerfile.dev.os similarity index 100% rename from Dockerfile.dev.os rename to dockerfiles/Dockerfile.dev.os diff --git a/scripts/publish b/scripts/publish deleted file mode 100755 index 464bbe05..00000000 --- a/scripts/publish +++ /dev/null @@ -1,73 +0,0 @@ -#!/bin/bash - -set -e - -if [[ -n "${CI}" ]]; then - set -x -fi - -# Import shared variables -SUBPACKAGE_DIRS=( - "stac_fastapi/types" - "stac_fastapi/extensions" - "stac_fastapi/api" - "stac_fastapi/sqlalchemy" - "stac_fastapi/pgstac" - "stac_fastapi/elasticsearch" -) - -function usage() { - echo -n \ - "Usage: $(basename "$0") -Publish all stac-fastapi packages. - -Options: ---test Publish to test pypi. Requires a 'testpypi' repository - be defined in your .pypirc; - See https://packaging.python.org/guides/using-testpypi/#using-testpypi-with-pip -" -} - -POSITIONAL=() -while [[ $# -gt 0 ]] -do - key="$1" - case $key in - - --help) - usage - exit 0 - shift - ;; - - --test) - TEST_PYPI="--repository testpypi" - shift - ;; - - *) # unknown option - POSITIONAL+=("$1") # save it in an array for later - shift # past argument - ;; - esac -done -set -- "${POSITIONAL[@]}" # restore positional parameters - -# Fail if this isn't CI and we aren't publishing to test pypi -if [ -z "${TEST_PYPI}" ] && [ -z "${CI}" ]; then - echo "Only CI can publish to pypi" - exit 1 -fi - -if [ "${BASH_SOURCE[0]}" = "${0}" ]; then - for PACKAGE_DIR in "${SUBPACKAGE_DIRS[@]}" - do - echo ${PACKAGE_DIR} - pushd ./${PACKAGE_DIR} - rm -rf dist - python setup.py sdist bdist_wheel - twine upload ${TEST_PYPI} dist/* - popd - - done -fi \ No newline at end of file diff --git a/stac_fastapi/core/stac_fastapi/core/version.py b/stac_fastapi/core/stac_fastapi/core/version.py index 6b648e2b..65dddcd0 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__ = "2.0.0" +__version__ = "2.1.0" diff --git a/stac_fastapi/elasticsearch/stac_fastapi/elasticsearch/version.py b/stac_fastapi/elasticsearch/stac_fastapi/elasticsearch/version.py index 6b648e2b..65dddcd0 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__ = "2.0.0" +__version__ = "2.1.0" diff --git a/stac_fastapi/opensearch/stac_fastapi/opensearch/version.py b/stac_fastapi/opensearch/stac_fastapi/opensearch/version.py index 6b648e2b..65dddcd0 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__ = "2.0.0" +__version__ = "2.1.0"