From 722c8491af6e47024b1b2f6dba6ca99256164b54 Mon Sep 17 00:00:00 2001 From: JoeZiminski Date: Wed, 26 Jun 2024 18:49:31 +0100 Subject: [PATCH] Fix argument tests, small tidy up. --- .github/scripts/README.MD | 2 ++ ..._kilosort4_new.py => test_kilosort4_ci.py} | 27 ++++++++++++++----- 2 files changed, 22 insertions(+), 7 deletions(-) create mode 100644 .github/scripts/README.MD rename .github/scripts/{test_kilosort4_new.py => test_kilosort4_ci.py} (96%) diff --git a/.github/scripts/README.MD b/.github/scripts/README.MD new file mode 100644 index 0000000000..1d3a622aae --- /dev/null +++ b/.github/scripts/README.MD @@ -0,0 +1,2 @@ +This folder contains test scripts for running in the CI, that are not run as part of the usual +CI because they are too long / heavy. These are run on cron-jobs once per week. diff --git a/.github/scripts/test_kilosort4_new.py b/.github/scripts/test_kilosort4_ci.py similarity index 96% rename from .github/scripts/test_kilosort4_new.py rename to .github/scripts/test_kilosort4_ci.py index 1a38882404..4684038bd0 100644 --- a/.github/scripts/test_kilosort4_new.py +++ b/.github/scripts/test_kilosort4_ci.py @@ -242,10 +242,15 @@ def test_cluster_spikes_arguments(self): ) def test_save_sorting_arguments(self): + + expected_arguments = ["ops", "results_dir", "st", "clu", "tF", "Wall", "imin", "tic0", "save_extra_vars"] + + if parse(version("kilosort")) > parse("4.0.11"): + expected_arguments.append("save_preprocessed_copy") + self._check_arguments( save_sorting, - ["ops", "results_dir", "st", "clu", "tF", "Wall", "imin", - "tic0", "save_extra_vars", "save_preprocessed_copy"] + expected_arguments ) def test_get_run_parameters(self): @@ -267,13 +272,21 @@ def test_recording_extractor_as_array_arguments(self): ) def test_binary_filtered_arguments(self): + + expected_arguments = [ + "filename", "n_chan_bin", "fs", "NT", "nt", "nt0min", + "chan_map", "hp_filter", "whiten_mat", "dshift", + "device", "do_CAR", "artifact_threshold", "invert_sign", + "dtype", "tmin", "tmax", "file_object" + ] + + if parse(version("kilosort")) >= parse("4.0.11"): + expected_arguments.pop(-1) + expected_arguments.extend(["shift", "scale", "file_object"]) + self._check_arguments( BinaryFiltered, - ["filename", "n_chan_bin", "fs", "NT", "nt", "nt0min", - "chan_map", "hp_filter", "whiten_mat", "dshift", - "device", "do_CAR", "artifact_threshold", "invert_sign", - "dtype", "tmin", "tmax", "shift", "scale", "file_object" - ] + expected_arguments ) def _check_arguments(self, object_, expected_arguments):