mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-11 15:28:27 +01:00
* remote: HTTP implemented (support only for downloading) * Remove duplicated content in the schema * Chomp trailing spaces in test_remote * remote http: Implement pull/fetch * add some tests * Update dvc/remote/http.py Co-Authored-By: mroutis <[email protected]> * Update dvc/remote/http.py Co-Authored-By: mroutis <[email protected]> * correct test * rehprase error message * add __init__ for utils * try to fix windows test
34 lines
792 B
Python
34 lines
792 B
Python
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
|
|
|
|
from dvc.config import Config
|
|
from dvc.exceptions import UnsupportedRemoteError
|
|
|
|
|
|
REMOTES = [
|
|
RemoteAzure,
|
|
RemoteGS,
|
|
RemoteHDFS,
|
|
RemoteHTTP,
|
|
RemoteLOCAL,
|
|
RemoteS3,
|
|
RemoteSSH,
|
|
]
|
|
|
|
|
|
def supported_url(url):
|
|
config = {Config.SECTION_REMOTE_URL: url}
|
|
return any(remote.supported(config) for remote in REMOTES)
|
|
|
|
|
|
def Remote(project, config):
|
|
for remote in REMOTES:
|
|
if remote.supported(config):
|
|
return remote(project, config)
|
|
raise UnsupportedRemoteError(str(config))
|