Skip to content
Snippets Groups Projects
Commit 2cd7e32e authored by leufen1's avatar leufen1
Browse files

fix some tests

parent d80b5259
Branches
Tags
5 merge requests!468first implementation of toar-data-v2, can load data (but cannot process these...,!467Resolve "release v2.2.0",!455update for reqs,!452Lukas issue404 feat skip ols,!451Resolve "Skip OLS on request"
Pipeline #105710 passed
...@@ -380,8 +380,9 @@ class PreProcessing(RunEnvironment): ...@@ -380,8 +380,9 @@ class PreProcessing(RunEnvironment):
data_collection = self.data_store.get("data_collection", subset) data_collection = self.data_store.get("data_collection", subset)
stations.update({str(s): s.get_coordinates() for s in data_collection if s not in stations}) stations.update({str(s): s.get_coordinates() for s in data_collection if s not in stations})
CAMSforecast("CAMS", ref_store_path=path, data_path=data_path).make_reference_available_locally(stations) CAMSforecast("CAMS", ref_store_path=path, data_path=data_path).make_reference_available_locally(stations)
else:
logging.info(f"No preparation required for competitor {competitor_name} as no specific instruction "
f"is provided.")
else: else:
logging.info("No preparation required because no competitor was provided to the workflow.") logging.info("No preparation required because no competitor was provided to the workflow.")
......
...@@ -52,8 +52,8 @@ class TestPreProcessing: ...@@ -52,8 +52,8 @@ class TestPreProcessing:
assert caplog.record_tuples[-4] == ('root', 20, "use serial create_info_df (val)") assert caplog.record_tuples[-4] == ('root', 20, "use serial create_info_df (val)")
assert caplog.record_tuples[-3] == ('root', 20, "use serial create_info_df (test)") assert caplog.record_tuples[-3] == ('root', 20, "use serial create_info_df (test)")
assert caplog.record_tuples[-2] == ('root', 20, "Searching for competitors to be prepared for use.") assert caplog.record_tuples[-2] == ('root', 20, "Searching for competitors to be prepared for use.")
assert caplog.record_tuples[-1] == ('root', 20, "No preparation required because no competitor was provided" assert caplog.record_tuples[-1] == ('root', 20, "No preparation required for competitor ols as no specific "
" to the workflow.") "instruction is provided.")
RunEnvironment().__del__() RunEnvironment().__del__()
def test_run(self, obj_with_exp_setup): def test_run(self, obj_with_exp_setup):
...@@ -71,7 +71,7 @@ class TestPreProcessing: ...@@ -71,7 +71,7 @@ class TestPreProcessing:
"extreme_values", "extremes_on_right_tail_only", "upsampling"] "extreme_values", "extremes_on_right_tail_only", "upsampling"]
assert data_store.search_scope("general.train") == sorted(expected_params) assert data_store.search_scope("general.train") == sorted(expected_params)
assert data_store.search_name("data_collection") == sorted(["general.train", "general.val", "general.test", assert data_store.search_name("data_collection") == sorted(["general.train", "general.val", "general.test",
"general.train_val"]) "general.train_val"])
def test_create_set_split_not_all_stations(self, caplog, obj_with_exp_setup): def test_create_set_split_not_all_stations(self, caplog, obj_with_exp_setup):
caplog.set_level(logging.DEBUG) caplog.set_level(logging.DEBUG)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment