From 40e0111e348a5f0bfe42e2a0738476c5085d9809 Mon Sep 17 00:00:00 2001 From: maany Date: Thu, 21 Nov 2024 16:45:50 +0100 Subject: [PATCH] dataset_evalscripts -> datasets_evalscripts --- climate_augmentation.py | 8 ++++---- sentinel_5p_time_travel.py | 8 ++++---- sentinel_scraper.py | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/climate_augmentation.py b/climate_augmentation.py index c49afe7..692d953 100644 --- a/climate_augmentation.py +++ b/climate_augmentation.py @@ -18,7 +18,7 @@ def main( lat_down: float, long_right: float, lat_up: float, - dataset_evalscripts: dict[str,list[str]], + datasets_evalscripts: dict[str,list[str]], kp_host: str, kp_port: int, kp_auth_token: str, @@ -48,14 +48,14 @@ def main( logger.info(f"String variables validated successfully!") final_dataset_evalscripts = {} - dataset_names = dataset_evalscripts.keys() + dataset_names = datasets_evalscripts.keys() for dataset_name in dataset_names: if dataset_name not in SUPPORTED_DATASET_EVALSCRIPTS.keys(): logger.error( f"Dataset {dataset_name} not supported. Use one of {SUPPORTED_DATASET_EVALSCRIPTS.keys()}" ) sys.exit(1) - requested_evalscripts = dataset_evalscripts[dataset_name] + requested_evalscripts = datasets_evalscripts[dataset_name] supported_evalscripts = [x['name'] for x in SUPPORTED_DATASET_EVALSCRIPTS[dataset_name]["supported_evalscripts"]] for evalscript in requested_evalscripts: if evalscript not in supported_evalscripts: @@ -232,7 +232,7 @@ def main( lat_down=args.lat_down, long_right=args.long_right, lat_up=args.lat_up, - dataset_evalscripts=args.datasets_evalscripts, + datasets_evalscripts=args.datasets_evalscripts, kp_host=args.kp_host, kp_port=args.kp_port, kp_auth_token=args.kp_auth_token, diff --git a/sentinel_5p_time_travel.py b/sentinel_5p_time_travel.py index 7a84ba9..b42dc2b 100644 --- a/sentinel_5p_time_travel.py +++ b/sentinel_5p_time_travel.py @@ -17,7 +17,7 @@ def main( lat_down: float, long_right: float, lat_up: float, - dataset_evalscripts: dict[str,list[str]], + datasets_evalscripts: dict[str,list[str]], kp_host: str, kp_port: int, kp_auth_token: str, @@ -47,14 +47,14 @@ def main( logger.info(f"String variables validated successfully!") final_dataset_evalscripts = {} - dataset_names = dataset_evalscripts.keys() + dataset_names = datasets_evalscripts.keys() for dataset_name in dataset_names: if dataset_name not in SUPPORTED_DATASET_EVALSCRIPTS.keys(): logger.error( f"Dataset {dataset_name} not supported. Use one of {SUPPORTED_DATASET_EVALSCRIPTS.keys()}" ) sys.exit(1) - requested_evalscripts = dataset_evalscripts[dataset_name] + requested_evalscripts = datasets_evalscripts[dataset_name] supported_evalscripts = [x['name'] for x in SUPPORTED_DATASET_EVALSCRIPTS[dataset_name]["supported_evalscripts"]] for evalscript in requested_evalscripts: if evalscript not in supported_evalscripts: @@ -218,7 +218,7 @@ def main( lat_down=args.lat_down, long_right=args.long_right, lat_up=args.lat_up, - dataset_evalscripts=args.datasets_evalscripts, + datasets_evalscripts=args.datasets_evalscripts, kp_host=args.kp_host, kp_port=args.kp_port, kp_auth_token=args.kp_auth_token, diff --git a/sentinel_scraper.py b/sentinel_scraper.py index 96dac13..2485631 100644 --- a/sentinel_scraper.py +++ b/sentinel_scraper.py @@ -21,7 +21,7 @@ def main( start_date: str, end_date: str, interval: int, - dataset_evalscripts: dict[str,list[str]], + datasets_evalscripts: dict[str,list[str]], resolution: int, sentinel_client_id: str, sentinel_client_secret: str, @@ -54,14 +54,14 @@ def main( logger.info(f"String variables validated successfully!") final_datasaet_evalscripts = {} - dataset_names = dataset_evalscripts.keys() + dataset_names = datasets_evalscripts.keys() for dataset_name in dataset_names: if dataset_name not in SUPPORTED_DATASET_EVALSCRIPTS.keys(): logger.error( f"Dataset {dataset_name} not supported. Use one of {SUPPORTED_DATASET_EVALSCRIPTS.keys()}" ) sys.exit(1) - requested_evalscripts = dataset_evalscripts[dataset_name] + requested_evalscripts = datasets_evalscripts[dataset_name] supported_evalscripts = [x['name'] for x in SUPPORTED_DATASET_EVALSCRIPTS[dataset_name]["supported_evalscripts"]] for evalscript in requested_evalscripts: if evalscript not in supported_evalscripts: @@ -283,7 +283,7 @@ def main( start_date=args.start_date, end_date=args.end_date, interval=args.interval, - dataset_evalscripts=args.datasets_evalscripts, + datasets_evalscripts=args.datasets_evalscripts, resolution=args.resolution, sentinel_client_id=args.sentinel_client_id, sentinel_client_secret=args.sentinel_client_secret,