Skip to content

Commit

Permalink
Fix usage of RemoteData in arguments
Browse files Browse the repository at this point in the history
The tests did not cover the usage of `RemoteData` in the arguments which
did not cover the bug that `self.handle_remote_data` does not exist. We
translate the node by passing the path to the arguments.
  • Loading branch information
agoscinski committed Jan 16, 2025
1 parent 189df63 commit 29062ad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/aiida_shell/calculations/shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ def process_arguments_and_nodes(
self.write_folder_data(node, dirpath, filename)
argument_interpolated = argument.format(**{placeholder: filename or placeholder})
elif isinstance(node, RemoteData):
self.handle_remote_data(node)
argument_interpolated = argument.format(**{placeholder: node.get_remote_path()})
else:
argument_interpolated = argument.format(**{placeholder: str(node.value)})

Expand Down
2 changes: 1 addition & 1 deletion tests/test_launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def test_nodes_remote_data(tmp_path, aiida_localhost, use_symlinks):

results, node = launch_shell_job(
'unzip',
arguments=['archive.zip'],
arguments=['{archive}'],
nodes={'remote': remote_data},
outputs=['file_a.txt'],
metadata={
Expand Down

0 comments on commit 29062ad

Please sign in to comment.