Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
h-mayorquin committed Aug 28, 2024
2 parents 2085cbe + 7b8f181 commit 815c640
Show file tree
Hide file tree
Showing 34 changed files with 1,421 additions and 225 deletions.
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

0 comments on commit 815c640

Please sign in to comment.