remote: use default urls

Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
Ruslan Kuprieiev
2018-06-09 01:09:44 +03:00
parent 6fe26a0bdc
commit fecc38e602
6 changed files with 6 additions and 7 deletions
+1 -1
View File
@@ -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('/')}
+1 -2
View File
@@ -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}
+1 -1
View File
@@ -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('/')}
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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):
+1 -1
View File
@@ -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)