Skip to content

Commit 8a9e7d4

Browse files
committed
Fix usage of RemoteData in arguments
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.
1 parent 189df63 commit 8a9e7d4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/aiida_shell/calculations/shell.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ def process_arguments_and_nodes(
407407
self.write_folder_data(node, dirpath, filename)
408408
argument_interpolated = argument.format(**{placeholder: filename or placeholder})
409409
elif isinstance(node, RemoteData):
410-
self.handle_remote_data(node)
410+
argument_interpolated = argument.format(**{placeholder: node.get_remote_path()})
411411
else:
412412
argument_interpolated = argument.format(**{placeholder: str(node.value)})
413413

tests/test_launch.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,11 @@ def test_nodes_remote_data(tmp_path, aiida_localhost, use_symlinks):
140140
(dirpath_sub_filled / 'file_b.txt').write_text('content b')
141141

142142
# Create a ``RemoteData`` node of the ``archive`` directory which should contain only the ``archive.zip`` file.
143-
remote_data = RemoteData(remote_path=str(dirpath_archive), computer=aiida_localhost)
143+
remote_data = RemoteData(remote_path=str(dirpath_archive / 'archive'), computer=aiida_localhost)
144144

145145
results, node = launch_shell_job(
146146
'unzip',
147-
arguments=['archive.zip'],
147+
arguments=['{remote}'],
148148
nodes={'remote': remote_data},
149149
outputs=['file_a.txt'],
150150
metadata={

0 commit comments

Comments
 (0)