Skip to content

Commit

Permalink
dataset_evalscripts -> datasets_evalscripts
Browse files Browse the repository at this point in the history
  • Loading branch information
maany committed Nov 21, 2024
1 parent c949a13 commit 40e0111
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions climate_augmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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,
Expand Down
8 changes: 4 additions & 4 deletions sentinel_5p_time_travel.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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,
Expand Down
8 changes: 4 additions & 4 deletions sentinel_scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 40e0111

Please sign in to comment.