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

Function run_copy

dvc/testing/fixtures.py:256–269  ·  view source on GitHub ↗
(tmp_dir, copy_script, dvc)

Source from the content-addressed store, hash-verified

254
255@pytest.fixture
256def run_copy(tmp_dir, copy_script, dvc): # noqa: ARG001
257 def run_copy(src, dst, **run_kwargs):
258 wdir = pathlib.Path(run_kwargs.get("wdir", "."))
259 wdir = pathlib.Path("../" * len(wdir.parts))
260 script_path = wdir / "copy.py"
261
262 return dvc.run(
263 cmd=f"python {script_path} {src} {dst}",
264 outs=[dst],
265 deps=[src, f"{script_path}"],
266 **run_kwargs,
267 )
268
269 return run_copy

Calls 2

getMethod · 0.45
runMethod · 0.45