Skip to content

Commit

Permalink
fixup! Issue #112 Eliminate unused AggregatorConfig arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
soxofaan committed Mar 1, 2024
1 parent 91fe4ac commit bc62765
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/openeo_aggregator/background/prime_caches.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def prime_caches(
_log.info(f"Using config: {config.get('config_source')=}")

backends = MultiBackendConnection.from_config()
backend_implementation = AggregatorBackendImplementation(backends=backends, config=config)
backend_implementation = AggregatorBackendImplementation(backends=backends)

if fail_mode == FAIL_MODE_FAILFAST:
# Do not intercept any exceptions.
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def config(


@pytest.fixture
def multi_backend_connection() -> MultiBackendConnection:
def multi_backend_connection(backend1, backend2) -> MultiBackendConnection:
return MultiBackendConnection.from_config()


Expand Down
6 changes: 3 additions & 3 deletions tests/test_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def test_file_formats_simple(self, multi_backend_connection, backend1, backend2,
],
)
def test_file_formats_caching(
self, multi_backend_connection, config, backend1, backend2, requests_mock, overrides, expected_cache_types
self, multi_backend_connection, backend1, backend2, requests_mock, overrides, expected_cache_types
):
just_geotiff = {
"input": {"GTiff": {"gis_data_types": ["raster"], "parameters": {}, "title": "GeoTiff"}},
Expand All @@ -89,7 +89,7 @@ def test_file_formats_caching(
mock2 = requests_mock.get(backend2 + "/file_formats", json=just_geotiff)

with config_overrides(**overrides):
implementation = AggregatorBackendImplementation(backends=multi_backend_connection, config=config)
implementation = AggregatorBackendImplementation(backends=multi_backend_connection)

file_formats = implementation.file_formats()
assert file_formats == just_geotiff
Expand Down Expand Up @@ -132,7 +132,7 @@ def test_file_formats_merging(self, multi_backend_connection, config, backend1,
"NetCDF": {"gis_data_types": ["raster"], "parameters": {}, "title": "netCDF"},
}
})
implementation = AggregatorBackendImplementation(backends=multi_backend_connection, config=config)
implementation = AggregatorBackendImplementation(backends=multi_backend_connection)
file_formats = implementation.file_formats()
assert file_formats == {
"input": {
Expand Down

0 comments on commit bc62765

Please sign in to comment.