Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring: use tmp path fixture to mock remote and local for transport plugins #6627

Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
766bcdd
Using tmp_path and mock the remote path using tmp_path_factory
unkcpz Nov 21, 2024
c626f75
test_dir_copy
unkcpz Nov 21, 2024
77e0074
more checkpoint
unkcpz Nov 21, 2024
5b6a82d
Seperate put/get and putfile/getfile
unkcpz Nov 21, 2024
c64bb05
Fix the exception type and docstring of local plugin
unkcpz Nov 21, 2024
f19067c
more checkpoints
unkcpz Nov 21, 2024
633d263
test_exec_pwd
unkcpz Nov 21, 2024
eedd390
test_transfer_big_stdout
unkcpz Nov 21, 2024
db72976
test_asynchronuos_execution
unkcpz Nov 21, 2024
f9792b8
checkpoint
unkcpz Nov 21, 2024
f9bfea9
test_copy
unkcpz Nov 21, 2024
58d2387
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 21, 2024
2266b1c
Merge branch 'main' into Remove-the-use-of-deprecated-tranport-method…
unkcpz Nov 22, 2024
eb6f979
test_put
unkcpz Nov 24, 2024
67d32cc
test_get
unkcpz Nov 24, 2024
31202e8
test_put_get_abs_path_tree
unkcpz Nov 24, 2024
3c1a702
Amend
unkcpz Nov 24, 2024
be69050
Merge branch 'main' into Remove-the-use-of-deprecated-tranport-method…
unkcpz Nov 25, 2024
3b79faf
remove mypy for tests
unkcpz Nov 25, 2024
6203a3b
all use specific fixture
unkcpz Nov 25, 2024
f4de64d
ra
unkcpz Nov 25, 2024
c7ea55b
Merge branch 'main' into Remove-the-use-of-deprecated-tranport-method…
unkcpz Nov 25, 2024
aae9525
Merge branch 'main' into Remove-the-use-of-deprecated-tranport-method…
unkcpz Nov 26, 2024
e1f0b22
Merge branch 'main' into Remove-the-use-of-deprecated-tranport-method…
unkcpz Nov 28, 2024
cd035ad
rali
unkcpz Nov 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/aiida/transports/plugins/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,15 +453,18 @@ def getfile(self, remotepath, localpath, *args, **kwargs):
"""Copies a file recursively from 'remote' remotepath to
'local' localpath.

:param remotepath: path to local file
:param localpath: absolute path to remote file
:param remotepath: absolute path to remote file
:param localpath: path to local file
:param overwrite: if True overwrites localpath.
Default = False

:raise OSError if 'remote' remotepath is not valid or not found
:raise ValueError: if 'local' localpath is not valid
:raise OSError: if unintentionally overwriting
"""
if not os.path.isabs(localpath):
raise ValueError('localpath must be an absolute path')

overwrite = kwargs.get('overwrite', args[0] if args else True)
if not localpath:
raise ValueError('Input localpath to get function must be a non empty string')
Expand Down
Loading
Loading