From 6165a8ef5ebfc684a36c317a1f6c3be25849c9f6 Mon Sep 17 00:00:00 2001 From: Stefaan Lippens Date: Thu, 9 Jan 2025 14:27:55 +0100 Subject: [PATCH] Issue #117 remove concrete openEO Platform configs from generic repo --- .gitignore | 4 ++ CHANGELOG.md | 4 ++ conf/.gitignore | 1 - conf/aggregator.dev.py | 86 ---------------------------------- conf/aggregator.prod.py | 78 ------------------------------ src/openeo_aggregator/about.py | 2 +- 6 files changed, 9 insertions(+), 166 deletions(-) delete mode 100644 conf/.gitignore delete mode 100644 conf/aggregator.dev.py delete mode 100644 conf/aggregator.prod.py diff --git a/.gitignore b/.gitignore index a910c9ae..78625741 100644 --- a/.gitignore +++ b/.gitignore @@ -120,3 +120,7 @@ pytest-tmp openeo_python.log* .envrc + + +# Ignore local/dev/test/dummy configs +conf*local.py diff --git a/CHANGELOG.md b/CHANGELOG.md index 05508e53..364d2552 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ The format is roughly based on [Keep a Changelog](https://keepachangelog.com/en/ ## unreleased +## 0.41.0 + +- Remove concrete openEO Platform configs from generic repo ([#117](https://github.com/Open-EO/openeo-aggregator/issues/117)) + ## 0.40.0 - Update to harmonized `job_option`/`additional` handling in `Connection.create_job` ([#165](https://github.com/Open-EO/openeo-aggregator/issues/165), [Open-EO/openeo-python-client#683](https://github.com/Open-EO/openeo-python-client/issues/683)) diff --git a/conf/.gitignore b/conf/.gitignore deleted file mode 100644 index 43261e17..00000000 --- a/conf/.gitignore +++ /dev/null @@ -1 +0,0 @@ -aggregator.local.py diff --git a/conf/aggregator.dev.py b/conf/aggregator.dev.py deleted file mode 100644 index f4dac03c..00000000 --- a/conf/aggregator.dev.py +++ /dev/null @@ -1,86 +0,0 @@ -import re - -from openeo_driver.users.oidc import OidcProvider - -from openeo_aggregator.config import AggregatorBackendConfig - -_DEFAULT_OIDC_CLIENT_EGI = { - "id": "openeo-platform-default-client", - "grant_types": [ - "authorization_code+pkce", - "urn:ietf:params:oauth:grant-type:device_code+pkce", - "refresh_token", - ], - "redirect_urls": [ - "https://editor.openeo.cloud", - "http://localhost:1410/", - "https://editor.openeo.org", - ], -} - -_DEFAULT_EGI_SCOPES = [ - "openid", - "email", - "eduperson_entitlement", - "eduperson_scoped_affiliation", -] - -oidc_providers = [ - OidcProvider( - id="egi", - title="EGI Check-in", - issuer="https://aai.egi.eu/auth/realms/egi/", - scopes=_DEFAULT_EGI_SCOPES, - default_clients=[_DEFAULT_OIDC_CLIENT_EGI], - ), - OidcProvider( - id="egi-dev", - title="EGI Check-in (dev)", - issuer="https://aai-dev.egi.eu/auth/realms/egi/", - scopes=_DEFAULT_EGI_SCOPES, - default_clients=[_DEFAULT_OIDC_CLIENT_EGI], - ), -] - -ZK_HOSTS = "epod-master1.vgt.vito.be:2181,epod-master2.vgt.vito.be:2181,epod-master3.vgt.vito.be:2181" - - -config = AggregatorBackendConfig( - id="openeo-platform-aggregator-dev", - capabilities_title="openEO Platform (dev)", - capabilities_description="openEO Platform, provided through openEO Aggregator Driver (development instance).", - oidc_providers=oidc_providers, - aggregator_backends={ - "vito": "https://openeo-dev.vito.be/openeo/1.1/", - "eodc": "https://openeo-dev.eodc.eu/openeo/1.1.0/", - # "creo": "https://openeo-staging.creo.vito.be/openeo/1.1", - # Sentinel Hub OpenEO by Sinergise - "sentinelhub": "https://openeo.sentinel-hub.com/production/", - }, - collection_allow_list=[ - # Special case: only consider Terrascope for SENTINEL2_L2A - {"collection_id": "SENTINEL2_L2A", "allowed_backends": ["vito"]}, - # Still allow all other collections - re.compile("(?!SENTINEL2_L2A).*"), - ], - zookeeper_prefix="/openeo/aggregator-dev/", - partitioned_job_tracking={ - "zk_hosts": ZK_HOSTS, - }, - memoizer={ - # See `memoizer_from_config` for more details - "type": "chained", - "config": { - "parts": [ - {"type": "dict", "config": {"default_ttl": 5 * 60}}, - { - "type": "zookeeper", - "config": { - "zk_hosts": ZK_HOSTS, - "default_ttl": 24 * 60 * 60, - }, - }, - ] - }, - }, -) diff --git a/conf/aggregator.prod.py b/conf/aggregator.prod.py deleted file mode 100644 index 7c1b0948..00000000 --- a/conf/aggregator.prod.py +++ /dev/null @@ -1,78 +0,0 @@ -import re - -from openeo_driver.users.oidc import OidcProvider - -from openeo_aggregator.config import AggregatorBackendConfig - -_DEFAULT_OIDC_CLIENT_EGI = { - "id": "openeo-platform-default-client", - "grant_types": [ - "authorization_code+pkce", - "urn:ietf:params:oauth:grant-type:device_code+pkce", - "refresh_token", - ], - "redirect_urls": [ - "https://editor.openeo.cloud", - "http://localhost:1410/", - "https://editor.openeo.org", - ], -} - -_DEFAULT_EGI_SCOPES = [ - "openid", - "email", - "eduperson_entitlement", - "eduperson_scoped_affiliation", -] - -oidc_providers = [ - OidcProvider( - id="egi", - title="EGI Check-in", - issuer="https://aai.egi.eu/auth/realms/egi/", - scopes=_DEFAULT_EGI_SCOPES, - default_clients=[_DEFAULT_OIDC_CLIENT_EGI], - ), -] - -ZK_HOSTS = "epod-master1.vgt.vito.be:2181,epod-master2.vgt.vito.be:2181,epod-master3.vgt.vito.be:2181" - - -config = AggregatorBackendConfig( - id="openeo-platform-aggregator-prod", - capabilities_title="openEO Platform", - capabilities_description="openEO Platform, provided through openEO Aggregator Driver.", - oidc_providers=oidc_providers, - aggregator_backends={ - "vito": "https://openeo.vito.be/openeo/1.1/", - "eodc": "https://openeo.eodc.eu/openeo/1.1.0/", - # Sentinel Hub OpenEO by Sinergise - "sentinelhub": "https://openeo.sentinel-hub.com/production/", - }, - collection_allow_list=[ - # Special case: only consider Terrascope for SENTINEL2_L2A - {"collection_id": "SENTINEL2_L2A", "allowed_backends": ["vito"]}, - # Still allow all other collections - re.compile("(?!SENTINEL2_L2A).*"), - ], - zookeeper_prefix="/openeo/aggregator/", - partitioned_job_tracking={ - "zk_hosts": ZK_HOSTS, - }, - memoizer={ - # See `memoizer_from_config` for more details - "type": "chained", - "config": { - "parts": [ - {"type": "dict", "config": {"default_ttl": 5 * 60}}, - { - "type": "zookeeper", - "config": { - "zk_hosts": ZK_HOSTS, - "default_ttl": 24 * 60 * 60, - }, - }, - ] - }, - }, -) diff --git a/src/openeo_aggregator/about.py b/src/openeo_aggregator/about.py index c5fcae42..38aaf3ff 100644 --- a/src/openeo_aggregator/about.py +++ b/src/openeo_aggregator/about.py @@ -2,7 +2,7 @@ import sys from typing import Optional -__version__ = "0.40.0a1" +__version__ = "0.41.0a1" def log_version_info(logger: Optional[logging.Logger] = None):