diff --git a/dvc/dependency/gs.py b/dvc/dependency/gs.py index ebe398486..60f44433e 100644 --- a/dvc/dependency/gs.py +++ b/dvc/dependency/gs.py @@ -15,7 +15,7 @@ class DependencyGS(DependencyS3): def __init__(self, stage, path, info=None): super(DependencyGS, self).__init__(stage, path) self.info = info - self.remote = RemoteGS(stage.project, {Config.SECTION_REMOTE_URL: '/'}) + self.remote = RemoteGS(stage.project, {}) self.path_info = {'scheme': 'gs', 'bucket': urlparse(path).netloc, 'key': urlparse(path).path.lstrip('/')} diff --git a/dvc/dependency/local.py b/dvc/dependency/local.py index 56dc4bc9f..999497aba 100644 --- a/dvc/dependency/local.py +++ b/dvc/dependency/local.py @@ -25,8 +25,7 @@ class DependencyLOCAL(DependencyBase): path = os.path.join(stage.cwd, path) self.path = os.path.normpath(path) self.info = info - self.remote = RemoteLOCAL(stage.project, - {Config.SECTION_REMOTE_URL: self.project.dvc_dir}) + self.remote = RemoteLOCAL(stage.project, {}) self.path_info = {'scheme': 'local', 'path': self.path} diff --git a/dvc/dependency/s3.py b/dvc/dependency/s3.py index 78beb4c89..fd5babc65 100644 --- a/dvc/dependency/s3.py +++ b/dvc/dependency/s3.py @@ -15,7 +15,7 @@ class DependencyS3(DependencyBase): def __init__(self, stage, path, info=None): super(DependencyS3, self).__init__(stage, path) self.info = info - self.remote = RemoteS3(stage.project, {Config.SECTION_REMOTE_URL: '/'}) + self.remote = RemoteS3(stage.project, {}) self.path_info = {'scheme': 's3', 'bucket': urlparse(path).netloc, 'key': urlparse(path).path.lstrip('/')} diff --git a/dvc/remote/gs.py b/dvc/remote/gs.py index c70df703a..a1dd53793 100644 --- a/dvc/remote/gs.py +++ b/dvc/remote/gs.py @@ -16,7 +16,7 @@ class RemoteGS(RemoteBase): def __init__(self, project, config): self.project = project - self.url = config[Config.SECTION_REMOTE_URL] + self.url = config.get(Config.SECTION_REMOTE_URL, '/') self.projectname = config.get(Config.SECTION_GCP_PROJECTNAME, None) @property diff --git a/dvc/remote/local.py b/dvc/remote/local.py index 9c98d493a..586aded08 100644 --- a/dvc/remote/local.py +++ b/dvc/remote/local.py @@ -26,7 +26,7 @@ class RemoteLOCAL(RemoteBase): def __init__(self, project, config): self.project = project self.link_state = project.link_state - self.cache_dir = config[Config.SECTION_REMOTE_URL] + self.cache_dir = config.get(Config.SECTION_REMOTE_URL, os.path.abspath(os.sep)) self.cache_type = config.get(Config.SECTION_CACHE_TYPE, None) if not os.path.exists(self.cache_dir): diff --git a/dvc/remote/s3.py b/dvc/remote/s3.py index cfc9cb2ac..3d33bf0dd 100644 --- a/dvc/remote/s3.py +++ b/dvc/remote/s3.py @@ -16,7 +16,7 @@ class RemoteS3(RemoteBase): def __init__(self, project, config): self.project = project - self.url = config[Config.SECTION_REMOTE_URL] + self.url = config.get(Config.SECTION_REMOTE_URL, '/') self.region = config.get(Config.SECTION_AWS_REGION, None) self.profile = config.get(Config.SECTION_AWS_PROFILE, None) self.credentialpath = config.get(Config.SECTION_AWS_CREDENTIALPATH, None)