Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add kilosort4 wrapper tests #3085

Merged
merged 31 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
f9ff667
Add for 'set_files'.
JoeZiminski Jun 24, 2024
aaa389f
Add for 'initialize_ops'.
JoeZiminski Jun 24, 2024
3ea9b8d
Add for 'compute_preprocessing'.
JoeZiminski Jun 24, 2024
2865642
Add for 'compute_drift_correction'.
JoeZiminski Jun 24, 2024
9e0207a
Add for detect_spikes, cluster_spikes, save_sorting.
JoeZiminski Jun 24, 2024
b07359f
Add for 'load_probe', 'RecordingExtractorAsArray'.
JoeZiminski Jun 24, 2024
ac844e9
Add for BinaryFiltered + some generate notes.
JoeZiminski Jun 24, 2024
44835bb
Update note on DEFAULT_SETTINGS.
JoeZiminski Jun 24, 2024
5bdc31e
Remove some TODO and notes.
JoeZiminski Jun 24, 2024
dc848eb
Use version to handle all KS versions some which are missing .__versi…
JoeZiminski Jun 26, 2024
69e72bf
Remove unused vars that were left over I think from prev KS versions.
JoeZiminski Jun 26, 2024
c3b2bdd
Use importlib version instead of .__version__
JoeZiminski Jun 26, 2024
5245722
Add kilosort test script and CI workflow.
JoeZiminski Jun 26, 2024
ede9dd4
Fix save_preprocesed copy, argument mispelled.
JoeZiminski Jun 26, 2024
9570c92
Fix NT format for BinaryFiltered, double-check all again
JoeZiminski Jun 26, 2024
a8489a5
Add CI to test all kilosort4 versions.
JoeZiminski Jun 26, 2024
159e2b0
Tidying up tests and removing comments from kilosort4.py.
JoeZiminski Jun 27, 2024
0817a5b
Add tests to check _default_params against KS params.
JoeZiminski Jun 27, 2024
c8779fc
Skip tests where relevant, try on slightly earlier python version to …
JoeZiminski Jun 27, 2024
8677291
Don't support 4.0.4
JoeZiminski Jun 27, 2024
21caaf9
Remove support for versions earlier that 4.0.5.
JoeZiminski Jun 27, 2024
9bc1897
Add packaging to CI dependency.
JoeZiminski Jun 27, 2024
23d2c77
Add some more documentation to .yml
JoeZiminski Jun 27, 2024
32568ca
Remove run CI on main, only run on cron job.
JoeZiminski Aug 20, 2024
8580c97
Update .github/scripts/test_kilosort4_ci.py
JoeZiminski Aug 20, 2024
b3c6680
Update src/spikeinterface/sorters/external/kilosort4.py
JoeZiminski Aug 20, 2024
23c3983
Update .github/workflows/test_kilosort4.yml
JoeZiminski Aug 20, 2024
b7912a2
Merge branch 'main' into add_kilosort4_wrapper_tests
JoeZiminski Aug 20, 2024
ed9ef32
Fix linting.
JoeZiminski Aug 20, 2024
ae44b4a
Remove 'save_preprocessed' test.
JoeZiminski Aug 20, 2024
642eea9
Update KS4 versions to test on, add a warning for the next version.
JoeZiminski Aug 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/scripts/README.MD
Original file line number Diff line number Diff line change
@@ -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.
35 changes: 35 additions & 0 deletions .github/scripts/check_kilosort4_releases.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import os
import re
from pathlib import Path
import requests
import json
from packaging.version import parse
import spikeinterface

def get_pypi_versions(package_name):
"""
Make an API call to pypi to retrieve all
available versions of the kilosort package.
"""
url = f"https://pypi.org/pypi/{package_name}/json"
response = requests.get(url)
response.raise_for_status()
data = response.json()
versions = list(sorted(data["releases"].keys()))

assert parse(spikeinterface.__version__) < parse("0.101.1"), (
"Kilosort 4.0.5-12 are supported in SpikeInterface < 0.101.1."
"At version 0.101.1, this should be updated to support newer"
"kilosort verrsions."
)
versions = [ver for ver in versions if parse("4.0.12") >= parse(ver) >= parse("4.0.5")]
return versions


if __name__ == "__main__":
# Get all KS4 versions from pipi and write to file.
package_name = "kilosort"
versions = get_pypi_versions(package_name)
with open(Path(os.path.realpath(__file__)).parent / "kilosort4-latest-version.json", "w") as f:
print(versions)
json.dump(versions, f)
1 change: 1 addition & 0 deletions .github/scripts/kilosort4-latest-version.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
["4.0.10", "4.0.11", "4.0.12", "4.0.5", "4.0.6", "4.0.7", "4.0.8", "4.0.9"]
Loading