Skip to content

Commit bffc1e5

Browse files
authored
Merge pull request #4123 from SpikeInterface/check-install-ci
Check install ci - use uv
2 parents a2954a1 + 25be94e commit bffc1e5

File tree

2 files changed

+31
-22
lines changed

2 files changed

+31
-22
lines changed
Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,40 @@
1-
name: Creates Conda Install for Installation Tips
1+
name: Checks uv installation from Installation Tips
22

33
on:
44
workflow_dispatch:
55
schedule:
66
- cron: "0 12 * * 0" # Weekly at noon UTC on Sundays
77

8+
env:
9+
UV_SYSTEM_PYTHON: 1
10+
811
jobs:
912
installation-tips-testing:
10-
name: Build Conda Env on ${{ matrix.os }} OS
13+
name: Test uv installation on ${{ matrix.os }} OS
1114
runs-on: ${{ matrix.os }}
12-
defaults:
13-
run:
14-
shell: bash -el {0}
1515
strategy:
1616
fail-fast: false
1717
matrix:
1818
include:
1919
- os: ubuntu-latest
20-
label: linux_dandi
2120
- os: macos-latest
22-
label: mac
2321
- os: windows-latest
24-
label: windows
2522
steps:
2623
- uses: actions/checkout@v4
2724
- uses: actions/setup-python@v5
2825
with:
29-
python-version: '3.10'
30-
- name: Test Conda Environment Creation
31-
uses: conda-incubator/setup-miniconda@v3
32-
with:
33-
miniconda-version: "latest"
34-
environment-file: ./installation_tips/full_spikeinterface_environment_${{ matrix.label }}.yml
35-
activate-environment: si_env
36-
- name: Check Installation Tips
37-
run: python ./installation_tips/check_your_install.py --ci # ci flag turns off gui
26+
python-version: '3.12'
27+
- name: Install uv
28+
uses: astral-sh/setup-uv@v6
29+
30+
- name: Install requirements
31+
run: uv pip install -r ./installation_tips/beginner_requirements_stable.txt
32+
- name: Check Installation Tips (mac)
33+
if: ${{ matrix.os == 'macos-latest' }}
34+
run: python ./installation_tips/check_your_install.py --ci --short --skip-kilosort4 # ci flag turns off gui
35+
- name: Check Installation Tips (linux/windows)
36+
if: ${{ matrix.os != 'macos-latest' }}
37+
run: python ./installation_tips/check_your_install.py --ci --short # ci flag turns off gui
3838
- name: Windows cleanup
39-
if: ${{ matrix.label == 'windows' }}
39+
if: ${{ matrix.os == 'windows-latest' }}
4040
run: python ./installation_tips/cleanup_for_windows.py

installation_tips/check_your_install.py

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,16 @@ def check_import_si_full():
1818
import spikeinterface.full as si
1919

2020

21-
def _create_recording():
21+
def _create_recording(short=False):
2222
import spikeinterface.full as si
2323

24+
if short:
25+
durations = [30.0]
26+
else:
27+
durations = [200.0]
28+
2429
rec, _ = si.generate_ground_truth_recording(
25-
durations=[200.0], sampling_frequency=30_000.0, num_channels=16, num_units=10, seed=2205
30+
durations=durations, sampling_frequency=30_000.0, num_channels=16, num_units=10, seed=2205
2631
)
2732
rec.save(folder="./toy_example_recording", verbose=False, **job_kwargs)
2833

@@ -85,20 +90,24 @@ def _clean():
8590
# add ci flag so that gui will not be used in ci
8691
# end user can ignore
8792
parser.add_argument("--ci", action="store_false")
93+
parser.add_argument("--short", action="store_false")
94+
parser.add_argument("--skip-kilosort4", action="store_true")
95+
8896

8997
if __name__ == "__main__":
9098

9199
args = parser.parse_args()
92100

93101
_clean()
94-
_create_recording()
102+
_create_recording(short=args.short)
95103

96104
steps = [
97105
("Import spikeinterface", check_import_si),
98106
("Import spikeinterface.full", check_import_si_full),
99107
("Run tridesclous2", run_tridesclous2),
100-
("Run kilosort4", run_kilosort4),
101108
]
109+
if not args.skip_kilosort4:
110+
steps.append(("Run kilosort4", run_kilosort4))
102111

103112
# backwards logic because default is True for end-user
104113
if args.ci:

0 commit comments

Comments
 (0)