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

Method update

dvc/repo/index.py:347–360  ·  view source on GitHub ↗
(self, stages: Iterable["Stage"])

Source from the content-addressed store, hash-verified

345 )
346
347 def update(self, stages: Iterable["Stage"]) -> "Self":
348 stages = set(stages)
349 # we remove existing stages with same hashes at first
350 # and then re-add the new ones later.
351 stages_set = (set(self.stages) - stages) | stages
352 return self.__class__(
353 self.repo,
354 stages=list(stages_set),
355 metrics=self._metrics,
356 plots=self._plots,
357 params=self._params,
358 artifacts=self._artifacts,
359 datasets=self._datasets,
360 )
361
362 @classmethod
363 def from_indexes(cls, repo, idxs: Iterable["Self"]) -> "Self":

Callers 15

loadMethod · 0.45
update_msgMethod · 0.45
update_toMethod · 0.45
collect_and_send_reportFunction · 0.45
sendFunction · 0.45
_merge_dataFunction · 0.45
__init__Method · 0.45
dumpdMethod · 0.45
applyMethod · 0.45
pushMethod · 0.45
pullMethod · 0.45

Calls

no outgoing calls

Tested by 15

test_import_fileMethod · 0.36
test_import_dirMethod · 0.36
test_updateMethod · 0.36
pytest_configureFunction · 0.36
_update_datapointsFunction · 0.36
test_update_importFunction · 0.36
test_update_unchangedFunction · 0.36
test_update_no_downloadFunction · 0.36
test_update_import_urlFunction · 0.36