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

Method get_remote_odb

dvc/data_cloud.py:126–141  ·  view source on GitHub ↗
(
        self,
        name: Optional[str] = None,
        command: str = "<command>",
        hash_name: str = "md5",
    )

Source from the content-addressed store, hash-verified

124 raise NoRemoteError(error_msg)
125
126 def get_remote_odb(
127 self,
128 name: Optional[str] = None,
129 command: str = "<command>",
130 hash_name: str = "md5",
131 ) -> "HashFileDB":
132 from dvc.cachemgr import LEGACY_HASH_NAMES
133
134 remote = self.get_remote(name=name, command=command)
135 if remote.fs.version_aware or remote.worktree:
136 raise RemoteConfigError(
137 f"'{command}' is unsupported for cloud versioned remotes"
138 )
139 if hash_name in LEGACY_HASH_NAMES:
140 return remote.legacy_odb
141 return remote.odb
142
143 def _log_missing(self, status: "CompareStatusResult"):
144 if status.missing:

Callers 15

pushMethod · 0.95
pullMethod · 0.95
statusMethod · 0.95
get_url_forMethod · 0.95
get_used_objsMethod · 0.80
imp_urlFunction · 0.80
_merge_remote_obj_idsFunction · 0.80
_add_transferFunction · 0.80
_validate_remotesMethod · 0.80
pushMethod · 0.80
pullMethod · 0.80
_update_import_on_remoteFunction · 0.80

Calls 2

get_remoteMethod · 0.95
RemoteConfigErrorClass · 0.90

Tested by 11

test_pull_00_prefixMethod · 0.64
test_partial_push_n_pullFunction · 0.64
test_push_orderFunction · 0.64
test_push_incomplete_dirFunction · 0.64
test_output_remoteFunction · 0.64
test_target_remoteFunction · 0.64
indexFunction · 0.64
test_partial_uploadFunction · 0.64