From 4951f968d10c649403213c1dda465f1cd34f4a9d Mon Sep 17 00:00:00 2001 From: Baudouin Raoult Date: Wed, 14 Feb 2024 14:06:24 +0000 Subject: [PATCH] fix constants --- ecml_tools/create/functions/constants.py | 10 +++++----- ecml_tools/create/loaders.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ecml_tools/create/functions/constants.py b/ecml_tools/create/functions/constants.py index 505f633..7cea840 100644 --- a/ecml_tools/create/functions/constants.py +++ b/ecml_tools/create/functions/constants.py @@ -50,13 +50,13 @@ def normalise_time_to_hours(r): return r -def constants(context, dates, request, **kwargs): - to_list(request["param"]) +def constants(dates, param, **kwargs): - template = get_template_field(request) - print(f"✅ load_source(constants, {template}, {request}") - return load_source("constants", source_or_dataset=template, **request) + template = get_template_field(kwargs) + + print(f"✅ load_source(constants, {template}, {kwargs}") + return load_source("constants", source_or_dataset=template, date=dates, param=param) execute = constants diff --git a/ecml_tools/create/loaders.py b/ecml_tools/create/loaders.py index a2e6969..c5a90c3 100644 --- a/ecml_tools/create/loaders.py +++ b/ecml_tools/create/loaders.py @@ -146,7 +146,7 @@ def __init__(self, config, **kwargs): self.groups = build_groups(*self.main_config.loop) print("✅ GROUPS") - print(self.groups, self.main_config.loop) + # print(self.groups, self.main_config.loop) self.output = build_output(self.main_config.output, parent=self) self.input = self.build_input()