Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
Fernandez Vilanova, Lucas committed Sep 5, 2024
1 parent d15f7d3 commit 8624447
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion aiida_flexpart/parsers/inversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
6 changes: 2 additions & 4 deletions aiida_flexpart/workflows/inspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
}
)

Expand All @@ -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,
Expand All @@ -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)

0 comments on commit 8624447

Please sign in to comment.