diff --git a/environment.yml b/environment.yml index b16b2892e..39f9cbbfa 100644 --- a/environment.yml +++ b/environment.yml @@ -8,7 +8,7 @@ dependencies: - python~=3.9 - alembic~=1.2 - archive-path~=0.4.2 -- asyncssh@ git+https://github.com/ronf/asyncssh.git@033ef54302b2b09d496d68ccf39778b9e5fc89e2#egg=asyncssh +- asyncssh - circus~=0.18.0 - click-spinner~=0.1.8 - click~=8.1 @@ -23,7 +23,7 @@ dependencies: - importlib-metadata~=6.0 - numpy~=1.21 - paramiko~=3.0 -- plumpy@ git+https://github.com/aiidateam/plumpy.git@async-run#egg=plumpy +- plumpy - pgsu~=0.3.0 - psutil~=5.6 - psycopg[binary]~=3.0 diff --git a/pyproject.toml b/pyproject.toml index 3b4ed0539..e6ff19f24 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,7 +47,7 @@ dependencies = [ 'tabulate>=0.8.0,<0.10.0', 'tqdm~=4.45', 'upf_to_json~=0.9.2', - 'wrapt~=1.11', + 'wrapt~=1.11' ] description = 'AiiDA is a workflow manager for computational science with a strong focus on provenance, performance and extensibility.' dynamic = ['version'] # read from aiida/__init__.py @@ -513,5 +513,5 @@ commands = molecule {posargs:test} """ [tool.uv.sources] -plumpy = { git = "https://github.com/aiidateam/plumpy", branch = "async-run" } -asyncssh = { git = "https://github.com/ronf/asyncssh", rev = "033ef54302b2b09d496d68ccf39778b9e5fc89e2" } +asyncssh = {git = "https://github.com/ronf/asyncssh", rev = "033ef54302b2b09d496d68ccf39778b9e5fc89e2"} +plumpy = {git = "https://github.com/aiidateam/plumpy", branch = "async-run"} diff --git a/src/aiida/transports/plugins/ssh_async.py b/src/aiida/transports/plugins/ssh_async.py index 6faace2e0..775a9d36f 100644 --- a/src/aiida/transports/plugins/ssh_async.py +++ b/src/aiida/transports/plugins/ssh_async.py @@ -655,7 +655,9 @@ async def _exec_cp(cp_exe: str, cp_flags: str, src: str, dst: str): to_copy_list = await self.glob_async(remotesource) if len(to_copy_list) > 1: - if not self.path_exists(remotedestination) or self.isfile(remotedestination): + if not await self.path_exists_async(remotedestination) or await self.isfile_async( + remotedestination + ): raise OSError("Can't copy more than one file in the same destination file") for file in to_copy_list: @@ -718,22 +720,26 @@ async def exec_command_wait_async( stdin: Optional[str] = None, encoding: str = 'utf-8', workdir: Optional[TransportPath] = None, - timeout: Optional[float] = 2, + timeout: Optional[float] = None, **kwargs, ): """Execute a command on the remote machine and wait for it to finish. :param command: the command to execute :param stdin: the input to pass to the command + Default = None :param encoding: (IGNORED) this is here just to keep the same signature as the one in `Transport` class + Default = 'utf-8' :param workdir: the working directory where to execute the command + Default = None :param timeout: the timeout in seconds + Default = None :type command: str :type stdin: str :type encoding: str - :type workdir: Union[TransportPath, None] - :type timeout: float + :type workdir: Optional[TransportPath] + :type timeout: Optional[float] :return: a tuple with the return code, the stdout and the stderr of the command :rtype: tuple(int, str, str)