From 6487907383d49c84c35cda43e3ba45fb3b44b514 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 18 Dec 2024 09:55:23 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .gitignore | 2 +- src/ibl_to_nwb/datainterfaces/_brainwide_map_trials.py | 2 +- src/ibl_to_nwb/datainterfaces/_ibl_sorting_extractor.py | 5 ++--- src/ibl_to_nwb/datainterfaces/_ibl_sorting_interface.py | 5 ++--- src/ibl_to_nwb/datainterfaces/_lick_times.py | 2 +- src/ibl_to_nwb/datainterfaces/_pupil_tracking.py | 5 +++-- src/ibl_to_nwb/datainterfaces/_wheel_movement.py | 3 ++- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index 44e36ed..5ca4667 100644 --- a/.gitignore +++ b/.gitignore @@ -134,4 +134,4 @@ dmypy.json #misc endpoint_schemas/ tests/ -src/local \ No newline at end of file +src/local diff --git a/src/ibl_to_nwb/datainterfaces/_brainwide_map_trials.py b/src/ibl_to_nwb/datainterfaces/_brainwide_map_trials.py index 9b50398..e0a5688 100644 --- a/src/ibl_to_nwb/datainterfaces/_brainwide_map_trials.py +++ b/src/ibl_to_nwb/datainterfaces/_brainwide_map_trials.py @@ -1,13 +1,13 @@ from pathlib import Path from typing import Optional +from brainbox.io.one import SessionLoader from hdmf.common import VectorData from neuroconv.basedatainterface import BaseDataInterface from neuroconv.utils import load_dict_from_file from one.api import ONE from pynwb import NWBFile from pynwb.epoch import TimeIntervals -from brainbox.io.one import SessionLoader class BrainwideMapTrialsInterface(BaseDataInterface): diff --git a/src/ibl_to_nwb/datainterfaces/_ibl_sorting_extractor.py b/src/ibl_to_nwb/datainterfaces/_ibl_sorting_extractor.py index 760a3fb..75cbbaa 100644 --- a/src/ibl_to_nwb/datainterfaces/_ibl_sorting_extractor.py +++ b/src/ibl_to_nwb/datainterfaces/_ibl_sorting_extractor.py @@ -5,12 +5,11 @@ import numpy as np import pandas as pd -from pydantic import DirectoryPath -from spikeinterface import BaseSorting, BaseSortingSegment -from one.api import ONE from brainbox.io.one import SpikeSortingLoader from iblatlas.atlas import AllenAtlas from iblatlas.regions import BrainRegions +from one.api import ONE +from spikeinterface import BaseSorting, BaseSortingSegment class IblSortingExtractor(BaseSorting): diff --git a/src/ibl_to_nwb/datainterfaces/_ibl_sorting_interface.py b/src/ibl_to_nwb/datainterfaces/_ibl_sorting_interface.py index a27471b..61f88b6 100644 --- a/src/ibl_to_nwb/datainterfaces/_ibl_sorting_interface.py +++ b/src/ibl_to_nwb/datainterfaces/_ibl_sorting_interface.py @@ -7,10 +7,10 @@ BaseSortingExtractorInterface, ) from neuroconv.utils import load_dict_from_file -from pydantic import DirectoryPath +from one.api import ONE from ._ibl_sorting_extractor import IblSortingExtractor -from one.api import ONE + class IblSortingInterface(BaseSortingExtractorInterface): Extractor = IblSortingExtractor @@ -40,4 +40,3 @@ def get_metadata(self) -> dict: ) return metadata - diff --git a/src/ibl_to_nwb/datainterfaces/_lick_times.py b/src/ibl_to_nwb/datainterfaces/_lick_times.py index f885a70..b971a13 100644 --- a/src/ibl_to_nwb/datainterfaces/_lick_times.py +++ b/src/ibl_to_nwb/datainterfaces/_lick_times.py @@ -6,7 +6,7 @@ from one.api import ONE from pynwb import NWBFile from pynwb.file import DynamicTable -from brainbox.io.one import SessionLoader + class LickInterface(BaseDataInterface): def __init__(self, one: ONE, session: str, revision: Optional[str] = None): diff --git a/src/ibl_to_nwb/datainterfaces/_pupil_tracking.py b/src/ibl_to_nwb/datainterfaces/_pupil_tracking.py index d8eb6bf..5946c02 100644 --- a/src/ibl_to_nwb/datainterfaces/_pupil_tracking.py +++ b/src/ibl_to_nwb/datainterfaces/_pupil_tracking.py @@ -4,13 +4,14 @@ from typing import Optional import numpy as np +from brainbox.io.one import SessionLoader from neuroconv.basedatainterface import BaseDataInterface from neuroconv.tools.nwb_helpers import get_module from neuroconv.utils import load_dict_from_file from one.api import ONE from pynwb import TimeSeries from pynwb.behavior import PupilTracking -from brainbox.io.one import SessionLoader + class PupilTrackingInterface(BaseDataInterface): def __init__(self, one: ONE, session: str, camera_name: str, revision: Optional[str] = None): @@ -26,7 +27,7 @@ def get_metadata(self) -> dict: pupils_metadata = load_dict_from_file(file_path=Path(__file__).parent.parent / "_metadata" / "pupils.yml") metadata.update(pupils_metadata) - + return metadata def add_to_nwbfile(self, nwbfile, metadata: dict): diff --git a/src/ibl_to_nwb/datainterfaces/_wheel_movement.py b/src/ibl_to_nwb/datainterfaces/_wheel_movement.py index 31d8709..42dd014 100644 --- a/src/ibl_to_nwb/datainterfaces/_wheel_movement.py +++ b/src/ibl_to_nwb/datainterfaces/_wheel_movement.py @@ -2,6 +2,7 @@ from typing import Optional from brainbox.behavior import wheel as wheel_methods +from brainbox.io.one import SessionLoader from neuroconv.basedatainterface import BaseDataInterface from neuroconv.tools.nwb_helpers import get_module from neuroconv.utils import load_dict_from_file @@ -9,7 +10,7 @@ from pynwb import TimeSeries from pynwb.behavior import CompassDirection, SpatialSeries from pynwb.epoch import TimeIntervals -from brainbox.io.one import SessionLoader + class WheelInterface(BaseDataInterface): def __init__(self, one: ONE, session: str, revision: Optional[str] = None):