Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
2 changes: 1 addition & 1 deletion .github/actions/build-test-environment/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ runs:
git config --global user.email "CI@example.com"
git config --global user.name "CI Almighty"
uv pip install --system tabulate # This produces summaries at the end
uv pip install --system -e .[test,extractors,streaming_extractors,test_extractors,full]
uv pip install --system -e .[extractors,streaming_extractors,full] --group test-all
shell: bash
- name: Install git-annex
shell: bash
Expand Down
34 changes: 14 additions & 20 deletions .github/workflows/all-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ jobs:

- name: Install packages
run: |
uv pip install --system -e .[test_core]
uv pip install --system -e . --group test-core
shell: bash

- name: Pip list
Expand Down Expand Up @@ -145,77 +145,71 @@ jobs:
HDF5_PLUGIN_PATH: ${{ github.workspace }}/hdf5_plugin_path_maxwell
if: env.RUN_EXTRACTORS_TESTS == 'true'
run: |
uv pip install --system -e .[extractors,streaming_extractors,test_extractors]
uv pip install --system -e .[extractors,streaming_extractors] --group test-extractors
uv pip list --system
./.github/run_tests.sh "extractors and not streaming_extractors" --no-virtual-env

- name: Test streaming extractors
shell: bash
if: env.RUN_STREAMING_EXTRACTORS_TESTS == 'true'
run: |
uv pip install --system -e .[streaming_extractors,test_extractors]
uv pip install --system -e .[streaming_extractors] --group test-streaming-extractors
uv pip list --system
./.github/run_tests.sh "streaming_extractors" --no-virtual-env

- name: Test preprocessing
shell: bash
if: env.RUN_PREPROCESSING_TESTS == 'true'
run: |
uv pip install --system -e .[preprocessing,test_preprocessing]
uv pip install --system -e .[preprocessing] --group test-preprocessing
uv pip list --system
./.github/run_tests.sh "preprocessing and not deepinterpolation" --no-virtual-env

- name: Install remaining testing dependencies # TODO: Remove this step once we have better modularization
shell: bash
run: |
uv pip install --system -e .[test]
uv pip list --system

- name: Test postprocessing
shell: bash
if: env.RUN_POSTPROCESSING_TESTS == 'true'
run: |
uv pip install --system -e .[full]
uv pip install --system -e .[postprocessing] --group test-postprocessing
uv pip list --system
./.github/run_tests.sh postprocessing --no-virtual-env

- name: Test metrics
shell: bash
if: env.RUN_METRICS_TESTS == 'true'
run: |
uv pip install --system -e .[metrics]
uv pip install --system -e .[metrics] --group test-metrics
uv pip list --system
./.github/run_tests.sh metrics --no-virtual-env

- name: Test comparison
shell: bash
if: env.RUN_COMPARISON_TESTS == 'true'
run: |
uv pip install --system -e .[full]
uv pip install --system -e .[comparison] --group test-comparison
uv pip list --system
./.github/run_tests.sh comparison --no-virtual-env

- name: Test core sorters
shell: bash
if: env.RUN_SORTERS_TESTS == 'true'
run: |
uv pip install --system -e .[full]
uv pip install --system -e .[sorters] --group test-sorters
uv pip list --system
./.github/run_tests.sh sorters --no-virtual-env

- name: Test internal sorters
shell: bash
if: env.RUN_INTERNAL_SORTERS_TESTS == 'true'
run: |
uv pip install --system -e .[full]
uv pip install --system -e .[sorters_internal] --group test-sorters-internal
uv pip list --system
./.github/run_tests.sh sorters_internal --no-virtual-env

- name: Test curation
shell: bash
if: env.RUN_CURATION_TESTS == 'true'
run: |
uv pip install --system -e .[full]
uv pip install --system -e .[curation] --group test-curation
uv pip list --system
./.github/run_tests.sh curation --no-virtual-env

Expand All @@ -225,23 +219,23 @@ jobs:
env:
KACHERY_ZONE: "scratch"
run: |
uv pip install --system -e .[full,widgets]
uv pip install --system -e .[widgets] --group test-widgets
uv pip list --system
./.github/run_tests.sh widgets --no-virtual-env -s

- name: Test exporters
shell: bash
if: env.RUN_EXPORTERS_TESTS == 'true'
run: |
uv pip install --system -e .[full]
uv pip install --system -e .[exporters] --group test-exporters
uv pip list --system
./.github/run_tests.sh exporters --no-virtual-env

- name: Test sortingcomponents
shell: bash
if: env.RUN_SORTINGCOMPONENTS_TESTS == 'true'
run: |
uv pip install --system -e .[full]
uv pip install --system -e .[sortingcomponents] --group test-sortingcomponents
uv pip list --system

# Internal shell check for platform and env var
Expand All @@ -262,6 +256,6 @@ jobs:
shell: bash
if: env.RUN_GENERATION_TESTS == 'true'
run: |
uv pip install --system -e .[full]
uv pip install --system -e .[generation] --group test-generation
uv pip list --system
./.github/run_tests.sh generation --no-virtual-env
2 changes: 1 addition & 1 deletion .github/workflows/core-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
run: |
git config --global user.email "CI@example.com"
git config --global user.name "CI Almighty"
uv pip install --system -e .[test_core]
uv pip install --system -e . --group test-core
- name: Test core with pytest
run: |
pytest -m "core" -vv -ra --durations=0 --durations-min=0.001 | tee report.txt; test $? -eq 0 || exit 1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deepinterpolation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
uv pip install --system tensorflow==2.8.4
uv pip install --system deepinterpolation@git+https://github.com/AllenInstitute/deepinterpolation.git
uv pip install --system numpy==1.26.4
uv pip install --system -e .[full,test_core]
uv pip install --system -e .[full] --group test-core
- name: Pip list
if: ${{ steps.modules-changed.outputs.DEEPINTERPOLATION_CHANGED == 'true' }}
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
uv pip install --system pytest
uv pip install --system zarr
uv pip install --system setuptools wheel twine build
uv pip install --system -e .[test_core]
uv pip install --system -e . --group test-core
- name: Test core with pytest
run: |
pytest -v src/spikeinterface/core
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_kilosort4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:

- name: Install SpikeInterface
run: |
uv pip install --system -e .[test]
uv pip install --system -e .[full] --group test-sorters
shell: bash

- name: Install legacy setuptools for KS4 < 4.0.19
Expand Down
4 changes: 2 additions & 2 deletions doc/development/development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ Note that you should install spikeinterface before running the tests. You can do

.. code-block:: bash

pip install -e .[test,extractors,full]
pip install -e .[extractors,full] --group test-all

You can change the :code:`[test,extractors,full]` to install only the dependencies you need. The dependencies are specified in the :code:`pyproject.toml` file in the root of the repository.
You can change the :code:`[extractors,full]` extras to install only the runtime dependencies you need, and swap :code:`--group test-all` for a per-module test group (for example :code:`--group test-postprocessing`). Both lists are defined in :code:`pyproject.toml`: feature extras live under :code:`[project.optional-dependencies]` and test groups under :code:`[dependency-groups]` (PEP 735). Note that :code:`--group` requires pip 25.1+ or uv.

The specific environment for the CI is specified in the :code:`.github/actions/build-test-environment/action.yml` and you can
find the full tests in the :code:`.github/workflows/full_test.yml` file.
Expand Down
Loading
Loading