Files
dvc/dvc/remote/__init__.py
T
Ruslan Kuprieiev ba8d83e9b1 dvc: refactor dvc project class
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]>
2019-02-13 03:31:23 +02:00

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)