mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-09 07:18:27 +01:00
remote: use default urls
Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
@@ -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('/')}
|
||||
|
||||
@@ -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}
|
||||
|
||||
|
||||
@@ -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
@@ -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
@@ -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
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user