| 325 | |
| 326 | |
| 327 | def 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 | |
| 342 | def run( |