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 11import pytest
22from pathlib import Path
33import os
4- import json
4+ import importlib . util
55import numpy as np
66
77import spikeinterface as si
2020ON_GITHUB = bool (os .getenv ("GITHUB_ACTIONS" ))
2121KACHERY_CLOUD_SET = bool (os .getenv ("KACHERY_API_KEY" ))
2222
23+ kachery_spec = importlib .util .find_spec ("kachery" )
24+ if kachery_spec is not None :
25+ HAVE_KACHERY = True
26+ else :
27+ HAVE_KACHERY = False
28+
29+
30+ SKIP_KACHERY_REMOTE = not HAVE_KACHERY or (ON_GITHUB and not KACHERY_CLOUD_SET )
31+
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