Skip to content

Commit f95c22a

Browse files
authored
Merge branch 'SpikeInterface:main' into add_time_vector_case_to_get_duration
2 parents 22d025d + 53933e6 commit f95c22a

File tree

136 files changed

+2610
-1373
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

136 files changed

+2610
-1373
lines changed

.github/actions/build-test-environment/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ runs:
2121
python -m pip install -U pip # Official recommended way
2222
source ${{ github.workspace }}/test_env/bin/activate
2323
pip install tabulate # This produces summaries at the end
24-
pip install -e .[test,extractors,streaming_extractors,full]
24+
pip install -e .[test,extractors,streaming_extractors,test_extractors,full]
2525
shell: bash
2626
- name: Force installation of latest dev from key-packages when running dev (not release)
2727
run: |

.github/actions/install-wine/action.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,29 @@ name: Install packages
22
description: This action installs the package and its dependencies for testing
33

44
inputs:
5-
python-version:
6-
description: 'Python version to set up'
7-
required: false
85
os:
96
description: 'Operating system to set up'
10-
required: false
7+
required: true
118

129
runs:
1310
using: "composite"
1411
steps:
15-
- name: Install wine (needed for Plexon2)
12+
- name: Install wine on Linux
13+
if: runner.os == 'Linux'
1614
run: |
1715
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
1816
sudo dpkg --add-architecture i386
1917
sudo apt-get update -qq
2018
sudo apt-get install -yqq --allow-downgrades libc6:i386 libgcc-s1:i386 libstdc++6:i386 wine
2119
shell: bash
20+
- name: Install wine on macOS
21+
if: runner.os == 'macOS'
22+
run: |
23+
brew install --cask xquartz
24+
brew install --cask wine-stable
25+
shell: bash
26+
27+
- name: Skip installation on Windows
28+
if: ${{ inputs.os == 'Windows' }}
29+
run: echo "Skipping Wine installation on Windows. Not necessary."
30+
shell: bash

.github/determine_testing_environment.py

Lines changed: 47 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -30,56 +30,59 @@
3030
exporters_changed = False
3131
sortingcomponents_changed = False
3232
generation_changed = False
33+
stream_extractors_changed = False
3334

3435

3536
for changed_file in changed_files_in_the_pull_request_paths:
3637

3738
file_is_in_src = changed_file.parts[0] == "src"
3839

39-
if not file_is_in_src:
40-
41-
if changed_file.name == "pyproject.toml":
42-
pyproject_toml_changed = True
43-
44-
else:
45-
if changed_file.name == "neobaseextractor.py":
46-
neobaseextractor_changed = True
47-
elif changed_file.name == "plexon2.py":
48-
extractors_changed = True
49-
elif "core" in changed_file.parts:
50-
conditions_changed = True
51-
elif "extractors" in changed_file.parts:
52-
extractors_changed = True
53-
elif "preprocessing" in changed_file.parts:
54-
preprocessing_changed = True
55-
elif "postprocessing" in changed_file.parts:
56-
postprocessing_changed = True
57-
elif "qualitymetrics" in changed_file.parts:
58-
qualitymetrics_changed = True
59-
elif "comparison" in changed_file.parts:
60-
comparison_changed = True
61-
elif "curation" in changed_file.parts:
62-
curation_changed = True
63-
elif "widgets" in changed_file.parts:
64-
widgets_changed = True
65-
elif "exporters" in changed_file.parts:
66-
exporters_changed = True
67-
elif "sortingcomponents" in changed_file.parts:
68-
sortingcomponents_changed = True
69-
elif "generation" in changed_file.parts:
70-
generation_changed = True
71-
elif "sorters" in changed_file.parts:
72-
if "external" in changed_file.parts:
73-
sorters_external_changed = True
74-
elif "internal" in changed_file.parts:
75-
sorters_internal_changed = True
76-
else:
77-
sorters_changed = True
40+
if changed_file.name == "pyproject.toml":
41+
pyproject_toml_changed = True
42+
elif changed_file.name == "neobaseextractor.py":
43+
neobaseextractor_changed = True
44+
extractors_changed = True
45+
elif changed_file.name == "plexon2.py":
46+
plexon2_changed = True
47+
elif changed_file.name == "nwbextractors.py":
48+
extractors_changed = True # There are NWB tests that are not streaming
49+
stream_extractors_changed = True
50+
elif changed_file.name == "iblextractors.py":
51+
stream_extractors_changed = True
52+
elif "core" in changed_file.parts:
53+
core_changed = True
54+
elif "extractors" in changed_file.parts:
55+
extractors_changed = True
56+
elif "preprocessing" in changed_file.parts:
57+
preprocessing_changed = True
58+
elif "postprocessing" in changed_file.parts:
59+
postprocessing_changed = True
60+
elif "qualitymetrics" in changed_file.parts:
61+
qualitymetrics_changed = True
62+
elif "comparison" in changed_file.parts:
63+
comparison_changed = True
64+
elif "curation" in changed_file.parts:
65+
curation_changed = True
66+
elif "widgets" in changed_file.parts:
67+
widgets_changed = True
68+
elif "exporters" in changed_file.parts:
69+
exporters_changed = True
70+
elif "sortingcomponents" in changed_file.parts:
71+
sortingcomponents_changed = True
72+
elif "generation" in changed_file.parts:
73+
generation_changed = True
74+
elif "sorters" in changed_file.parts:
75+
if "external" in changed_file.parts:
76+
sorters_external_changed = True
77+
elif "internal" in changed_file.parts:
78+
sorters_internal_changed = True
79+
else:
80+
sorters_changed = True
7881

7982

8083
run_everything = core_changed or pyproject_toml_changed or neobaseextractor_changed
8184
run_generation_tests = run_everything or generation_changed
82-
run_extractor_tests = run_everything or extractors_changed
85+
run_extractor_tests = run_everything or extractors_changed or plexon2_changed
8386
run_preprocessing_tests = run_everything or preprocessing_changed
8487
run_postprocessing_tests = run_everything or postprocessing_changed
8588
run_qualitymetrics_tests = run_everything or qualitymetrics_changed
@@ -93,8 +96,11 @@
9396
run_sorters_test = run_everything or sorters_changed
9497
run_internal_sorters_test = run_everything or run_sortingcomponents_tests or sorters_internal_changed
9598

99+
run_streaming_extractors_test = stream_extractors_changed
100+
96101
install_plexon_dependencies = plexon2_changed
97102

103+
98104
environment_varaiables_to_add = {
99105
"RUN_EXTRACTORS_TESTS": run_extractor_tests,
100106
"RUN_PREPROCESSING_TESTS": run_preprocessing_tests,
@@ -109,6 +115,7 @@
109115
"RUN_SORTERS_TESTS": run_sorters_test,
110116
"RUN_INTERNAL_SORTERS_TESTS": run_internal_sorters_test,
111117
"INSTALL_PLEXON_DEPENDENCIES": install_plexon_dependencies,
118+
"RUN_STREAMING_EXTRACTORS_TESTS": run_streaming_extractors_test,
112119
}
113120

114121
# Write the conditions to the GITHUB_ENV file

.github/workflows/all-tests.yml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ jobs:
6868
echo "RUN_SORTERS_TESTS=${RUN_SORTERS_TESTS}"
6969
echo "RUN_INTERNAL_SORTERS_TESTS=${RUN_INTERNAL_SORTERS_TESTS}"
7070
echo "INSTALL_PLEXON_DEPENDENCIES=${INSTALL_PLEXON_DEPENDENCIES}"
71+
echo "RUN_STREAMING_EXTRACTORS_TESTS=${RUN_STREAMING_EXTRACTORS_TESTS}"
7172
7273
- name: Install packages
7374
run: |
@@ -78,9 +79,8 @@ jobs:
7879
run: pytest -m "core"
7980
shell: bash
8081

81-
- name: Install Other Testing Dependencies
82+
- name: Install Dependencies for Timing Display
8283
run: |
83-
pip install -e .[test]
8484
pip install tabulate
8585
pip install pandas
8686
shell: bash
@@ -91,6 +91,7 @@ jobs:
9191
run: echo "dataset_hash=$(git ls-remote https://gin.g-node.org/NeuralEnsemble/ephy_testing_data.git HEAD | cut -f1)" >> $GITHUB_OUTPUT
9292

9393
- name: Cache datasets
94+
if: env.RUN_EXTRACTORS_TESTS == 'true'
9495
id: cache-datasets
9596
uses: actions/cache/restore@v4
9697
with:
@@ -119,6 +120,9 @@ jobs:
119120
fi
120121
git config --global filter.annex.process "git-annex filter-process" # recommended for efficiency
121122
123+
- name : Install Plexon dependencies
124+
if: env.INSTALL_PLEXON_DEPENDENCIES == 'true'
125+
uses: ./.github/actions/install-wine
122126

123127
- name: Set execute permissions on run_tests.sh
124128
shell: bash
@@ -130,16 +134,28 @@ jobs:
130134
HDF5_PLUGIN_PATH: ${{ github.workspace }}/hdf5_plugin_path_maxwell
131135
if: env.RUN_EXTRACTORS_TESTS == 'true'
132136
run: |
133-
pip install -e .[extractors,streaming_extractors]
137+
pip install -e .[extractors,streaming_extractors,test_extractors]
134138
./.github/run_tests.sh "extractors and not streaming_extractors" --no-virtual-env
135139
140+
- name: Test streaming extractors
141+
shell: bash
142+
if: env.RUN_STREAMING_EXTRACTORS_TESTS
143+
run: |
144+
pip install -e .[streaming_extractors,test_extractors]
145+
./.github/run_tests.sh "streaming_extractors" --no-virtual-env
146+
136147
- name: Test preprocessing
137148
shell: bash
138149
if: env.RUN_PREPROCESSING_TESTS == 'true'
139150
run: |
140-
pip install -e .[preprocessing]
151+
pip install -e .[preprocessing,test_preprocessing]
141152
./.github/run_tests.sh "preprocessing and not deepinterpolation" --no-virtual-env
142153
154+
- name: Install remaining testing dependencies # TODO: Remove this step once we have better modularization
155+
shell: bash
156+
run: |
157+
pip install -e .[test]
158+
143159
- name: Test postprocessing
144160
shell: bash
145161
if: env.RUN_POSTPROCESSING_TESTS == 'true'

.github/workflows/full-test.yml

Lines changed: 0 additions & 167 deletions
This file was deleted.

0 commit comments

Comments
 (0)