From b2d260176afc79fd08d951e639e55ea7f6f27408 Mon Sep 17 00:00:00 2001 From: bendichter Date: Tue, 23 Jan 2024 11:13:04 -0500 Subject: [PATCH 01/19] add inscopix extractor for cell_set --- .../extractors/inscopix/__init__.py | 1 + .../inscopix/inscopixsegmentationextractor.py | 71 +++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 src/roiextractors/extractors/inscopix/__init__.py create mode 100644 src/roiextractors/extractors/inscopix/inscopixsegmentationextractor.py diff --git a/src/roiextractors/extractors/inscopix/__init__.py b/src/roiextractors/extractors/inscopix/__init__.py new file mode 100644 index 00000000..765ecbc4 --- /dev/null +++ b/src/roiextractors/extractors/inscopix/__init__.py @@ -0,0 +1 @@ +from .inscopixsegmentationextractor import InscopixSegmentationExtractor \ No newline at end of file diff --git a/src/roiextractors/extractors/inscopix/inscopixsegmentationextractor.py b/src/roiextractors/extractors/inscopix/inscopixsegmentationextractor.py new file mode 100644 index 00000000..2ad4a651 --- /dev/null +++ b/src/roiextractors/extractors/inscopix/inscopixsegmentationextractor.py @@ -0,0 +1,71 @@ +from typing import Optional +import numpy as np + +from ...extraction_tools import PathType, ArrayType +from ...segmentationextractor import SegmentationExtractor + + +class InscopixSegmentationExtractor(SegmentationExtractor): + """A segmentation extractor for Inscopix.""" + + extractor_name = "InscopixSegmentationExtractor" + installed = True # check at class level if installed or not + is_writable = False + mode = "file" + installation_mesg = "" # error message when not installed + + def __init__(self, file_path: PathType, sampling_frequency: Optional[float] = None): + """Initialize a InscopixSegmentationExtractor instance. + + Parameters + ---------- + file_path: str + The location of the folder containing Inscopix *.mat output file. + """ + import isx + + SegmentationExtractor.__init__(self) + self.file_path = file_path + self.cell_set = isx.CellSet.read("cellset.isxd") + + def get_num_rois(self): + return self.cell_set.num_cells + + def get_roi_image_masks(self, roi_ids=None) -> np.ndarray: + if roi_ids is None: + roi_idx_ = range(self.get_num_rois()) + else: + all_ids = self.get_roi_ids() + roi_idx_ = [all_ids.index(i) for i in roi_ids] + return np.hstack([self.cell_set.get_cell_image_data(roi_id) for roi_id in roi_idx_]) + + def get_roi_ids(self) -> list: + return [self.cell_set.get_cell_name(x) for x in self.get_num_rois()] + + def get_image_size(self) -> ArrayType: + num_pixels = self.cell_set.footer["spacingInfo"]["numPixels"] + return num_pixels["x"], num_pixels["y"] + + def get_accepted_list(self) -> list: + return [x for x in self.get_num_rois() if self.cell_set.get_cell_status(x) == "accepted"] + + def get_rejected_list(self) -> list: + return [x for x in self.get_num_rois() if self.cell_set.get_cell_status(x) == "rejected"] + + def get_traces(self, roi_ids=None, start_frame=None, end_frame=None, name="raw") -> ArrayType: + if roi_ids is None: + roi_idx_ = range(self.get_num_rois()) + else: + all_ids = self.get_roi_ids() + roi_idx_ = [all_ids.index(i) for i in roi_ids] + if start_frame is None: + start_frame = 0 + if end_frame is None: + end_frame = self.cell_set.get_cell_num_frames(0) + return np.hstack([self.cell_set.get_cell_trace_data(roi_id)[start_frame, end_frame] for roi_id in roi_idx_]) + + def get_num_frames(self) -> int: + return self.cell_set.footer["timingInfo"]["numTimes"] + + def get_sampling_frequency(self): + return 1 / self.cell_set.timing.period.secs_float \ No newline at end of file From 4877a1ac87aaa63e53d19c7dd034096debed0e1f Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 23 Jan 2024 16:13:37 +0000 Subject: [PATCH 02/19] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/roiextractors/extractors/inscopix/__init__.py | 2 +- .../extractors/inscopix/inscopixsegmentationextractor.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/roiextractors/extractors/inscopix/__init__.py b/src/roiextractors/extractors/inscopix/__init__.py index 765ecbc4..31a04a58 100644 --- a/src/roiextractors/extractors/inscopix/__init__.py +++ b/src/roiextractors/extractors/inscopix/__init__.py @@ -1 +1 @@ -from .inscopixsegmentationextractor import InscopixSegmentationExtractor \ No newline at end of file +from .inscopixsegmentationextractor import InscopixSegmentationExtractor diff --git a/src/roiextractors/extractors/inscopix/inscopixsegmentationextractor.py b/src/roiextractors/extractors/inscopix/inscopixsegmentationextractor.py index 2ad4a651..a37c0afc 100644 --- a/src/roiextractors/extractors/inscopix/inscopixsegmentationextractor.py +++ b/src/roiextractors/extractors/inscopix/inscopixsegmentationextractor.py @@ -68,4 +68,4 @@ def get_num_frames(self) -> int: return self.cell_set.footer["timingInfo"]["numTimes"] def get_sampling_frequency(self): - return 1 / self.cell_set.timing.period.secs_float \ No newline at end of file + return 1 / self.cell_set.timing.period.secs_float From 9c75a348c5d8c5a7409ffc8ebd627f0d16c70e12 Mon Sep 17 00:00:00 2001 From: bendichter Date: Tue, 23 Jan 2024 12:59:32 -0500 Subject: [PATCH 03/19] add tests --- src/roiextractors/extractorlist.py | 2 + .../__init__.py | 0 .../inscopixsegmentationextractor.py | 18 +++--- tests/test_inscopix_segmentation.py | 55 +++++++++++++++++++ 4 files changed, 64 insertions(+), 11 deletions(-) rename src/roiextractors/extractors/{inscopix => inscopixextractors}/__init__.py (100%) rename src/roiextractors/extractors/{inscopix => inscopixextractors}/inscopixsegmentationextractor.py (72%) create mode 100644 tests/test_inscopix_segmentation.py diff --git a/src/roiextractors/extractorlist.py b/src/roiextractors/extractorlist.py index 73d0bf6e..4bc78831 100644 --- a/src/roiextractors/extractorlist.py +++ b/src/roiextractors/extractorlist.py @@ -21,6 +21,7 @@ BrukerTiffSinglePlaneImagingExtractor, MicroManagerTiffImagingExtractor, ) +from .extractors.inscopixextractors import InscopixSegmentationExtractor from .extractors.sbximagingextractor import SbxImagingExtractor from .extractors.memmapextractors import NumpyMemmapImagingExtractor from .extractors.memmapextractors import MemmapImagingExtractor @@ -55,6 +56,7 @@ ExtractSegmentationExtractor, SimaSegmentationExtractor, CaimanSegmentationExtractor, + InscopixSegmentationExtractor, ] imaging_extractor_dict = {imaging_class.extractor_name: imaging_class for imaging_class in imaging_extractor_full_list} diff --git a/src/roiextractors/extractors/inscopix/__init__.py b/src/roiextractors/extractors/inscopixextractors/__init__.py similarity index 100% rename from src/roiextractors/extractors/inscopix/__init__.py rename to src/roiextractors/extractors/inscopixextractors/__init__.py diff --git a/src/roiextractors/extractors/inscopix/inscopixsegmentationextractor.py b/src/roiextractors/extractors/inscopixextractors/inscopixsegmentationextractor.py similarity index 72% rename from src/roiextractors/extractors/inscopix/inscopixsegmentationextractor.py rename to src/roiextractors/extractors/inscopixextractors/inscopixsegmentationextractor.py index 2ad4a651..78aa5207 100644 --- a/src/roiextractors/extractors/inscopix/inscopixsegmentationextractor.py +++ b/src/roiextractors/extractors/inscopixextractors/inscopixsegmentationextractor.py @@ -14,7 +14,7 @@ class InscopixSegmentationExtractor(SegmentationExtractor): mode = "file" installation_mesg = "" # error message when not installed - def __init__(self, file_path: PathType, sampling_frequency: Optional[float] = None): + def __init__(self, file_path: PathType): """Initialize a InscopixSegmentationExtractor instance. Parameters @@ -26,7 +26,7 @@ def __init__(self, file_path: PathType, sampling_frequency: Optional[float] = No SegmentationExtractor.__init__(self) self.file_path = file_path - self.cell_set = isx.CellSet.read("cellset.isxd") + self.cell_set = isx.CellSet.read(file_path) def get_num_rois(self): return self.cell_set.num_cells @@ -40,17 +40,17 @@ def get_roi_image_masks(self, roi_ids=None) -> np.ndarray: return np.hstack([self.cell_set.get_cell_image_data(roi_id) for roi_id in roi_idx_]) def get_roi_ids(self) -> list: - return [self.cell_set.get_cell_name(x) for x in self.get_num_rois()] + return [self.cell_set.get_cell_name(x) for x in range(self.get_num_rois())] def get_image_size(self) -> ArrayType: num_pixels = self.cell_set.footer["spacingInfo"]["numPixels"] return num_pixels["x"], num_pixels["y"] def get_accepted_list(self) -> list: - return [x for x in self.get_num_rois() if self.cell_set.get_cell_status(x) == "accepted"] + return [id for x, id in enumerate(self.get_roi_ids()) if self.cell_set.get_cell_status(x) == "accepted"] def get_rejected_list(self) -> list: - return [x for x in self.get_num_rois() if self.cell_set.get_cell_status(x) == "rejected"] + return [id for x, id in enumerate(self.get_roi_ids()) if self.cell_set.get_cell_status(x) == "rejected"] def get_traces(self, roi_ids=None, start_frame=None, end_frame=None, name="raw") -> ArrayType: if roi_ids is None: @@ -58,14 +58,10 @@ def get_traces(self, roi_ids=None, start_frame=None, end_frame=None, name="raw") else: all_ids = self.get_roi_ids() roi_idx_ = [all_ids.index(i) for i in roi_ids] - if start_frame is None: - start_frame = 0 - if end_frame is None: - end_frame = self.cell_set.get_cell_num_frames(0) - return np.hstack([self.cell_set.get_cell_trace_data(roi_id)[start_frame, end_frame] for roi_id in roi_idx_]) + return np.vstack([self.cell_set.get_cell_trace_data(roi_id)[start_frame:end_frame] for roi_id in roi_idx_]) def get_num_frames(self) -> int: return self.cell_set.footer["timingInfo"]["numTimes"] - def get_sampling_frequency(self): + def get_sampling_frequency(self) -> float: return 1 / self.cell_set.timing.period.secs_float \ No newline at end of file diff --git a/tests/test_inscopix_segmentation.py b/tests/test_inscopix_segmentation.py new file mode 100644 index 00000000..dd7ab267 --- /dev/null +++ b/tests/test_inscopix_segmentation.py @@ -0,0 +1,55 @@ +import numpy as np +from numpy.testing import assert_array_equal + +from roiextractors import InscopixSegmentationExtractor + +from .setup_paths import OPHYS_DATA_PATH + + +def test_inscopix_segmentation_extractor(): + file_path = OPHYS_DATA_PATH / "segmentation_data" / "inscopix" / "cellset.isxd" + extractor = InscopixSegmentationExtractor(file_path=file_path) + + assert extractor.get_num_rois() == 4 + assert extractor.get_roi_ids() == ['C0', 'C1', 'C2', 'C3'] + assert extractor.get_accepted_list() == ['C0', 'C1', 'C2'] + assert extractor.get_rejected_list() == ['C3'] + assert extractor.get_image_size() == (398, 366) + assert extractor.get_num_frames() == 5444 + img = extractor.get_roi_image_masks(["C1"]) + assert img.shape == (366, 398) + assert np.testing.assert_allclose(extractor.get_sampling_frequency(), 9.998700168978033) + assert extractor.get_traces().shape == (4, 5444) + assert extractor.get_traces(start_frame=10, end_frame=20).shape == (4, 10) + assert extractor.get_traces(start_frame=10, end_frame=20, roi_ids=["C1"]).shape == (1, 10) + + +def test_inscopix_segmentation_extractor_part1(): + file_path = OPHYS_DATA_PATH / "segmentation_data" / "inscopix" / "cellset_series_part1.isxd" + extractor = InscopixSegmentationExtractor(file_path=file_path) + + assert extractor.get_num_rois() == 6 + assert extractor.get_roi_ids() == ['C0', 'C1', 'C2', 'C3', 'C4', 'C5'] + assert extractor.get_accepted_list() == [] + assert extractor.get_rejected_list() == [] + assert extractor.get_image_size() == (21, 21) + img = extractor.get_roi_image_masks(["C1"]) + assert img.shape == (21, 21) + assert extractor.get_sampling_frequency() == 10.0 + assert extractor.get_traces().shape == (6, 100) + assert extractor.get_traces(start_frame=10, end_frame=20).shape == (6, 10) + assert extractor.get_traces(start_frame=10, end_frame=20, roi_ids=["C1"]).shape == (1, 10) + assert extractor.get_num_frames() == 100 + + +def test_inscopix_segmentation_extractor_empty(): + file_path = OPHYS_DATA_PATH / "segmentation_data" / "inscopix" / "empty_cellset.isxd" + extractor = InscopixSegmentationExtractor(file_path=file_path) + + assert extractor.get_num_rois() == 0 + assert extractor.get_roi_ids() == [] + assert extractor.get_accepted_list() == [] + assert extractor.get_rejected_list() == [] + assert extractor.get_image_size() == (5, 4) + assert extractor.get_sampling_frequency() == 40.0 + assert extractor.get_num_frames() == 7 From 442bf14d8ce76f0e7a6d017570753f6da2a67715 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 23 Jan 2024 18:00:17 +0000 Subject: [PATCH 04/19] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- tests/test_inscopix_segmentation.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_inscopix_segmentation.py b/tests/test_inscopix_segmentation.py index dd7ab267..d62282c4 100644 --- a/tests/test_inscopix_segmentation.py +++ b/tests/test_inscopix_segmentation.py @@ -11,9 +11,9 @@ def test_inscopix_segmentation_extractor(): extractor = InscopixSegmentationExtractor(file_path=file_path) assert extractor.get_num_rois() == 4 - assert extractor.get_roi_ids() == ['C0', 'C1', 'C2', 'C3'] - assert extractor.get_accepted_list() == ['C0', 'C1', 'C2'] - assert extractor.get_rejected_list() == ['C3'] + assert extractor.get_roi_ids() == ["C0", "C1", "C2", "C3"] + assert extractor.get_accepted_list() == ["C0", "C1", "C2"] + assert extractor.get_rejected_list() == ["C3"] assert extractor.get_image_size() == (398, 366) assert extractor.get_num_frames() == 5444 img = extractor.get_roi_image_masks(["C1"]) @@ -29,7 +29,7 @@ def test_inscopix_segmentation_extractor_part1(): extractor = InscopixSegmentationExtractor(file_path=file_path) assert extractor.get_num_rois() == 6 - assert extractor.get_roi_ids() == ['C0', 'C1', 'C2', 'C3', 'C4', 'C5'] + assert extractor.get_roi_ids() == ["C0", "C1", "C2", "C3", "C4", "C5"] assert extractor.get_accepted_list() == [] assert extractor.get_rejected_list() == [] assert extractor.get_image_size() == (21, 21) From 7b2f202790c5490f2a6ff359820c2fec247c85d4 Mon Sep 17 00:00:00 2001 From: Ben Dichter Date: Tue, 23 Jan 2024 13:01:58 -0500 Subject: [PATCH 05/19] Update tests/test_inscopix_segmentation.py --- tests/test_inscopix_segmentation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_inscopix_segmentation.py b/tests/test_inscopix_segmentation.py index d62282c4..78e3d004 100644 --- a/tests/test_inscopix_segmentation.py +++ b/tests/test_inscopix_segmentation.py @@ -18,7 +18,7 @@ def test_inscopix_segmentation_extractor(): assert extractor.get_num_frames() == 5444 img = extractor.get_roi_image_masks(["C1"]) assert img.shape == (366, 398) - assert np.testing.assert_allclose(extractor.get_sampling_frequency(), 9.998700168978033) + np.testing.assert_allclose(extractor.get_sampling_frequency(), 9.998700168978033) assert extractor.get_traces().shape == (4, 5444) assert extractor.get_traces(start_frame=10, end_frame=20).shape == (4, 10) assert extractor.get_traces(start_frame=10, end_frame=20, roi_ids=["C1"]).shape == (1, 10) From 4478d0218769f16185a3cad6200ee9feb80ac1ff Mon Sep 17 00:00:00 2001 From: bendichter Date: Tue, 23 Jan 2024 14:00:32 -0500 Subject: [PATCH 06/19] add isx to requirements-full.txt --- requirements-full.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements-full.txt b/requirements-full.txt index bd515c3e..1b05e432 100644 --- a/requirements-full.txt +++ b/requirements-full.txt @@ -2,3 +2,4 @@ tifffile>=2018.10.18 scanimage-tiff-reader==1.4.1 neuroconv[video]>=0.4.6 # Uses the VideoCaptureContext class natsort>=8.3.1 +isx \ No newline at end of file From d95f28390fd91846561a030a287e621b37c04ad7 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 23 Jan 2024 19:00:47 +0000 Subject: [PATCH 07/19] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- requirements-full.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-full.txt b/requirements-full.txt index 1b05e432..efb448f6 100644 --- a/requirements-full.txt +++ b/requirements-full.txt @@ -2,4 +2,4 @@ tifffile>=2018.10.18 scanimage-tiff-reader==1.4.1 neuroconv[video]>=0.4.6 # Uses the VideoCaptureContext class natsort>=8.3.1 -isx \ No newline at end of file +isx From b98dc9f6693407e6f32503c079ba81653d417cb3 Mon Sep 17 00:00:00 2001 From: Ben Dichter Date: Tue, 23 Jan 2024 14:38:27 -0500 Subject: [PATCH 08/19] Update requirements-full.txt --- requirements-full.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-full.txt b/requirements-full.txt index efb448f6..085aa66e 100644 --- a/requirements-full.txt +++ b/requirements-full.txt @@ -2,4 +2,4 @@ tifffile>=2018.10.18 scanimage-tiff-reader==1.4.1 neuroconv[video]>=0.4.6 # Uses the VideoCaptureContext class natsort>=8.3.1 -isx +isx>=1.0.3 From d07037d52ee7c27a474c4fcaea3d5c6ec765163d Mon Sep 17 00:00:00 2001 From: bendichter Date: Tue, 23 Jan 2024 14:59:13 -0500 Subject: [PATCH 09/19] give in to strong typing --- .../inscopixextractors/inscopixsegmentationextractor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/roiextractors/extractors/inscopixextractors/inscopixsegmentationextractor.py b/src/roiextractors/extractors/inscopixextractors/inscopixsegmentationextractor.py index 9b067fe9..23527e82 100644 --- a/src/roiextractors/extractors/inscopixextractors/inscopixsegmentationextractor.py +++ b/src/roiextractors/extractors/inscopixextractors/inscopixsegmentationextractor.py @@ -26,7 +26,7 @@ def __init__(self, file_path: PathType): SegmentationExtractor.__init__(self) self.file_path = file_path - self.cell_set = isx.CellSet.read(file_path) + self.cell_set = isx.CellSet.read(str(file_path)) def get_num_rois(self): return self.cell_set.num_cells From 3931852313af04e9d5d11b566bebcd4630fd7888 Mon Sep 17 00:00:00 2001 From: Ben Dichter Date: Tue, 23 Jan 2024 15:01:11 -0500 Subject: [PATCH 10/19] Update run-tests.yml rmv py3.8 --- .github/workflows/run-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 1723bbd9..c82c9dd6 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -21,7 +21,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: [3.8, 3.9, "3.10", 3.11] + python-version: ["3.9", "3.10", "3.11"] os: [ubuntu-latest, windows-latest, macos-latest] steps: - uses: s-weigand/setup-conda@v1 From 893255613533bb3d002bd73bafe6e09f35b2d102 Mon Sep 17 00:00:00 2001 From: bendichter Date: Tue, 23 Jan 2024 15:04:42 -0500 Subject: [PATCH 11/19] fix data paths --- tests/test_inscopix_segmentation.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_inscopix_segmentation.py b/tests/test_inscopix_segmentation.py index 78e3d004..b44dc356 100644 --- a/tests/test_inscopix_segmentation.py +++ b/tests/test_inscopix_segmentation.py @@ -7,7 +7,7 @@ def test_inscopix_segmentation_extractor(): - file_path = OPHYS_DATA_PATH / "segmentation_data" / "inscopix" / "cellset.isxd" + file_path = OPHYS_DATA_PATH / "segmentation_datasets" / "inscopix" / "cellset.isxd" extractor = InscopixSegmentationExtractor(file_path=file_path) assert extractor.get_num_rois() == 4 @@ -25,7 +25,7 @@ def test_inscopix_segmentation_extractor(): def test_inscopix_segmentation_extractor_part1(): - file_path = OPHYS_DATA_PATH / "segmentation_data" / "inscopix" / "cellset_series_part1.isxd" + file_path = OPHYS_DATA_PATH / "segmentation_datasets" / "inscopix" / "cellset_series_part1.isxd" extractor = InscopixSegmentationExtractor(file_path=file_path) assert extractor.get_num_rois() == 6 @@ -43,7 +43,7 @@ def test_inscopix_segmentation_extractor_part1(): def test_inscopix_segmentation_extractor_empty(): - file_path = OPHYS_DATA_PATH / "segmentation_data" / "inscopix" / "empty_cellset.isxd" + file_path = OPHYS_DATA_PATH / "segmentation_datasets" / "inscopix" / "empty_cellset.isxd" extractor = InscopixSegmentationExtractor(file_path=file_path) assert extractor.get_num_rois() == 0 From 79157095355990d09febd563164b9e786f7b1a15 Mon Sep 17 00:00:00 2001 From: bendichter Date: Tue, 23 Jan 2024 15:09:23 -0500 Subject: [PATCH 12/19] rmv py3.8 --- .github/ISSUE_TEMPLATE/bug_report.yml | 5 +++-- .github/workflows/auto-publish.yml | 2 +- .readthedocs.yml | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index fa063e56..728ebd4f 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -60,9 +60,10 @@ body: attributes: label: Python Version options: - - 3.7 - - 3.8 - 3.9 + - 3.10 + - 3.11 + - 3.12 validations: required: true - type: textarea diff --git a/.github/workflows/auto-publish.yml b/.github/workflows/auto-publish.yml index dd44b7fb..74860b92 100644 --- a/.github/workflows/auto-publish.yml +++ b/.github/workflows/auto-publish.yml @@ -15,7 +15,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: "3.8" + python-version: "3.9" - name: Install dependencies run: | python -m pip install --upgrade pip diff --git a/.readthedocs.yml b/.readthedocs.yml index 619e29d1..b11a8483 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -7,6 +7,6 @@ sphinx: configuration: docs/source/conf.py python: - version: 3.8 + version: 3.9 install: - requirements: docs/requirements_doc.txt From 0d29f5e6e5b79bec2f6049c4a8c3add7a45b508d Mon Sep 17 00:00:00 2001 From: bendichter Date: Tue, 23 Jan 2024 15:17:46 -0500 Subject: [PATCH 13/19] add docstring to inscopix segmentation extrator module --- .../inscopixextractors/inscopixsegmentationextractor.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/roiextractors/extractors/inscopixextractors/inscopixsegmentationextractor.py b/src/roiextractors/extractors/inscopixextractors/inscopixsegmentationextractor.py index 23527e82..b910d41e 100644 --- a/src/roiextractors/extractors/inscopixextractors/inscopixsegmentationextractor.py +++ b/src/roiextractors/extractors/inscopixextractors/inscopixsegmentationextractor.py @@ -1,4 +1,7 @@ -from typing import Optional +""" +Inscopix Segmentation Extractor +""" + import numpy as np from ...extraction_tools import PathType, ArrayType From 179076943a748d96c3a9cfce97e21d1764a6f724 Mon Sep 17 00:00:00 2001 From: bendichter Date: Tue, 23 Jan 2024 15:22:11 -0500 Subject: [PATCH 14/19] add docstring to inscopix imaging extrator module --- src/roiextractors/extractors/inscopixextractors/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/roiextractors/extractors/inscopixextractors/__init__.py b/src/roiextractors/extractors/inscopixextractors/__init__.py index 31a04a58..b929910d 100644 --- a/src/roiextractors/extractors/inscopixextractors/__init__.py +++ b/src/roiextractors/extractors/inscopixextractors/__init__.py @@ -1 +1,5 @@ +""" +Extractors for Inscopix data. +""" + from .inscopixsegmentationextractor import InscopixSegmentationExtractor From 5f49388c3f06fe5f06d142eb2763a8155fbe4253 Mon Sep 17 00:00:00 2001 From: Ben Dichter Date: Sun, 12 May 2024 20:55:21 -0500 Subject: [PATCH 15/19] fix precommit tests --- src/roiextractors/extractors/inscopixextractors/__init__.py | 4 +--- .../inscopixextractors/inscopixsegmentationextractor.py | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/roiextractors/extractors/inscopixextractors/__init__.py b/src/roiextractors/extractors/inscopixextractors/__init__.py index b929910d..b07bc4b2 100644 --- a/src/roiextractors/extractors/inscopixextractors/__init__.py +++ b/src/roiextractors/extractors/inscopixextractors/__init__.py @@ -1,5 +1,3 @@ -""" -Extractors for Inscopix data. -""" +"""Extractors for Inscopix data.""" from .inscopixsegmentationextractor import InscopixSegmentationExtractor diff --git a/src/roiextractors/extractors/inscopixextractors/inscopixsegmentationextractor.py b/src/roiextractors/extractors/inscopixextractors/inscopixsegmentationextractor.py index b910d41e..15064e36 100644 --- a/src/roiextractors/extractors/inscopixextractors/inscopixsegmentationextractor.py +++ b/src/roiextractors/extractors/inscopixextractors/inscopixsegmentationextractor.py @@ -1,6 +1,4 @@ -""" -Inscopix Segmentation Extractor -""" +"""Inscopix Segmentation Extractor.""" import numpy as np From efa7ee72c7a680768fc696cc7b842fbbbca8a5bc Mon Sep 17 00:00:00 2001 From: Ben Dichter Date: Sun, 12 May 2024 21:56:51 -0400 Subject: [PATCH 16/19] Update .readthedocs.yml --- .readthedocs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index acbb5bc5..474d76ba 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -8,7 +8,7 @@ build: python: version: 3.9 install: - - requirements: docs/requirements_doc.txt + - requirements: requirements-rtd.txt sphinx: configuration: docs/source/conf.py From 5cfc38b5aa3e65458cf2f717eefed8c52d217dcc Mon Sep 17 00:00:00 2001 From: Ben Dichter Date: Sun, 12 May 2024 21:57:17 -0400 Subject: [PATCH 17/19] Update .readthedocs.yml --- .readthedocs.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index 474d76ba..50688d3a 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -6,7 +6,6 @@ build: python: "3.10" python: - version: 3.9 install: - requirements: requirements-rtd.txt From 894da1a9bec9bd5d10a5fc6241a3c806e2fee428 Mon Sep 17 00:00:00 2001 From: Ben Dichter Date: Sun, 12 May 2024 21:58:48 -0400 Subject: [PATCH 18/19] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b810c03..938e062b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ ### Features * Updated testing workflows to include python 3.12, m1/intel macos, and dev tests to check neuroconv: [PR #317](https://github.com/catalystneuro/roiextractors/pull/317) +* Added InscopixSegmentationExtractor [PR #275](https://github.com/catalystneuro/roiextractors/pull/275) ### Fixes From 44075b7dee2646ce9776ae4433456d8d83b6a220 Mon Sep 17 00:00:00 2001 From: Ben Dichter Date: Sun, 12 May 2024 21:59:02 -0400 Subject: [PATCH 19/19] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 938e062b..1f3bcbe9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ ### Features * Updated testing workflows to include python 3.12, m1/intel macos, and dev tests to check neuroconv: [PR #317](https://github.com/catalystneuro/roiextractors/pull/317) -* Added InscopixSegmentationExtractor [PR #275](https://github.com/catalystneuro/roiextractors/pull/275) +* Added `InscopixSegmentationExtractor` [PR #275](https://github.com/catalystneuro/roiextractors/pull/275) ### Fixes