mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
remote: add WebDAV dependency (#4690)
This adds the dependency for WebDAV and enables calls like `import-url remote://some-webdav/data` Related to #4374
This commit is contained in:
@@ -11,6 +11,8 @@ from dvc.dependency.local import LocalDependency
|
||||
from dvc.dependency.param import ParamsDependency
|
||||
from dvc.dependency.s3 import S3Dependency
|
||||
from dvc.dependency.ssh import SSHDependency
|
||||
from dvc.dependency.webdav import WebDAVDependency
|
||||
from dvc.dependency.webdavs import WebDAVSDependency
|
||||
from dvc.output.base import BaseOutput
|
||||
from dvc.scheme import Schemes
|
||||
|
||||
@@ -25,6 +27,8 @@ DEPS = [
|
||||
HTTPSDependency,
|
||||
S3Dependency,
|
||||
SSHDependency,
|
||||
WebDAVDependency,
|
||||
WebDAVSDependency
|
||||
# NOTE: LocalDependency is the default choice
|
||||
]
|
||||
|
||||
@@ -37,6 +41,8 @@ DEP_MAP = {
|
||||
Schemes.HDFS: HDFSDependency,
|
||||
Schemes.HTTP: HTTPDependency,
|
||||
Schemes.HTTPS: HTTPSDependency,
|
||||
Schemes.WEBDAV: WebDAVDependency,
|
||||
Schemes.WEBDAVS: WebDAVSDependency,
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
from dvc.dependency.base import BaseDependency
|
||||
from dvc.output.base import BaseOutput
|
||||
|
||||
from ..tree.webdav import WebDAVTree
|
||||
|
||||
|
||||
class WebDAVDependency(BaseDependency, BaseOutput):
|
||||
TREE_CLS = WebDAVTree
|
||||
@@ -0,0 +1,6 @@
|
||||
from ..tree.webdavs import WebDAVSTree
|
||||
from .webdav import WebDAVDependency
|
||||
|
||||
|
||||
class WebDAVSDependency(WebDAVDependency):
|
||||
TREE_CLS = WebDAVSTree
|
||||
@@ -0,0 +1,7 @@
|
||||
from dvc.dependency.webdav import WebDAVDependency
|
||||
from tests.unit.dependency.test_local import TestLocalDependency
|
||||
|
||||
|
||||
class TestWebDAVDependency(TestLocalDependency):
|
||||
def _get_cls(self):
|
||||
return WebDAVDependency
|
||||
Reference in New Issue
Block a user