Skip to content
Open
Show file tree
Hide file tree
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: 15 additions & 0 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,21 @@ def create_cache_folder(tmp_path_factory):
return cache_folder


@pytest.fixture(scope="module")
def debug_plots(request):
"""Return True if debug plots should be shown."""
return request.config.getoption("--debug-plots")


def pytest_addoption(parser):
parser.addoption(
"--debug-plots",
action="store_true",
default=False,
help="Enable debug plots during tests",
)


def pytest_collection_modifyitems(config, items):
"""
This function marks (in the pytest sense) the tests according to their name and file_path location
Expand Down
12 changes: 7 additions & 5 deletions src/spikeinterface/core/node_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,11 +500,13 @@ def check_graph(nodes):
Check that node list is orderd in a good (parents are before children)
"""

node0 = nodes[0]
if not isinstance(node0, PeakSource):
raise ValueError(
"Peak pipeline graph must have as first element a PeakSource (PeakDetector or PeakRetriever or SpikeRetriever"
)
# Do not remove this, this is to remenber that in previous version the first node needed to be
# a detectot but not anymore
# node0 = nodes[0]
# if not isinstance(node0, PeakSource):
# raise ValueError(
# "Peak pipeline graph must have as first element a PeakSource (PeakDetector or PeakRetriever or SpikeRetriever"
# )

for i, node in enumerate(nodes):
assert isinstance(node, PipelineNode), f"Node {node} is not an instance of PipelineNode"
Expand Down
2 changes: 2 additions & 0 deletions src/spikeinterface/preprocessing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
PreprocessingPipeline,
)

from .detect_artifacts import detect_artifact_periods, detect_artifact_periods_by_envelope, detect_saturation_periods

# for snippets
from .align_snippets import AlignSnippets
from warnings import warn
Expand Down
Loading
Loading