From a3ab70b91c3a527461fc915f4888a4ccbe158180 Mon Sep 17 00:00:00 2001 From: Casey Jao Date: Fri, 14 Jul 2023 09:31:58 -0400 Subject: [PATCH] Mem (1/3): defer copy_file_locally to next PR --- covalent/_shared_files/utils.py | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/covalent/_shared_files/utils.py b/covalent/_shared_files/utils.py index d9d100fb9..a342346c6 100644 --- a/covalent/_shared_files/utils.py +++ b/covalent/_shared_files/utils.py @@ -21,7 +21,6 @@ """General utils for Covalent.""" import inspect -import shutil import socket from datetime import timedelta from typing import Callable, Dict, Set, Tuple @@ -241,20 +240,3 @@ def format_server_url(hostname: str = None, port: int = None) -> str: url = "".join(["/".join(parts[:3])] + [f":{port}/"] + ["/".join(parts[3:])]) return url.strip("/") - - -# For use by LocalDispatcher and ResultsManager when running Covalent -# server locally -def copy_file_locally(src_uri, dest_uri): - scheme_prefix = "file://" - if src_uri.startswith(scheme_prefix): - src_path = src_uri[len(scheme_prefix) :] - else: - raise TypeError(f"{src_uri} is not a valid URI") - # src_path = src_uri - if dest_uri.startswith(scheme_prefix): - dest_path = dest_uri[len(scheme_prefix) :] - else: - raise TypeError(f"{dest_uri} is not a valid URI") - - shutil.copyfile(src_path, dest_path)