mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-18 23:10:14 +01:00
1) split Project's methods into separate files; 2) rename Project into Repo(similar to gitpython's Repo) Signed-off-by: Ruslan Kuprieiev <[email protected]>
32 lines
654 B
Python
32 lines
654 B
Python
from __future__ import unicode_literals
|
|
|
|
from dvc.remote.azure import RemoteAzure
|
|
from dvc.remote.gs import RemoteGS
|
|
from dvc.remote.hdfs import RemoteHDFS
|
|
from dvc.remote.local import RemoteLOCAL
|
|
from dvc.remote.s3 import RemoteS3
|
|
from dvc.remote.ssh import RemoteSSH
|
|
from dvc.remote.http import RemoteHTTP
|
|
|
|
|
|
REMOTES = [
|
|
RemoteAzure,
|
|
RemoteGS,
|
|
RemoteHDFS,
|
|
RemoteHTTP,
|
|
RemoteS3,
|
|
RemoteSSH,
|
|
# NOTE: RemoteLOCAL is the default
|
|
]
|
|
|
|
|
|
def _get(config):
|
|
for remote in REMOTES:
|
|
if remote.supported(config):
|
|
return remote
|
|
return RemoteLOCAL
|
|
|
|
|
|
def Remote(repo, config):
|
|
return _get(config)(repo, config)
|