Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 13 additions & 17 deletions .github/workflows/installation-tips-test.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,36 @@
name: Creates Conda Install for Installation Tips
name: Checks uv installation from Installation Tips

on:
workflow_dispatch:
schedule:
- cron: "0 12 * * 0" # Weekly at noon UTC on Sundays

env:
UV_SYSTEM_PYTHON: 1

jobs:
installation-tips-testing:
name: Build Conda Env on ${{ matrix.os }} OS
name: Test uv installation on ${{ matrix.os }} OS
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -el {0}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
label: linux_dandi
- os: macos-latest
label: mac
- os: windows-latest
label: windows
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Test Conda Environment Creation
uses: conda-incubator/setup-miniconda@v3
with:
miniconda-version: "latest"
environment-file: ./installation_tips/full_spikeinterface_environment_${{ matrix.label }}.yml
activate-environment: si_env
python-version: '3.12'
- name: Install uv
uses: astral-sh/setup-uv@v6

- name: Install requirements
run: uv pip install -r ./installation_tips/beginner_requirements_stable.txt
- name: Check Installation Tips
run: python ./installation_tips/check_your_install.py --ci # ci flag turns off gui
run: python ./installation_tips/check_your_install.py --ci --short # ci flag turns off gui
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to source activate no ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

- name: Windows cleanup
if: ${{ matrix.label == 'windows' }}
if: ${{ matrix.os == 'windows-latest' }}
run: python ./installation_tips/cleanup_for_windows.py
13 changes: 10 additions & 3 deletions installation_tips/check_your_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,16 @@ def check_import_si_full():
import spikeinterface.full as si


def _create_recording():
def _create_recording(short=False):
import spikeinterface.full as si

if short:
durations = [30.0]
else:
durations = [200.0]

rec, _ = si.generate_ground_truth_recording(
durations=[200.0], sampling_frequency=30_000.0, num_channels=16, num_units=10, seed=2205
durations=durations, sampling_frequency=30_000.0, num_channels=16, num_units=10, seed=2205
)
rec.save(folder="./toy_example_recording", verbose=False, **job_kwargs)

Expand Down Expand Up @@ -85,13 +90,15 @@ def _clean():
# add ci flag so that gui will not be used in ci
# end user can ignore
parser.add_argument("--ci", action="store_false")
parser.add_argument("--short", action="store_false")


if __name__ == "__main__":

args = parser.parse_args()

_clean()
_create_recording()
_create_recording(short=args.short)

steps = [
("Import spikeinterface", check_import_si),
Expand Down
Loading