File tree Expand file tree Collapse file tree
src/spikeinterface/curation/tests Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33import os
44import json
55import numpy as np
6+ import importlib .util
67
78import spikeinterface as si
89from spikeinterface .core import generate_sorting
2021ON_GITHUB = bool (os .getenv ("GITHUB_ACTIONS" ))
2122KACHERY_CLOUD_SET = bool (os .getenv ("KACHERY_API_KEY" ))
2223
24+ kachery_spec = importlib .util .find_spec ("kachery" )
25+ if kachery_spec is not None :
26+ HAVE_KACHERY = True
27+ else :
28+ HAVE_KACHERY = False
29+
30+
31+ SKIP_KACHERY_REMOTE = not HAVE_KACHERY or (ON_GITHUB and not KACHERY_CLOUD_SET )
2332
2433# this needs to be run only once: if we want to regenerate we need to start with sorting result
2534# TODO : regenerate the
4352# # https://figurl.org/f?v=npm://@fi-sci/figurl-sortingview@12/dist&d=sha1://058ab901610aa9d29df565595a3cc2a81a1b08e5
4453
4554
46- @pytest .mark .skipif (ON_GITHUB and not KACHERY_CLOUD_SET , reason = "Kachery cloud secrets not available" )
55+ @pytest .mark .skipif (SKIP_KACHERY_REMOTE , reason = "Kachery cloud secrets not available" )
4756def test_gh_curation ():
4857 """
4958 Test curation using GitHub URI.
@@ -73,7 +82,7 @@ def test_gh_curation():
7382 assert len (sorting_curated_gh_art_mua .unit_ids ) == 5
7483
7584
76- @pytest .mark .skipif (ON_GITHUB and not KACHERY_CLOUD_SET , reason = "Kachery cloud secrets not available" )
85+ @pytest .mark .skipif (SKIP_KACHERY_REMOTE , reason = "Kachery cloud secrets not available" )
7786def test_sha1_curation ():
7887 """
7988 Test curation using SHA1 URI.
You can’t perform that action at this time.
0 commit comments