Patch to improve the nearest peeler. #5653
Workflow file for this run
This file contains hidden or 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
| name: Complete tests | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "0 12 * * 0" # Weekly on Sunday at noon UTC | |
| pull_request: | |
| types: [synchronize, opened, reopened] | |
| branches: | |
| - main | |
| env: | |
| KACHERY_API_KEY: ${{ secrets.KACHERY_API_KEY }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| concurrency: # Cancel previous workflows on the same pull request | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| run: | |
| name: ${{ matrix.os }} Python ${{ matrix.python-version }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.10", "3.13"] # Lower and higher versions we support | |
| os: [macos-latest, windows-latest, ubuntu-latest] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - uses: astral-sh/setup-uv@v7 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| enable-cache: true | |
| - name: Free space | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo rm -rf /usr/local/lib/android | |
| sudo rm -rf /usr/share/dotnet | |
| sudo rm -rf /opt/ghc | |
| sudo rm -rf /usr/local/graalvm | |
| sudo rm -rf /usr/local/share/powershell | |
| sudo rm -rf /usr/local/share/chromium | |
| df -h | |
| - name: Get changed files | |
| id: changed-files | |
| uses: tj-actions/changed-files@v46.0.1 | |
| - name: List all changed files | |
| shell: bash | |
| env: | |
| ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} | |
| run: | | |
| for file in ${ALL_CHANGED_FILES}; do | |
| echo "$file was changed" | |
| done | |
| - name: Set testing environment # This decides which tests are run and whether to install special dependencies | |
| shell: bash | |
| run: | | |
| changed_files="${{ steps.changed-files.outputs.all_changed_files }}" | |
| python .github/scripts/determine_testing_environment.py $changed_files | |
| - name: Display testing environment | |
| shell: bash | |
| run: | | |
| echo "RUN_EXTRACTORS_TESTS=${RUN_EXTRACTORS_TESTS}" | |
| echo "RUN_PREPROCESSING_TESTS=${RUN_PREPROCESSING_TESTS}" | |
| echo "RUN_POSTPROCESSING_TESTS=${RUN_POSTPROCESSING_TESTS}" | |
| echo "RUN_METRICS_TESTS=${RUN_METRICS_TESTS}" | |
| echo "RUN_CURATION_TESTS=${RUN_CURATION_TESTS}" | |
| echo "RUN_SORTINGCOMPONENTS_TESTS=${RUN_SORTINGCOMPONENTS_TESTS}" | |
| echo "RUN_GENERATION_TESTS=${RUN_GENERATION_TESTS}" | |
| echo "RUN_COMPARISON_TESTS=${RUN_COMPARISON_TESTS}" | |
| echo "RUN_WIDGETS_TESTS=${RUN_WIDGETS_TESTS}" | |
| echo "RUN_EXPORTERS_TESTS=${RUN_EXPORTERS_TESTS}" | |
| echo "RUN_SORTERS_TESTS=${RUN_SORTERS_TESTS}" | |
| echo "RUN_INTERNAL_SORTERS_TESTS=${RUN_INTERNAL_SORTERS_TESTS}" | |
| echo "INSTALL_PLEXON_DEPENDENCIES=${INSTALL_PLEXON_DEPENDENCIES}" | |
| echo "RUN_STREAMING_EXTRACTORS_TESTS=${RUN_STREAMING_EXTRACTORS_TESTS}" | |
| - name: Install packages | |
| run: | | |
| uv pip install --system -e . --group test-core | |
| shell: bash | |
| - name: Pip list | |
| run: uv pip list --system | |
| - name: Test core | |
| run: pytest -m "core" | |
| shell: bash | |
| - name: Install Dependencies for Timing Display | |
| run: | | |
| uv pip install --system tabulate | |
| uv pip install --system pandas | |
| shell: bash | |
| - name: Get current hash (SHA) of the ephy_testing_data repo | |
| shell: bash | |
| id: repo_hash | |
| run: echo "dataset_hash=$(git ls-remote https://gin.g-node.org/NeuralEnsemble/ephy_testing_data.git HEAD | cut -f1)" >> $GITHUB_OUTPUT | |
| - name: Cache datasets | |
| if: env.RUN_EXTRACTORS_TESTS == 'true' || env.RUN_PREPROCESSING_TESTS == 'true' | |
| id: cache-datasets | |
| uses: actions/cache/restore@v5 | |
| with: | |
| path: ~/spikeinterface_datasets | |
| key: ${{ runner.os }}-datasets-${{ steps.repo_hash.outputs.dataset_hash }} | |
| restore-keys: ${{ runner.os }}-datasets | |
| - name: Install git-annex | |
| shell: bash | |
| if: env.RUN_EXTRACTORS_TESTS == 'true' || env.RUN_PREPROCESSING_TESTS == 'true' | |
| run: | | |
| uv pip install --system datalad-installer | |
| if [ ${{ runner.os }} = 'Linux' ]; then | |
| datalad-installer --sudo ok git-annex --method datalad/packages | |
| elif [ ${{ runner.os }} = 'macOS' ]; then | |
| datalad-installer --sudo ok git-annex --method brew | |
| elif [ ${{ runner.os }} = 'Windows' ]; then | |
| datalad-installer --sudo ok git-annex --method datalad/git-annex:release | |
| fi | |
| git config --global filter.annex.process "git-annex filter-process" # recommended for efficiency | |
| - name : Install Plexon dependencies | |
| if: env.INSTALL_PLEXON_DEPENDENCIES == 'true' | |
| uses: ./.github/actions/install-wine | |
| - name: Set execute permissions on run_tests.sh | |
| shell: bash | |
| run: chmod +x .github/run_tests.sh | |
| - name: Test extractors | |
| shell: bash | |
| env: | |
| HDF5_PLUGIN_PATH: ${{ github.workspace }}/hdf5_plugin_path_maxwell | |
| if: env.RUN_EXTRACTORS_TESTS == 'true' | |
| run: | | |
| 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] --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] --group test-preprocessing | |
| uv pip list --system | |
| ./.github/run_tests.sh "preprocessing and not deepinterpolation" --no-virtual-env | |
| - name: Test postprocessing | |
| shell: bash | |
| if: env.RUN_POSTPROCESSING_TESTS == 'true' | |
| run: | | |
| 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] --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 .[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 .[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 .[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 .[curation] --group test-curation | |
| uv pip list --system | |
| ./.github/run_tests.sh curation --no-virtual-env | |
| - name: Test widgets | |
| shell: bash | |
| if: env.RUN_WIDGETS_TESTS == 'true' | |
| env: | |
| KACHERY_ZONE: "scratch" | |
| run: | | |
| 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 .[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 .[sortingcomponents] --group test-sortingcomponents | |
| uv pip list --system | |
| # Internal shell check for platform and env var | |
| if [[ "$RUNNER_OS" == "macOS" ]]; then | |
| # Locate the binary dynamically | |
| SHM_BINARY=$(python -c "import torch; from pathlib import Path; print(Path(torch.__file__).parent / 'bin' / 'torch_shm_manager')") | |
| if [ -f "$SHM_BINARY" ]; then | |
| echo "Applying chmod +x to $SHM_BINARY" | |
| chmod +x "$SHM_BINARY" | |
| else | |
| echo "Warning: torch_shm_manager not found at $SHM_BINARY" | |
| fi | |
| fi | |
| ./.github/run_tests.sh sortingcomponents --no-virtual-env | |
| - name: Test generation | |
| shell: bash | |
| if: env.RUN_GENERATION_TESTS == 'true' | |
| run: | | |
| uv pip install --system -e .[generation] --group test-generation | |
| uv pip list --system | |
| ./.github/run_tests.sh generation --no-virtual-env |