-
Notifications
You must be signed in to change notification settings - Fork 9
add ci tests #26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
add ci tests #26
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
e456c55
add ci tests
bendichter ff7eaa7
Update test.yml
bendichter cbb7e06
Update test.yml
bendichter 2ced167
change import
bendichter 4b86595
add pandas
bendichter 8738260
add scipy
bendichter cfaf3d5
add scikit-learn
bendichter 7cffbc9
fix save
bendichter 1acfb8d
install singularity
bendichter 6670787
pytest verbose
bendichter 92ca475
take away pandas
bendichter 5dfd7ec
use generate_recording
bendichter 07f315d
use spikeinterface full
bendichter 255901e
add trideclous
bendichter 284c76c
add ironclust
bendichter b4ce94a
fix runner
bendichter 66e08e9
Update .github/workflows/test.yml
bendichter 5ab7dc9
Add all tests
alejoe91 28df6a5
Some fixes
alejoe91 668e603
Update tests/test_singularity_containers.py
bendichter b17da94
Update tests/test_singularity_containers.py
bendichter 4216004
Update tests/test_singularity_containers.py
bendichter 08631d9
Update tests/test_singularity_containers.py
bendichter 6210000
apply black formatting
bendichter f241e18
refactor tests
bendichter a876921
fix recording arg
bendichter File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Test sorter images in singularity | ||
|
||
on: | ||
pull_request: | ||
branches: [main] | ||
types: [synchronize, opened, reopened, ready_for_review] | ||
|
||
jobs: | ||
build-and-test: | ||
name: Test on (${{ matrix.os }}) | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
# "macos-latest", "windows-latest" | ||
os: ["ubuntu-latest", ] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
python-version: 3.8 | ||
- uses: eWaterCycle/setup-singularity@v7 | ||
with: | ||
singularity-version: 3.8.3 | ||
- name: Install dependencies | ||
run: | | ||
sudo apt update | ||
sudo apt install git | ||
|
||
# get SI form master | ||
git clone https://github.com/SpikeInterface/spikeinterface.git | ||
cd spikeinterface | ||
pip install . | ||
pip install -r requirements_full.txt | ||
|
||
cd .. | ||
pip install spython pytest tridesclous | ||
- name: Test singularity | ||
run: | | ||
pytest -v tests/test_singularity_containers.py |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
import pytest | ||
|
||
import spikeinterface.sorters as ss | ||
from spikeinterface.core.testing_tools import generate_recording | ||
|
||
recording = generate_recording( | ||
num_channels=32, | ||
sampling_frequency=30000.0, # in Hz | ||
durations=[120], | ||
set_probe=True, | ||
ndim=2, | ||
) | ||
|
||
recording2 = recording.save(folder="test_recording") | ||
|
||
kwargs = dict(recording=recording2, verbose=True, singularity_image=True) | ||
|
||
|
||
@pytest.mark.xfail(reason="FAILING: investigate why") | ||
def test_spyking_circus(): | ||
ss.run_spykingcircus(output_folder="spyking_circus", **kwargs) | ||
|
||
|
||
@pytest.mark.xfail(reason="FAILING: investigate why") | ||
def test_mountainsort4(): | ||
ss.run_mountainsort4(output_folder="mountainsort4", **kwargs) | ||
|
||
|
||
def test_tridesclous(): | ||
ss.run_tridesclous(output_folder="tridesclous", **kwargs) | ||
|
||
|
||
def test_klusta(): | ||
ss.run_klusta(output_folder="klusta", **kwargs) | ||
|
||
|
||
def test_ironclust(): | ||
ss.run_ironclust(output_folder="ironclust", fGpu=False, **kwargs) | ||
|
||
|
||
def test_waveclus(): | ||
ss.run_waveclus(output_folder="waveclus", **kwargs) | ||
|
||
|
||
def test_hdsort(): | ||
ss.run_hdsort(output_folder="hdsort", **kwargs) | ||
|
||
|
||
def test_kilosort1(): | ||
ss.run_kilosort(output_folder="kilosort", useGPU=False, **kwargs) | ||
|
||
|
||
@pytest.mark.skip(reason="GPU required") | ||
def test_kilosort2(): | ||
ss.run_kilosort2(output_folder="kilosort2", **kwargs) | ||
|
||
|
||
@pytest.mark.skip(reason="GPU required") | ||
def test_kilosort2_5(): | ||
ss.run_kilosort2_5(output_folder="kilosort2_5", **kwargs) | ||
|
||
|
||
@pytest.mark.skip(reason="GPU required") | ||
def test_kilosort3(): | ||
ss.run_kilosort3(output_folder="kilosort3", **kwargs) | ||
|
||
|
||
@pytest.mark.skip(reason="GPU required") | ||
def test_pykilosort(): | ||
ss.run_pykilosort(output_folder="pykilosort", **kwargs) |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is happening because of inconsistent naming format:
spykingcircus
used to call run_sorterspyking_circus
as python modulespyking-circus
as image nameI have created this PR to properly raise the error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed
SORTER_DOCKER_MAP
inrun_sorter.py
from spikeinterface for tests.We need to unify naming format for spyking-cirucs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also I'm getting error using data from
generate_recording
for spyking-circus.When I change to toy data it works well:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
strange! @alejoe91, do you have any idea why one might work and not the other?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The image runs well, but It was raising here when extracting output.
I could see different
result[...].hdf5
files in output folder, but not'result-merged.hdf5'
or'result.hdf5'