From 642eea9b2c1242000dd847701eb89dc533def6be Mon Sep 17 00:00:00 2001 From: JoeZiminski Date: Wed, 21 Aug 2024 12:55:59 +0100 Subject: [PATCH] Update KS4 versions to test on, add a warning for the next version. --- .github/scripts/check_kilosort4_releases.py | 10 +++++++++- .github/scripts/kilosort4-latest-version.json | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 .github/scripts/kilosort4-latest-version.json diff --git a/.github/scripts/check_kilosort4_releases.py b/.github/scripts/check_kilosort4_releases.py index de11dc974b..92e7bf277f 100644 --- a/.github/scripts/check_kilosort4_releases.py +++ b/.github/scripts/check_kilosort4_releases.py @@ -4,6 +4,7 @@ import requests import json from packaging.version import parse +import spikeinterface def get_pypi_versions(package_name): """ @@ -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 @@ -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) diff --git a/.github/scripts/kilosort4-latest-version.json b/.github/scripts/kilosort4-latest-version.json new file mode 100644 index 0000000000..03629ff842 --- /dev/null +++ b/.github/scripts/kilosort4-latest-version.json @@ -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"]