Skip to content
Merged
Changes from all 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
15 changes: 12 additions & 3 deletions src/spikeinterface/curation/tests/test_sortingview_curation.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import pytest
from pathlib import Path
import os
import json
import importlib.util
import numpy as np

import spikeinterface as si
Expand All @@ -20,6 +20,15 @@
ON_GITHUB = bool(os.getenv("GITHUB_ACTIONS"))
KACHERY_CLOUD_SET = bool(os.getenv("KACHERY_API_KEY"))

kachery_spec = importlib.util.find_spec("kachery")
if kachery_spec is not None:
HAVE_KACHERY = True
else:
HAVE_KACHERY = False


SKIP_KACHERY_REMOTE = not HAVE_KACHERY or (ON_GITHUB and not KACHERY_CLOUD_SET)


# this needs to be run only once: if we want to regenerate we need to start with sorting result
# TODO : regenerate the
Expand All @@ -43,7 +52,7 @@
# # https://figurl.org/f?v=npm://@fi-sci/figurl-sortingview@12/dist&d=sha1://058ab901610aa9d29df565595a3cc2a81a1b08e5


@pytest.mark.skipif(ON_GITHUB and not KACHERY_CLOUD_SET, reason="Kachery cloud secrets not available")
@pytest.mark.skipif(SKIP_KACHERY_REMOTE, reason="Kachery cloud secrets not available")
def test_gh_curation():
"""
Test curation using GitHub URI.
Expand Down Expand Up @@ -73,7 +82,7 @@ def test_gh_curation():
assert len(sorting_curated_gh_art_mua.unit_ids) == 5


@pytest.mark.skipif(ON_GITHUB and not KACHERY_CLOUD_SET, reason="Kachery cloud secrets not available")
@pytest.mark.skipif(SKIP_KACHERY_REMOTE, reason="Kachery cloud secrets not available")
def test_sha1_curation():
"""
Test curation using SHA1 URI.
Expand Down
Loading