diff --git a/src/data_preparation.py b/src/data_preparation.py index 3c50ba893563780dfd8ac92f36fffabc38ed16a9..badd75aa709e108c2516ccf24a3de915c77ca258 100644 --- a/src/data_preparation.py +++ b/src/data_preparation.py @@ -116,7 +116,7 @@ class DataPrep(object): :return: """ df_all = {} - df, meta = join.download_join(station_name=self.station, statvar=self.statistics_per_var, + df, meta = join.download_join(station_name=self.station, stat_var=self.statistics_per_var, station_type=self.station_type, network_name=self.network) df_all[self.station[0]] = df # convert df_all to xarray diff --git a/test/test_modules/test_pre_processing.py b/test/test_modules/test_pre_processing.py index 13abe62a2b9199ad8d92528ff5363bd54f1be221..41e8729db8841a257b86740edecbbdfd3e0dc910 100644 --- a/test/test_modules/test_pre_processing.py +++ b/test/test_modules/test_pre_processing.py @@ -42,11 +42,11 @@ class TestPreProcessing: ExperimentSetup(parser_args={}, stations=['DEBW107', 'DEBY081', 'DEBW013', 'DEBW076', 'DEBW087'], var_all_dict={'o3': 'dma8eu', 'temp': 'maximum'}) caplog.set_level(logging.INFO) - PreProcessing() - assert caplog.record_tuples[0] == ('root', 20, 'PreProcessing started') - assert caplog.record_tuples[1] == ('root', 20, 'check valid stations started') - assert caplog.record_tuples[-1] == ('root', 20, PyTestRegex(r'run for \d+\.\d+s to check 5 station\(s\). Found ' - r'5/5 valid stations.')) + with PreProcessing(): + assert caplog.record_tuples[0] == ('root', 20, 'PreProcessing started') + assert caplog.record_tuples[1] == ('root', 20, 'check valid stations started') + assert caplog.record_tuples[-1] == ('root', 20, PyTestRegex(r'run for \d+\.\d+s to check 5 station\(s\). ' + r'Found 5/5 valid stations.')) RunEnvironment().__del__() def test_run(self, obj_with_exp_setup):