forked from SpikeInterface/spikeinterface
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/main'
- Loading branch information
Showing
34 changed files
with
1,421 additions
and
225 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |
Oops, something went wrong.