diff --git a/dvc/fs/__init__.py b/dvc/fs/__init__.py index 012dd69167..93233e289b 100644 --- a/dvc/fs/__init__.py +++ b/dvc/fs/__init__.py @@ -1,26 +1,16 @@ from urllib.parse import urlparse +from dvc_http import HTTPFileSystem, HTTPSFileSystem # noqa: F401 + # pylint: disable=unused-import from dvc_objects.fs import utils # noqa: F401 from dvc_objects.fs import ( # noqa: F401 - FS_MAP, - AzureFileSystem, - GDriveFileSystem, - GSFileSystem, - HDFSFileSystem, - HTTPFileSystem, - HTTPSFileSystem, LocalFileSystem, MemoryFileSystem, - OSSFileSystem, - S3FileSystem, Schemes, - SSHFileSystem, - WebDAVFileSystem, - WebDAVSFileSystem, - WebHDFSFileSystem, generic, get_fs_cls, + registry, system, ) from dvc_objects.fs.base import AnyFSPath, FileSystem # noqa: F401 @@ -30,10 +20,26 @@ RemoteMissingDepsError, ) from dvc_objects.fs.implementations.azure import AzureAuthError # noqa: F401 +from dvc_objects.fs.implementations.azure import AzureFileSystem # noqa: F401 +from dvc_objects.fs.implementations.gdrive import ( # noqa: F401 + GDriveFileSystem, +) +from dvc_objects.fs.implementations.gs import GSFileSystem # noqa: F401 +from dvc_objects.fs.implementations.hdfs import HDFSFileSystem # noqa: F401 from dvc_objects.fs.implementations.local import localfs # noqa: F401 +from dvc_objects.fs.implementations.oss import OSSFileSystem # noqa: F401 +from dvc_objects.fs.implementations.s3 import S3FileSystem # noqa: F401 from dvc_objects.fs.implementations.ssh import ( # noqa: F401 DEFAULT_PORT as DEFAULT_SSH_PORT, ) +from dvc_objects.fs.implementations.ssh import SSHFileSystem # noqa: F401 +from dvc_objects.fs.implementations.webdav import ( # noqa: F401 + WebDAVFileSystem, + WebDAVSFileSystem, +) +from dvc_objects.fs.implementations.webhdfs import ( # noqa: F401 + WebHDFSFileSystem, +) from dvc_objects.fs.path import Path # noqa: F401 from .data import DataFileSystem # noqa: F401 diff --git a/dvc/info.py b/dvc/info.py index 0e65904ff0..778f194b57 100644 --- a/dvc/info.py +++ b/dvc/info.py @@ -8,7 +8,7 @@ from dvc import __version__ from dvc.exceptions import NotDvcRepoError -from dvc.fs import FS_MAP, generic, get_fs_cls, get_fs_config +from dvc.fs import Schemes, generic, get_fs_cls, get_fs_config, registry from dvc.repo import Repo from dvc.scm import SCMError from dvc.utils import error_link @@ -90,7 +90,11 @@ def _get_linktype_support_info(repo): def _get_supported_remotes(): supported_remotes = [] - for scheme, fs_cls in FS_MAP.items(): + for scheme in registry: + if scheme in [Schemes.LOCAL, Schemes.MEMORY]: + continue + + fs_cls = registry[scheme] if not fs_cls.get_missing_deps(): dependencies = [] for requirement in fs_cls.REQUIRES: diff --git a/setup.cfg b/setup.cfg index bfe84c9ef4..69cd698829 100644 --- a/setup.cfg +++ b/setup.cfg @@ -68,7 +68,8 @@ install_requires = dvc-render==0.0.9 dvc-task==0.1.2 dvclive>=0.10.0 - dvc-data==0.1.15 + dvc-data==0.1.16 + dvc-http==0.0.1 hydra-core>=1.1.0 [options.extras_require] diff --git a/tests/unit/test_info.py b/tests/unit/test_info.py index 9369e99abb..1e66c474b1 100644 --- a/tests/unit/test_info.py +++ b/tests/unit/test_info.py @@ -141,10 +141,10 @@ def test_fs_info_outside_of_repo(tmp_dir, caplog): def test_plugin_versions(tmp_dir, dvc): - from dvc.fs import FS_MAP + from dvc.fs import registry dvc_info = get_dvc_info() remotes = find_supported_remotes(dvc_info) for remote, dependencies in remotes.items(): - assert dependencies.keys() == FS_MAP[remote].REQUIRES.keys() + assert dependencies.keys() == registry[remote].REQUIRES.keys()