From dd8527a03806eee3e8dbddf99e1f7e4bf2d17eb1 Mon Sep 17 00:00:00 2001 From: Stefaan Lippens Date: Fri, 1 Mar 2024 21:34:07 +0100 Subject: [PATCH] Issue #112 some final cleanups --- src/openeo_aggregator/backend.py | 5 +++-- src/openeo_aggregator/config.py | 10 +--------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/src/openeo_aggregator/backend.py b/src/openeo_aggregator/backend.py index 5dfcfbb..3b57590 100644 --- a/src/openeo_aggregator/backend.py +++ b/src/openeo_aggregator/backend.py @@ -1306,7 +1306,6 @@ def __init__(self, backends: MultiBackendConnection): batch_jobs=batch_jobs, user_defined_processes=user_defined_processes, ) - # TODO #112 once `AggregatorConfig.configured_oidc_providers` is eliminated, this `_configured_oidc_providers` is not necessary anymore. self._configured_oidc_providers: List[OidcProvider] = get_backend_config().oidc_providers self._auth_entitlement_check: Union[bool, dict] = get_backend_config().auth_entitlement_check @@ -1319,7 +1318,9 @@ def __init__(self, backends: MultiBackendConnection): ) def oidc_providers(self) -> List[OidcProvider]: - # TODO #112 once `AggregatorConfig.configured_oidc_providers` is eliminated, this method override is not necessary anymore + # Technically, this implementation is redundant given the parent implementation + # But keeping it allows for some additional tests + # (until https://github.com/Open-EO/openeo-python-driver/issues/265 is resolved) return self._configured_oidc_providers def file_formats(self) -> dict: diff --git a/src/openeo_aggregator/config.py b/src/openeo_aggregator/config.py index 4286579..df0b1d5 100644 --- a/src/openeo_aggregator/config.py +++ b/src/openeo_aggregator/config.py @@ -33,22 +33,14 @@ class ConfigException(ValueError): class AggregatorConfig(dict): - """ - Simple dictionary based configuration for aggregator backend - """ - - # TODO #112 migrate everything to AggregatorBackendConfig (attrs based instead of dictionary based) - + # TODO #112 Remove this empty shell config_source = dict_item() - # Just a config field for test purposes (while were stripping down this config class) - test_dummy = dict_item(default="alice") @attrs.frozen(kw_only=True) class AggregatorBackendConfig(OpenEoBackendConfig): - # TODO #112 migrate everything from AggregatorConfig to this class capabilities_backend_version: str = openeo_aggregator.about.__version__ capabilities_deploy_metadata: dict = build_backend_deploy_metadata(