From e139e75d6d9a5bcbde9ce133db84a83ab7724a9e Mon Sep 17 00:00:00 2001 From: Heberto Mayorquin Date: Wed, 19 Jun 2024 15:36:09 -0600 Subject: [PATCH 1/2] Cell explorer deprecations (#3046) * cell explorer deprecations --- .../cellexplorersortingextractor.py | 26 ++----------------- 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/src/spikeinterface/extractors/cellexplorersortingextractor.py b/src/spikeinterface/extractors/cellexplorersortingextractor.py index 3436313b4d..9b77965c43 100644 --- a/src/spikeinterface/extractors/cellexplorersortingextractor.py +++ b/src/spikeinterface/extractors/cellexplorersortingextractor.py @@ -2,8 +2,7 @@ import numpy as np from pathlib import Path -import warnings -import datetime + from ..core import BaseSorting, BaseSortingSegment from ..core.core_tools import define_function_from_class @@ -36,36 +35,15 @@ class CellExplorerSortingExtractor(BaseSorting): def __init__( self, - file_path: str | Path | None = None, + file_path: str | Path, sampling_frequency: float | None = None, session_info_file_path: str | Path | None = None, - spikes_matfile_path: str | Path | None = None, ): try: from pymatreader import read_mat except ImportError: raise ImportError(self.installation_mesg) - assert ( - file_path is not None or spikes_matfile_path is not None - ), "Either file_path or spikes_matfile_path must be provided!" - - if spikes_matfile_path is not None: - # Raise an error if the warning period has expired - deprecation_issued = datetime.datetime(2023, 4, 1) - deprecation_deadline = deprecation_issued + datetime.timedelta(days=180) - if datetime.datetime.now() > deprecation_deadline: - raise ValueError("The spikes_matfile_path argument is no longer supported in. Use file_path instead.") - - # Otherwise, issue a DeprecationWarning - else: - warnings.warn( - "The spikes_matfile_path argument is deprecated and will be removed in six months. " - "Use file_path instead.", - DeprecationWarning, - ) - file_path = spikes_matfile_path if file_path is None else file_path - self.spikes_cellinfo_path = Path(file_path) self.session_path = self.spikes_cellinfo_path.parent self.session_id = self.spikes_cellinfo_path.stem.split(".")[0] From 328bba007391c47a5f08a1f0897119b5ea09bc05 Mon Sep 17 00:00:00 2001 From: Heberto Mayorquin Date: Thu, 20 Jun 2024 08:56:54 -0600 Subject: [PATCH 2/2] Fix intan kwargs (#3054) * add "ignore_integrity_checks" to intan kwargs --- src/spikeinterface/extractors/neoextractors/intan.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/spikeinterface/extractors/neoextractors/intan.py b/src/spikeinterface/extractors/neoextractors/intan.py index 7b3816a04d..c37ff47807 100644 --- a/src/spikeinterface/extractors/neoextractors/intan.py +++ b/src/spikeinterface/extractors/neoextractors/intan.py @@ -53,6 +53,8 @@ def __init__( ) self._kwargs.update(dict(file_path=str(Path(file_path).absolute()))) + if "ignore_integrity_checks" in neo_kwargs: + self._kwargs["ignore_integrity_checks"] = neo_kwargs["ignore_integrity_checks"] @classmethod def map_to_neo_kwargs(cls, file_path, ignore_integrity_checks: bool = False):