|
11 | 11 | # test docker or singularity |
12 | 12 | DOCKER_SINGULARITY = "singularity" # "docker" |
13 | 13 |
|
| 14 | +def clean_singularity_cache(): |
| 15 | + print("Cleaning singularity cache") |
| 16 | + os.system("singularity cache clean --force") |
| 17 | + |
14 | 18 |
|
15 | 19 | def generate_run_kwargs(): |
16 | 20 | test_recording, _ = se.toy_example( |
@@ -54,45 +58,66 @@ def run_kwargs(work_dir): |
54 | 58 |
|
55 | 59 |
|
56 | 60 | def test_spykingcircus(run_kwargs): |
| 61 | + if DOCKER_SINGULARITY == "singularity": |
| 62 | + clean_singularity_cache() |
57 | 63 | sorting = ss.run_spykingcircus(output_folder="spykingcircus", **run_kwargs) |
58 | 64 | print(sorting) |
59 | 65 |
|
60 | 66 |
|
61 | 67 | def test_mountainsort4(run_kwargs): |
| 68 | + if DOCKER_SINGULARITY == "singularity": |
| 69 | + clean_singularity_cache() |
62 | 70 | sorting = ss.run_mountainsort4(output_folder="mountainsort4", **run_kwargs) |
63 | 71 | print(sorting) |
64 | 72 |
|
65 | 73 |
|
66 | 74 | def test_tridesclous(run_kwargs): |
| 75 | + if DOCKER_SINGULARITY == "singularity": |
| 76 | + clean_singularity_cache() |
67 | 77 | sorting = ss.run_tridesclous(output_folder="tridesclous", **run_kwargs) |
68 | 78 | print(sorting) |
69 | 79 |
|
70 | 80 |
|
71 | 81 | def test_klusta(run_kwargs): |
| 82 | + if DOCKER_SINGULARITY == "singularity": |
| 83 | + clean_singularity_cache() |
| 84 | + recording = run_kwargs["recording"] |
| 85 | + recording.extra_requirements.append("pandas") |
| 86 | + run_kwargs["recording"] = recording |
72 | 87 | sorting = ss.run_klusta(output_folder="klusta", **run_kwargs) |
73 | 88 | print(sorting) |
74 | 89 |
|
75 | 90 |
|
76 | 91 | def test_ironclust(run_kwargs): |
| 92 | + if DOCKER_SINGULARITY == "singularity": |
| 93 | + clean_singularity_cache() |
77 | 94 | sorting = ss.run_ironclust(output_folder="ironclust", fGpu=False, **run_kwargs) |
78 | 95 | print(sorting) |
79 | 96 |
|
80 | 97 |
|
81 | 98 | def test_waveclus(run_kwargs): |
| 99 | + if DOCKER_SINGULARITY == "singularity": |
| 100 | + clean_singularity_cache() |
82 | 101 | sorting = ss.run_waveclus(output_folder="waveclus", **run_kwargs) |
83 | 102 | print(sorting) |
84 | 103 |
|
85 | 104 |
|
86 | 105 | def test_hdsort(run_kwargs): |
| 106 | + if DOCKER_SINGULARITY == "singularity": |
| 107 | + clean_singularity_cache() |
87 | 108 | sorting = ss.run_hdsort(output_folder="hdsort", **run_kwargs) |
88 | 109 | print(sorting) |
89 | 110 |
|
90 | 111 |
|
91 | 112 | def test_kilosort1(run_kwargs): |
| 113 | + if DOCKER_SINGULARITY == "singularity": |
| 114 | + clean_singularity_cache() |
92 | 115 | sorting = ss.run_kilosort(output_folder="kilosort", useGPU=False, **run_kwargs) |
93 | 116 | print(sorting) |
94 | 117 |
|
95 | 118 | def test_combinato(run_kwargs): |
| 119 | + if DOCKER_SINGULARITY == "singularity": |
| 120 | + clean_singularity_cache() |
96 | 121 | rec = run_kwargs['recording'] |
97 | 122 | channels = rec.get_channel_ids()[0:1] |
98 | 123 | rec_one_channel = rec.channel_slice(channels) |
|
0 commit comments