-
Notifications
You must be signed in to change notification settings - Fork 191
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CI to test all kilosort4 versions.
- Loading branch information
1 parent
9570c92
commit a8489a5
Showing
5 changed files
with
170 additions
and
28 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,20 @@ | ||
import os | ||
import re | ||
from pathlib import Path | ||
import requests | ||
import json | ||
|
||
|
||
def get_pypi_versions(package_name): | ||
url = f"https://pypi.org/pypi/{package_name}/json" | ||
response = requests.get(url) | ||
response.raise_for_status() | ||
data = response.json() | ||
return list(sorted(data["releases"].keys())) | ||
|
||
|
||
if __name__ == "__main__": | ||
package_name = "kilosort" | ||
versions = get_pypi_versions(package_name) | ||
with open(Path(os.path.realpath(__file__)).parent / "kilosort4-latest-version.json", "w") as f: | ||
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
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 |
---|---|---|
|
@@ -9,38 +9,56 @@ on: | |
branches: | ||
- main | ||
|
||
# env: | ||
# KACHERY_CLOUD_CLIENT_ID: ${{ secrets.KACHERY_CLOUD_CLIENT_ID }} | ||
# KACHERY_CLOUD_PRIVATE_KEY: ${{ secrets.KACHERY_CLOUD_PRIVATE_KEY }} | ||
jobs: | ||
versions: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
matrix: ${{ steps.set-matrix.outputs.matrix }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
# concurrency: # Cancel previous workflows on the same pull request | ||
# group: ${{ github.workflow }}-${{ github.ref }} | ||
# cancel-in-progress: true | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.12 | ||
|
||
jobs: | ||
run: | ||
name: ${{ matrix.os }} Python ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
pip install requests | ||
- name: Fetch package versions from PyPI | ||
run: | | ||
python .github/scripts/check_kilosort4_releases.py | ||
shell: bash | ||
|
||
- name: Set matrix data | ||
id: set-matrix | ||
run: | | ||
echo "matrix=$(jq -c . < .github/scripts/kilosort4-latest-version.json)" >> $GITHUB_OUTPUT | ||
test: | ||
needs: versions | ||
name: ${{ matrix.ks_version }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.12"] # TODO: "3.9", # Lower and higher versions we support | ||
os: [ubuntu-latest] # TODO: macos-13, windows-latest, | ||
ks_version: ["4.0.12"] # TODO: add / build from pypi based on Christians PR | ||
python-version: ["3.12"] | ||
os: [ubuntu-latest] | ||
ks_version: ${{ fromJson(needs.versions.outputs.matrix) }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install packages | ||
# TODO: maybe dont need full? | ||
- name: Install SpikeInterface | ||
run: | | ||
pip install -e .[test] | ||
# git config --global user.email "[email protected]" | ||
# git config --global user.name "CI Almighty" | ||
# pip install tabulate | ||
shell: bash | ||
|
||
- name: Install Kilosort | ||
|
@@ -49,13 +67,6 @@ jobs: | |
shell: bash | ||
|
||
- name: Run new kilosort4 tests | ||
# run: chmod +x .github/test_kilosort4.sh | ||
# TODO: figure out the paths to be able to run this by calling the file directly | ||
run: | | ||
pytest -k test_kilosort4_new --durations=0 | ||
pytest .github/scripts/test_kilosort4_ci.py | ||
shell: bash | ||
|
||
# TODO: pip install -e .[full,dev] is failing # | ||
#The conflict is caused by: | ||
# spikeinterface[docs] 0.101.0rc0 depends on datalad==0.16.2; extra == "docs" | ||
# spikeinterface[test] 0.101.0rc0 depends on datalad>=1.0.2; extra == "test" |
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