From 8624447035785c86d439917b79c35f6e38dd2862 Mon Sep 17 00:00:00 2001 From: "Fernandez Vilanova, Lucas" Date: Thu, 5 Sep 2024 09:21:50 +0000 Subject: [PATCH] bugfix --- aiida_flexpart/parsers/inversion.py | 2 +- aiida_flexpart/workflows/inspect.py | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/aiida_flexpart/parsers/inversion.py b/aiida_flexpart/parsers/inversion.py index d5b1a55..ec36308 100644 --- a/aiida_flexpart/parsers/inversion.py +++ b/aiida_flexpart/parsers/inversion.py @@ -52,7 +52,7 @@ def parse(self, **kwargs): with self.retrieved.open(output_filename, 'r') as handle: content = handle.read() output_node = SinglefileData(file=handle) - if 'CONGRATULATIONS' not in content: + if 'Congratulations' not in content: self.out('output_file', output_node) return ExitCode(1) diff --git a/aiida_flexpart/workflows/inspect.py b/aiida_flexpart/workflows/inspect.py index 7b17e97..ebef0d7 100644 --- a/aiida_flexpart/workflows/inspect.py +++ b/aiida_flexpart/workflows/inspect.py @@ -27,7 +27,7 @@ def check(nc_file, version): return True @calcfunction -def store(remote_dir, file, time_label, nc_type): +def store(remote_dir, file, time_label): with tempfile.TemporaryDirectory() as td: remote_path = Path(remote_dir.get_remote_path()) / file.value temp_path = Path(td) / file.value @@ -48,7 +48,6 @@ def store(remote_dir, file, time_label, nc_type): nc_dimensions=nc_dimensions, other = { 'time_label' : time_label.value, - 'nc_type' : nc_type.value } ) @@ -73,7 +72,6 @@ def define(cls, spec): "remotes_cs", valid_type=orm.RemoteStashFolderData, required=False ) spec.input('time_label', valid_type=orm.Str, required=False) - spec.input('nc_type', valid_type=orm.Str, required=False) spec.outputs.dynamic = True spec.outline( cls.fill_remote_data, @@ -93,4 +91,4 @@ def inspect(self): for _, i in self.ctx.dict_remote_data.items(): for file in i.listdir(): if ".nc" in file: - store(i, file, self.inputs.time_label, self.inputs.nc_type) + store(i, file, self.inputs.time_label)