From c70caed2cdc5d61098f1416c3f07680145c70ee0 Mon Sep 17 00:00:00 2001 From: asewnath Date: Tue, 8 Oct 2024 14:27:54 -0400 Subject: [PATCH] testing --- src/eva/eva_driver.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/eva/eva_driver.py b/src/eva/eva_driver.py index 2a9dec9..d092762 100644 --- a/src/eva/eva_driver.py +++ b/src/eva/eva_driver.py @@ -153,11 +153,12 @@ def read_transform_time_series(logger, timing, eva_dict, data_collections): # Save transforms to transform_dict based on collection transform_dict = defaultdict(list) - for transform in get(eva_dict, logger, 'transforms'): - # Get collection name - name = transform['new name'].split('::')[0] - if name == time_series_config['collection']: - transform_dict['transforms'].append(transform) + if 'transforms' in eva_dict: + for transform in get(eva_dict, logger, 'transforms'): + # Get collection name + name = transform['new name'].split('::')[0] + if name == time_series_config['collection']: + transform_dict['transforms'].append(transform) # Assert that datasets_config is the same length as dates logger.assert_abort(len(datasets_config) == len(dates), 'When running in time ' + @@ -177,7 +178,7 @@ def read_transform_time_series(logger, timing, eva_dict, data_collections): timing.stop('DataDriverExecute') # Perform any transforms on the fly - if 'transforms' in transform_dict: + if transform_dict: logger.info(f'Running transform driver') timing.start('TransformDriverExecute') transform_driver(transform_dict, data_collections_tmp, timing, logger)