Skip to content

Commit

Permalink
Issue #112 some final cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
soxofaan committed Mar 1, 2024
1 parent b18b3a8 commit 4fd5134
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
6 changes: 0 additions & 6 deletions src/openeo_aggregator/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -1306,8 +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

self._memoizer: Memoizer = memoizer_from_config(namespace="general")
Expand All @@ -1318,10 +1316,6 @@ def __init__(self, backends: MultiBackendConnection):
max_age=datetime.timedelta(minutes=15), public=True,
)

def oidc_providers(self) -> List[OidcProvider]:
# TODO #112 once `AggregatorConfig.configured_oidc_providers` is eliminated, this method override is not necessary anymore
return self._configured_oidc_providers

def file_formats(self) -> dict:
return self._memoizer.get_or_call(key="file_formats", callback=self._file_formats)

Expand Down
10 changes: 1 addition & 9 deletions src/openeo_aggregator/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 4fd5134

Please sign in to comment.