Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 24, 2025
1 parent dff1457 commit 2081ee3
Show file tree
Hide file tree
Showing 31 changed files with 91 additions and 91 deletions.
6 changes: 3 additions & 3 deletions src/neuroconv/basedatainterface.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def __init__(self, verbose: bool = False, **source_data):
def get_metadata_schema(self) -> dict:
"""
Retrieve JSON schema for metadata.
Returns
-------
dict
Expand All @@ -86,7 +86,7 @@ def get_metadata_schema(self) -> dict:
def get_metadata(self) -> DeepDict:
"""
Child DataInterface classes should override this to match their metadata.
Returns
-------
DeepDict
Expand Down Expand Up @@ -121,7 +121,7 @@ def validate_metadata(self, metadata: dict, append_mode: bool = False) -> None:
def get_conversion_options_schema(self) -> dict:
"""
Infer the JSON schema for the conversion options from the method signature (annotation typing).
Returns
-------
dict
Expand Down
2 changes: 1 addition & 1 deletion src/neuroconv/baseextractorinterface.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class BaseExtractorInterface(BaseTemporalAlignmentInterface, ABC):
def get_extractor(cls):
"""
Get the extractor class for this interface.
Returns
-------
type
Expand Down
16 changes: 8 additions & 8 deletions src/neuroconv/datainterfaces/behavior/video/video_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def get_video_timestamps(self, max_frames: Optional[int] = None, display_progres
def get_video_fps(self):
"""
Return the internal frames per second (fps) for a video file.
Returns
-------
float
Expand All @@ -99,7 +99,7 @@ def get_video_fps(self):
def get_frame_shape(self) -> Tuple:
"""
Return the shape of frames from a video file.
Returns
-------
Tuple
Expand All @@ -126,7 +126,7 @@ def frame_count(self, val: int):
def get_video_frame_count(self):
"""
Get the total number of frames in the video.
Returns
-------
int
Expand All @@ -144,12 +144,12 @@ def _video_frame_count(self):
def get_cv_attribute(attribute_name: str):
"""
Get an OpenCV attribute by name.
Parameters
----------
attribute_name : str
The name of the OpenCV attribute to get.
Returns
-------
Any
Expand Down Expand Up @@ -178,12 +178,12 @@ def current_frame(self, frame_number: int):
def get_video_frame(self, frame_number: int):
"""
Return the specific frame from a video as an RGB colorspace.
Parameters
----------
frame_number : int
The index of the frame to retrieve.
Returns
-------
numpy.ndarray
Expand All @@ -200,7 +200,7 @@ def get_video_frame(self, frame_number: int):
def get_video_frame_dtype(self):
"""
Return the dtype for frame in a video file.
Returns
-------
numpy.dtype
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def __init__(self, verbose: bool = False, es_key: str = "ElectricalSeries", **so
def get_metadata_schema(self) -> dict:
"""
Compile metadata schema for the RecordingExtractor.
Returns
-------
dict
Expand Down Expand Up @@ -96,7 +96,7 @@ def get_metadata_schema(self) -> dict:
def get_metadata(self) -> DeepDict:
"""
Get metadata for the recording extractor.
Returns
-------
DeepDict
Expand Down Expand Up @@ -264,7 +264,7 @@ def set_probe(self, probe, group_mode: Literal["by_shank", "by_probe"]):
def has_probe(self) -> bool:
"""
Check if the recording extractor has probe information.
Returns
-------
bool
Expand All @@ -287,12 +287,12 @@ def align_by_interpolation(
def subset_recording(self, stub_test: bool = False):
"""
Subset a recording extractor according to stub and channel subset options.
Parameters
----------
stub_test : bool, default: False
If True, only a subset of frames will be included.
Returns
-------
spikeinterface.core.BaseRecording
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def __init__(self, verbose: bool = False, **source_data):
def get_metadata_schema(self) -> dict:
"""
Compile metadata schema for the RecordingExtractor.
Returns
-------
dict
Expand Down Expand Up @@ -95,13 +95,13 @@ def get_original_timestamps(self) -> np.ndarray:
def get_timestamps(self) -> Union[np.ndarray, list[np.ndarray]]:
"""
Get the timestamps for the sorting data.
Returns
-------
numpy.ndarray or list of numpy.ndarray
The timestamps for each spike in the sorting data. If there are multiple segments,
returns a list of timestamp arrays.
Raises
------
NotImplementedError
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ def get_xml_file_path(data_file_path: str) -> str:
Infer the xml_file_path from the data_file_path (.dat or .eeg).
Assumes the two are in the same folder and follow the session_id naming convention.
Parameters
----------
data_file_path : str
Path to the data file (.dat or .eeg)
Returns
-------
str
Expand All @@ -29,12 +29,12 @@ def get_xml_file_path(data_file_path: str) -> str:
def get_xml(xml_file_path: str):
"""
Auxiliary function for retrieving root of xml.
Parameters
----------
xml_file_path : str
Path to the XML file.
Returns
-------
lxml.etree._Element
Expand Down Expand Up @@ -131,7 +131,7 @@ def get_channel_groups(xml_file_path: str) -> list:
def get_session_start_time(xml_file_path: str) -> datetime:
"""
Auxiliary function for retrieving the session start time from the xml file.
Parameters
----------
xml_file_path : str
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,12 @@ def get_source_schema(self) -> dict:
def get_ecephys_metadata(xml_file_path: str) -> dict:
"""
Auto-populates ecephys metadata from the xml_file_path.
Parameters
----------
xml_file_path : str
Path to the XML file containing device and electrode configuration.
Returns
-------
dict
Expand Down Expand Up @@ -178,7 +178,7 @@ def __init__(
def get_metadata(self) -> dict:
"""
Get metadata for the NeuroScope recording.
Returns
-------
dict
Expand All @@ -197,7 +197,7 @@ def get_metadata(self) -> dict:
def get_original_timestamps(self) -> np.ndarray:
"""
Get the original timestamps for the recording.
Returns
-------
numpy.ndarray or list of numpy.ndarray
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ class OpenEphysBinaryRecordingInterface(BaseRecordingExtractorInterface):
def get_stream_names(cls, folder_path: DirectoryPath) -> list[str]:
"""
Get the names of available recording streams in the OpenEphys binary folder.
Parameters
----------
folder_path : DirectoryPath
Path to directory containing OpenEphys binary files.
Returns
-------
list of str
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@ def get_source_schema(cls) -> dict:
def get_stream_names(cls, folder_path: DirectoryPath) -> list[str]:
"""
Get the names of available recording streams in the OpenEphys folder.
Parameters
----------
folder_path : DirectoryPath
Path to OpenEphys directory (.continuous or .dat files).
Returns
-------
list of str
The names of the available recording streams.
Raises
------
AssertionError
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ class OpenEphysLegacyRecordingInterface(BaseRecordingExtractorInterface):
def get_stream_names(cls, folder_path: DirectoryPath) -> list[str]:
"""
Get the names of available recording streams in the OpenEphys legacy folder.
Parameters
----------
folder_path : DirectoryPath
Path to directory containing OpenEphys legacy files.
Returns
-------
list of str
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class OpenEphysSortingInterface(BaseSortingExtractorInterface):
def get_source_schema(cls) -> dict:
"""
Compile input schema for the SortingExtractor.
Returns
-------
dict
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class Spike2RecordingInterface(BaseRecordingExtractorInterface):
def get_source_schema(cls) -> dict:
"""
Get the schema for the source arguments.
Returns
-------
dict
Expand All @@ -47,12 +47,12 @@ def get_source_schema(cls) -> dict:
def get_all_channels_info(cls, file_path: FilePath):
"""
Retrieve and inspect necessary channel information prior to initialization.
Parameters
----------
file_path : FilePath
Path to .smr or .smrx file.
Returns
-------
dict
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class SpikeGLXConverterPipe(ConverterPipe):
def get_source_schema(cls) -> dict:
"""
Get the schema for the source arguments.
Returns
-------
dict
Expand All @@ -40,12 +40,12 @@ def get_source_schema(cls) -> dict:
def get_streams(cls, folder_path: DirectoryPath) -> list[str]:
"""
Get the stream IDs available in the folder.
Parameters
----------
folder_path : DirectoryPath
Path to the folder containing SpikeGLX streams.
Returns
-------
list of str
Expand Down Expand Up @@ -101,7 +101,7 @@ def __init__(
def get_conversion_options_schema(self) -> dict:
"""
Get the schema for the conversion options.
Returns
-------
dict
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class SpikeGLXRecordingInterface(BaseRecordingExtractorInterface):
def get_source_schema(cls) -> dict:
"""
Get the source schema for the SpikeGLX recording interface.
Returns
-------
dict
Expand Down Expand Up @@ -127,7 +127,7 @@ def __init__(
def get_metadata(self) -> dict:
"""
Get metadata for the SpikeGLX recording.
Returns
-------
dict
Expand Down Expand Up @@ -182,7 +182,7 @@ def get_metadata(self) -> dict:
def get_original_timestamps(self) -> np.ndarray:
"""
Get the original timestamps for the SpikeGLX recording.
Returns
-------
numpy.ndarray or list of numpy.ndarray
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def get_metadata(self) -> dict:
def get_channel_names(self) -> list[str]:
"""
Get a list of channel names from the recording extractor.
Returns
-------
list of str
Expand Down
Loading

0 comments on commit 2081ee3

Please sign in to comment.