diff --git a/element_array_ephys/ephys_acute.py b/element_array_ephys/ephys_acute.py index c2627fc9..50371104 100644 --- a/element_array_ephys/ephys_acute.py +++ b/element_array_ephys/ephys_acute.py @@ -185,7 +185,7 @@ def auto_generate_entries(cls, session_key): probe_dir = meta_filepath.parent try: - probe_number = re.search("(imec)?\d{1}$", probe_dir.name).group() + probe_number = re.search(r"(imec)?\d{1}$", probe_dir.name).group() probe_number = int(probe_number.replace("imec", "")) except AttributeError: probe_number = meta_fp_idx diff --git a/element_array_ephys/ephys_no_curation.py b/element_array_ephys/ephys_no_curation.py index 856ddfeb..cd0909c9 100644 --- a/element_array_ephys/ephys_no_curation.py +++ b/element_array_ephys/ephys_no_curation.py @@ -190,7 +190,7 @@ def auto_generate_entries(cls, session_key): probe_dir = meta_filepath.parent try: - probe_number = re.search("(imec)?\d{1}$", probe_dir.name).group() + probe_number = re.search(r"(imec)?\d{1}$", probe_dir.name).group() probe_number = int(probe_number.replace("imec", "")) except AttributeError: probe_number = meta_fp_idx diff --git a/element_array_ephys/readers/kilosort.py b/element_array_ephys/readers/kilosort.py index 80ae5510..4b50619d 100644 --- a/element_array_ephys/readers/kilosort.py +++ b/element_array_ephys/readers/kilosort.py @@ -201,14 +201,14 @@ def extract_clustering_info(cluster_output_dir): is_curated = bool(np.any(curation_row)) if creation_time is None and is_curated: row_meta = phylog.meta[np.where(curation_row)[0].max()] - datetime_str = re.search("\d{2}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}", row_meta) + datetime_str = re.search(r"\d{2}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}", row_meta) if datetime_str: creation_time = datetime.strptime( datetime_str.group(), "%Y-%m-%d %H:%M:%S" ) else: creation_time = datetime.fromtimestamp(phylog_filepath.stat().st_ctime) - time_str = re.search("\d{2}:\d{2}:\d{2}", row_meta) + time_str = re.search(r"\d{2}:\d{2}:\d{2}", row_meta) if time_str: creation_time = datetime.combine( creation_time.date(), diff --git a/element_array_ephys/readers/kilosort_triggering.py b/element_array_ephys/readers/kilosort_triggering.py index 8e180be9..fe7cc3c3 100644 --- a/element_array_ephys/readers/kilosort_triggering.py +++ b/element_array_ephys/readers/kilosort_triggering.py @@ -98,7 +98,7 @@ def __init__( def parse_input_filename(self): meta_filename = next(self._npx_input_dir.glob("*.ap.meta")).name - match = re.search("(.*)_g(\d)_t(\d+|cat)\.imec(\d?)\.ap\.meta", meta_filename) + match = re.search(r"(.*)_g(\d)_t(\d+|cat)\.imec(\d?)\.ap\.meta", meta_filename) session_str, gate_str, trigger_str, probe_str = match.groups() return session_str, gate_str, trigger_str, probe_str or "0" @@ -719,7 +719,7 @@ def _get_median_subtraction_duration_from_log(self): ) and previous_line.startswith("Total processing time:"): # regex to search for the processing duration - a float value duration = int( - re.search("\d+\.?\d+", previous_line).group() + re.search(r"\d+\.?\d+", previous_line).group() ) return duration previous_line = line diff --git a/setup.py b/setup.py index 0ff4bf08..19a4a5ae 100644 --- a/setup.py +++ b/setup.py @@ -35,7 +35,7 @@ "plotly", "seaborn", "spikeinterface", - "scikit-image", + "scikit-image>=0.20", "nbformat>=4.2.0", "pyopenephys>=1.1.6", ],