Replaced lambda function with regular function and fstring for better readability and debugging

This commit is contained in:
2024-05-26 11:39:40 +02:00
parent b7f9bfe149
commit 4dc09339b5

View File

@ -30,19 +30,20 @@ def integrate_data_sources(yaml_config_file_path, log_dir='logs/'):
except yaml.YAMLError as exc:
logging.error("Error loading YAML file: %s", exc)
raise
def output_filename(name, date, initials):
return f"{name}_{date}_{initials}.h5"
output_filename = lambda name, datetime, initials: '_'.join([name,datetime,initials])+'.h5'
exp_campaign_name = config_dict['experiment_name']
initials = config_dict['user_name']
input_file_dir = config_dict['input_file_directory']
output_dir = config_dict['output_file_directory']
select_dir_keywords = config_dict['instrument_datafolder']
root_metadata = {'project_name' : config_dict['project_name'],
'experiment_name' : config_dict['experiment_name'],
'user_name' : config_dict['user_name'],
}
root_metadata = {
'project_name' : config_dict['project_name'],
'experiment_name' : config_dict['experiment_name'],
'user_name' : config_dict['user_name'],
}
if config_dict['datetime_steps']: