Skip to content

Commit

Permalink
Update KS4 versions to test on, add a warning for the next version.
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeZiminski committed Aug 21, 2024
1 parent ae44b4a commit 642eea9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/scripts/check_kilosort4_releases.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import requests
import json
from packaging.version import parse
import spikeinterface

def get_pypi_versions(package_name):
"""
Expand All @@ -15,7 +16,13 @@ def get_pypi_versions(package_name):
response.raise_for_status()
data = response.json()
versions = list(sorted(data["releases"].keys()))
versions = [ver for ver in versions if parse(ver) >= parse("4.0.5")]

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


Expand All @@ -24,4 +31,5 @@ def get_pypi_versions(package_name):
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"]

0 comments on commit 642eea9

Please sign in to comment.