MCPcopy
hub / github.com/treeverse/dvc / DataFileSystem

Class DataFileSystem

dvc/fs/data.py:16–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14
15
16class DataFileSystem(FileSystem):
17 protocol = "local"
18
19 PARAM_CHECKSUM = "md5"
20
21 def _prepare_credentials(self, **config):
22 return config
23
24 @functools.cached_property
25 def fs(self) -> "_DataFileSystem":
26 from dvc_data.fs import DataFileSystem as _DataFileSystem
27
28 return _DataFileSystem(**self.fs_args)
29
30 def getcwd(self):
31 return self.fs.getcwd()
32
33 def isdvc(self, path, **kwargs):
34 return self.fs.isdvc(path, **kwargs)
35
36 def from_os_path(self, path):
37 if os.path.isabs(path):
38 path = os.path.splitdrive(path)[1]
39
40 return as_posix(path)

Callers 15

getFunction · 0.90
datafsMethod · 0.90
_openFunction · 0.90
test_get_keyFunction · 0.90
test_existsFunction · 0.90
test_openFunction · 0.90
test_open_dirty_hashFunction · 0.90
test_open_no_remoteFunction · 0.90
test_open_dirty_no_hashFunction · 0.90
test_open_in_historyFunction · 0.90
test_isdir_isfileFunction · 0.90
test_isdir_mixedFunction · 0.90

Calls

no outgoing calls

Tested by 15

test_get_keyFunction · 0.72
test_existsFunction · 0.72
test_openFunction · 0.72
test_open_dirty_hashFunction · 0.72
test_open_no_remoteFunction · 0.72
test_open_dirty_no_hashFunction · 0.72
test_open_in_historyFunction · 0.72
test_isdir_isfileFunction · 0.72
test_isdir_mixedFunction · 0.72
test_walkFunction · 0.72
test_walk_dirFunction · 0.72
test_walk_missingFunction · 0.72