From 120eb09c4d607f20483e3ed9d94ef287b17b6151 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Saugat=20Pachhai=20=28=E0=A4=B8=E0=A5=8C=E0=A4=97=E0=A4=BE?= =?UTF-8?q?=E0=A4=A4=29?= Date: Tue, 17 May 2022 16:26:13 +0545 Subject: [PATCH] fs: move GitFileSystem out of dvc.objects.fs This is more of a DVC thing than objects. --- dvc/fs/__init__.py | 5 ++++- dvc/{objects/fs/implementations => fs}/git.py | 2 +- dvc/objects/fs/__init__.py | 1 - 3 files changed, 5 insertions(+), 3 deletions(-) rename dvc/{objects/fs/implementations => fs}/git.py (97%) diff --git a/dvc/fs/__init__.py b/dvc/fs/__init__.py index 6f6f3ed99..98e66fbd6 100644 --- a/dvc/fs/__init__.py +++ b/dvc/fs/__init__.py @@ -4,7 +4,6 @@ from dvc.objects.fs import ( # noqa: F401 FS_MAP, AzureFileSystem, GDriveFileSystem, - GitFileSystem, GSFileSystem, HDFSFileSystem, HTTPFileSystem, @@ -37,4 +36,8 @@ from dvc.objects.fs.implementations.ssh import ( # noqa: F401 ) from dvc.objects.fs.path import Path # noqa: F401 +from .data import DataFileSystem # noqa: F401 +from .dvc import DvcFileSystem # noqa: F401 +from .git import GitFileSystem # noqa: F401 + # pylint: enable=unused-import diff --git a/dvc/objects/fs/implementations/git.py b/dvc/fs/git.py similarity index 97% rename from dvc/objects/fs/implementations/git.py rename to dvc/fs/git.py index cb2cd85bb..281aa2f66 100644 --- a/dvc/objects/fs/implementations/git.py +++ b/dvc/fs/git.py @@ -3,7 +3,7 @@ from typing import TYPE_CHECKING, Any from funcy import cached_property, wrap_prop -from ..base import FileSystem +from . import FileSystem if TYPE_CHECKING: from scmrepo.fs import GitFileSystem as FsspecGitFileSystem diff --git a/dvc/objects/fs/__init__.py b/dvc/objects/fs/__init__.py index 4cb5384cc..bc0dfd56e 100644 --- a/dvc/objects/fs/__init__.py +++ b/dvc/objects/fs/__init__.py @@ -5,7 +5,6 @@ from dvc.scheme import Schemes from . import generic # noqa: F401 from .implementations.azure import AzureFileSystem from .implementations.gdrive import GDriveFileSystem -from .implementations.git import GitFileSystem # noqa: F401 from .implementations.gs import GSFileSystem from .implementations.hdfs import HDFSFileSystem from .implementations.http import HTTPFileSystem