MCPcopy Index your code
hub / github.com/DeepLabCut/DeepLabCut / copy_project_for_test

Function copy_project_for_test

examples/utils.py:327–339  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

325
326
327def copy_project_for_test() -> Path:
328 data_path = Path.cwd() / "openfield-Pranav-2018-10-30"
329 test_path = Path.cwd() / "pytorch-testscript1234-openfield-Pranav-2018-10-30"
330 if not test_path.exists():
331 shutil.copytree(data_path, test_path)
332
333 project_config = af.read_config(str(test_path / "config.yaml"))
334 videos = list(project_config["video_sets"].keys())
335 video = videos[0]
336 crop = project_config["video_sets"][video]
337 project_config["video_sets"] = {str(test_path / "videos" / "m3v1mp4.mp4"): crop}
338 af.write_config(str(test_path / "config.yaml"), project_config)
339 return test_path
340
341
342def run(

Callers 1

mainFunction · 0.90

Calls 3

keysMethod · 0.80
read_configMethod · 0.45
write_configMethod · 0.45

Tested by 1

mainFunction · 0.72