Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set verbose = False as default on all the interfaces #1153

Merged
merged 17 commits into from
Jan 21, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -8,6 +8,8 @@
* Added `metadata` and `conversion_options` as arguments to `NWBConverter.temporally_align_data_interfaces` [PR #1162](https://github.com/catalystneuro/neuroconv/pull/1162)

## Improvements
* Interfaces and converters now have `verbose=False` by default [PR #1153](https://github.com/catalystneuro/neuroconv/pull/1153)


# v0.6.7 (January 20, 2024)

@@ -29,8 +31,9 @@

# v0.6.6 (December 20, 2024)

## Deprecations
## Deprecations and Changes
* Removed use of `jsonschema.RefResolver` as it will be deprecated from the jsonschema library [PR #1133](https://github.com/catalystneuro/neuroconv/pull/1133)
* Completely removed compression settings from most places[PR #1126](https://github.com/catalystneuro/neuroconv/pull/1126)
* Completely removed compression settings from most places [PR #1126](https://github.com/catalystneuro/neuroconv/pull/1126)
* Soft deprecation for `file_path` as an argument of `SpikeGLXNIDQInterface` and `SpikeGLXRecordingInterface` [PR #1155](https://github.com/catalystneuro/neuroconv/pull/1155)
* `starting_time` in RecordingInterfaces has given a soft deprecation in favor of time alignment methods [PR #1158](https://github.com/catalystneuro/neuroconv/pull/1158)
1 change: 0 additions & 1 deletion docs/conversion_examples_gallery/recording/openephys.rst
Original file line number Diff line number Diff line change
@@ -30,4 +30,3 @@ Convert OpenEphys data to NWB using :py:class:`~neuroconv.datainterfaces.ecephys
>>> # Choose a path for saving the nwb file and run the conversion
>>> nwbfile_path = f"{path_to_save_nwbfile}" # This should be something like: "./saved_file.nwb"
>>> interface.run_conversion(nwbfile_path=nwbfile_path, metadata=metadata)
NWB file saved at ...
4 changes: 0 additions & 4 deletions src/neuroconv/datainterfaces/behavior/audio/audiointerface.py
Original file line number Diff line number Diff line change
@@ -170,8 +170,6 @@ def add_to_nwbfile(
stub_frames: int = 1000,
write_as: Literal["stimulus", "acquisition"] = "stimulus",
iterator_options: Optional[dict] = None,
overwrite: bool = False,
verbose: bool = True,
):
"""
Parameters
@@ -186,8 +184,6 @@ def add_to_nwbfile(
"stimulus" or as "acquisition".
iterator_options : dict, optional
Dictionary of options for the SliceableDataChunkIterator.
overwrite : bool, default: False
verbose : bool, default: True

Returns
-------
Original file line number Diff line number Diff line change
@@ -31,7 +31,7 @@ def __init__(
file_path: FilePath,
config_file_path: Optional[FilePath] = None,
subject_name: str = "ind1",
verbose: bool = True,
verbose: bool = False,
):
"""
Interface for writing DLC's output files to nwb using dlc2nwb.
Original file line number Diff line number Diff line change
@@ -159,7 +159,7 @@ def __init__(
file_path: FilePath,
radius: Optional[float] = None,
configuration_file_path: Optional[FilePath] = None,
verbose: bool = True,
verbose: bool = False,
):
"""
Interface for writing FicTrac files to nwb.
@@ -173,7 +173,7 @@ def __init__(
and the units are set to meters. If not provided the units are set to radians.
configuration_file_path : FilePath, optional
Path to the .txt file with the configuration metadata. Usually called config.txt
verbose : bool, default: True
verbose : bool, default: False
controls verbosity. ``True`` by default.
"""
self.file_path = Path(file_path)
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@ def __init__(
labeled_video_file_path: Optional[FilePath] = None,
image_series_original_video_name: Optional[str] = None,
image_series_labeled_video_name: Optional[str] = None,
verbose: bool = True,
verbose: bool = False,
):
"""
The converter for Lightning Pose format to convert the pose estimation data
@@ -52,7 +52,7 @@ def __init__(
The name of the ImageSeries to add for the original video.
image_series_labeled_video_name: string, optional
The name of the ImageSeries to add for the labeled video.
verbose : bool, default: True
verbose : bool, default: False
controls verbosity. ``True`` by default.
"""
self.verbose = verbose
Original file line number Diff line number Diff line change
@@ -64,7 +64,7 @@ def __init__(
file_path: FilePath,
original_video_file_path: FilePath,
labeled_video_file_path: Optional[FilePath] = None,
verbose: bool = True,
verbose: bool = False,
):
"""
Interface for writing pose estimation data from the Lightning Pose algorithm.
@@ -77,7 +77,7 @@ def __init__(
Path to the original video file (.mp4).
labeled_video_file_path : a string or a path, optional
Path to the labeled video file (.mp4).
verbose : bool, default: True
verbose : bool, default: False
controls verbosity. ``True`` by default.
"""
# This import is to assure that the ndx_pose is in the global namespace when an pynwb.io object is created
Original file line number Diff line number Diff line change
@@ -49,7 +49,7 @@ def __init__(
start_variable: str,
metadata_medpc_name_to_info_dict: dict,
aligned_timestamp_names: Optional[list[str]] = None,
verbose: bool = True,
verbose: bool = False,
):
"""
Initialize MedpcInterface.
Original file line number Diff line number Diff line change
@@ -22,15 +22,15 @@ class NeuralynxNvtInterface(BaseTemporalAlignmentInterface):
info = "Interface for writing Neuralynx position tracking .nvt files to NWB."

@validate_call
def __init__(self, file_path: FilePath, verbose: bool = True):
def __init__(self, file_path: FilePath, verbose: bool = False):
"""
Interface for writing Neuralynx .nvt files to nwb.

Parameters
----------
file_path : FilePath
Path to the .nvt file
verbose : bool, default: True
verbose : bool, default: Falsee
controls verbosity.
"""

Original file line number Diff line number Diff line change
@@ -32,7 +32,7 @@ def __init__(
self,
file_path: FilePath,
video_file_path: Optional[FilePath] = None,
verbose: bool = True,
verbose: bool = False,
frames_per_second: Optional[float] = None,
):
"""
@@ -42,7 +42,7 @@ def __init__(
----------
file_path : FilePath
Path to the .slp file (the output of sleap)
verbose : bool, default: True
verbose : bool, default: Falsee
controls verbosity. ``True`` by default.
video_file_path : FilePath, optional
The file path of the video for extracting timestamps.
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@ def _source_data_to_extractor_kwargs(self, source_data: dict) -> dict:
extractor_kwargs["stream_id"] = self.stream_id
return extractor_kwargs

def __init__(self, folder_path: DirectoryPath, verbose: bool = True, es_key: str = "ElectricalSeries"):
def __init__(self, folder_path: DirectoryPath, verbose: bool = False, es_key: str = "ElectricalSeries"):
"""
Load and prepare data for AlphaOmega.

@@ -36,7 +36,7 @@ def __init__(self, folder_path: DirectoryPath, verbose: bool = True, es_key: str
Path to the folder of .mpx files.
verbose: boolean
Allows verbose.
Default is True.
Default is False.
es_key: str, default: "ElectricalSeries"
"""
super().__init__(folder_path=folder_path, verbose=verbose, es_key=es_key)
Original file line number Diff line number Diff line change
@@ -36,7 +36,7 @@ def _source_data_to_extractor_kwargs(self, source_data: dict) -> dict:

return extractor_kwargs

def __init__(self, file_path: FilePath, verbose: bool = True, es_key: str = "ElectricalSeries"):
def __init__(self, file_path: FilePath, verbose: bool = False, es_key: str = "ElectricalSeries"):
"""

Parameters
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ class BaseLFPExtractorInterface(BaseRecordingExtractorInterface):
"LF",
)

def __init__(self, verbose: bool = True, es_key: str = "ElectricalSeriesLFP", **source_data):
def __init__(self, verbose: bool = False, es_key: str = "ElectricalSeriesLFP", **source_data):
super().__init__(verbose=verbose, es_key=es_key, **source_data)

def add_to_nwbfile(
Original file line number Diff line number Diff line change
@@ -20,11 +20,11 @@ class BaseRecordingExtractorInterface(BaseExtractorInterface):

ExtractorModuleName = "spikeinterface.extractors"

def __init__(self, verbose: bool = True, es_key: str = "ElectricalSeries", **source_data):
def __init__(self, verbose: bool = False, es_key: str = "ElectricalSeries", **source_data):
"""
Parameters
----------
verbose : bool, default: True
verbose : bool, default: False
If True, will print out additional information.
es_key : str, default: "ElectricalSeries"
The key of this ElectricalSeries in the metadata dictionary.
Original file line number Diff line number Diff line change
@@ -18,7 +18,8 @@ class BaseSortingExtractorInterface(BaseExtractorInterface):

ExtractorModuleName = "spikeinterface.extractors"

def __init__(self, verbose: bool = True, **source_data):
def __init__(self, verbose: bool = False, **source_data):

super().__init__(**source_data)
self.sorting_extractor = self.get_extractor()(**source_data)
self.verbose = verbose
Original file line number Diff line number Diff line change
@@ -20,15 +20,15 @@ def get_source_schema(cls) -> dict:
schema["properties"]["file_path"]["description"] = "Path to the .bwr file."
return schema

def __init__(self, file_path: FilePath, verbose: bool = True, es_key: str = "ElectricalSeries"):
def __init__(self, file_path: FilePath, verbose: bool = False, es_key: str = "ElectricalSeries"):
"""
Load and prepare data for Biocam.

Parameters
----------
file_path : string or Path
Path to the .bwr file.
verbose : bool, default: True
verbose : bool, default: False
Allows verbose.
es_key: str, default: "ElectricalSeries"
"""
Original file line number Diff line number Diff line change
@@ -35,7 +35,7 @@ def __init__(
self,
file_path: FilePath,
nsx_override: Optional[FilePath] = None,
verbose: bool = True,
verbose: bool = False,
es_key: str = "ElectricalSeries",
):
"""
@@ -90,7 +90,7 @@ def get_source_schema(cls) -> dict:
metadata_schema["properties"]["file_path"].update(description="Path to Blackrock .nev file.")
return metadata_schema

def __init__(self, file_path: FilePath, sampling_frequency: Optional[float] = None, verbose: bool = True):
def __init__(self, file_path: FilePath, sampling_frequency: Optional[float] = None, verbose: bool = False):
"""
Parameters
----------
@@ -100,7 +100,7 @@ def __init__(self, file_path: FilePath, sampling_frequency: Optional[float] = No
The sampling frequency for the sorting extractor. When the signal data is available (.ncs) those files will be
used to extract the frequency automatically. Otherwise, the sampling frequency needs to be specified for
this extractor to be initialized.
verbose : bool, default: True
verbose : bool, default: False
Enables verbosity
"""
super().__init__(file_path=file_path, sampling_frequency=sampling_frequency, verbose=verbose)
Original file line number Diff line number Diff line change
@@ -254,7 +254,7 @@ class CellExplorerRecordingInterface(BaseRecordingExtractorInterface):
The folder where the session data is located. It should contain a
`{folder.name}.session.mat` file and the binary files `{folder.name}.dat`
or `{folder.name}.lfp` for the LFP interface.
verbose : bool, default: True
verbose : bool, default: Falsee
Whether to output verbose text.
es_key : str, default: "ElectricalSeries" and "ElectricalSeriesLFP" for the LFP interface

@@ -294,7 +294,7 @@ def get_source_schema(cls) -> dict:
source_schema["properties"]["folder_path"]["description"] = "Folder containing the .session.mat file"
return source_schema

def __init__(self, folder_path: DirectoryPath, verbose: bool = True, es_key: str = "ElectricalSeries"):
def __init__(self, folder_path: DirectoryPath, verbose: bool = False, es_key: str = "ElectricalSeries"):
"""

Parameters
@@ -382,7 +382,7 @@ class CellExplorerLFPInterface(CellExplorerRecordingInterface):
sampling_frequency_key = "srLfp"
binary_file_extension = "lfp"

def __init__(self, folder_path: DirectoryPath, verbose: bool = True, es_key: str = "ElectricalSeriesLFP"):
def __init__(self, folder_path: DirectoryPath, verbose: bool = False, es_key: str = "ElectricalSeriesLFP"):
super().__init__(folder_path, verbose, es_key)

def add_to_nwbfile(
@@ -425,7 +425,7 @@ def _source_data_to_extractor_kwargs(self, source_data: dict) -> dict:

return extractor_kwargs

def __init__(self, file_path: FilePath, verbose: bool = True):
def __init__(self, file_path: FilePath, verbose: bool = False):
"""
Initialize read of Cell Explorer file.

4 changes: 2 additions & 2 deletions src/neuroconv/datainterfaces/ecephys/edf/edfdatainterface.py
Original file line number Diff line number Diff line change
@@ -37,7 +37,7 @@ def _source_data_to_extractor_kwargs(self, source_data: dict) -> dict:
def __init__(
self,
file_path: FilePath,
verbose: bool = True,
verbose: bool = False,
es_key: str = "ElectricalSeries",
channels_to_skip: Optional[list] = None,
):
@@ -50,7 +50,7 @@ def __init__(
----------
file_path : str or Path
Path to the edf file
verbose : bool, default: True
verbose : bool, default: Falseeeeee
Allows verbose.
es_key : str, default: "ElectricalSeries"
Key for the ElectricalSeries metadata
Original file line number Diff line number Diff line change
@@ -35,7 +35,7 @@ def _source_data_to_extractor_kwargs(self, source_data: dict) -> dict:
def __init__(
self,
file_path: FilePath,
verbose: bool = True,
verbose: bool = False,
es_key: str = "ElectricalSeries",
ignore_integrity_checks: bool = False,
):
@@ -47,7 +47,7 @@ def __init__(
file_path : FilePathType
Path to either a rhd or a rhs file

verbose : bool, default: True
verbose : bool, default: False
Verbose
es_key : str, default: "ElectricalSeries"
ignore_integrity_checks, bool, default: False.
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ def __init__(
self,
folder_path: DirectoryPath,
keep_good_only: bool = False,
verbose: bool = True,
verbose: bool = False,
):
"""
Load and prepare sorting data for kilosort
Original file line number Diff line number Diff line change
@@ -47,7 +47,7 @@ def __init__(
file_path: FilePath,
hdf5_plugin_path: Optional[DirectoryPath] = None,
download_plugin: bool = True,
verbose: bool = True,
verbose: bool = False,
es_key: str = "ElectricalSeries",
) -> None:
"""
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ def get_source_schema(cls) -> dict:
source_schema["properties"]["file_path"]["description"] = "Path to the .raw file."
return source_schema

def __init__(self, file_path: FilePath, verbose: bool = True, es_key: str = "ElectricalSeries"):
def __init__(self, file_path: FilePath, verbose: bool = False, es_key: str = "ElectricalSeries"):
"""
Load and prepare data for MCSRaw.

Original file line number Diff line number Diff line change
@@ -23,15 +23,15 @@ def get_source_schema(cls) -> dict:
source_schema["properties"]["file_path"]["description"] = "Path to the MEArec .h5 file."
return source_schema

def __init__(self, file_path: FilePath, verbose: bool = True, es_key: str = "ElectricalSeries"):
def __init__(self, file_path: FilePath, verbose: bool = False, es_key: str = "ElectricalSeries"):
"""
Load and prepare data for MEArec.

Parameters
----------
folder_path : str or Path
Path to the MEArec .h5 file.
verbose : bool, default: True
verbose : bool, default: Falsee
Allows verbose.
es_key : str, default: "ElectricalSeries"
"""
Original file line number Diff line number Diff line change
@@ -116,7 +116,7 @@ def __init__(
self,
folder_path: DirectoryPath,
sampling_frequency: Optional[float] = None,
verbose: bool = True,
verbose: bool = False,
stream_id: Optional[str] = None,
):
"""_summary_
@@ -127,7 +127,7 @@ def __init__(
The path to the folder/directory containing the data files for the session (nse, ntt, nse, nev)
sampling_frequency : float, optional
If a specific sampling_frequency is desired it can be set with this argument.
verbose : bool, default: True
verbose : bool, default: False
Enables verbosity
stream_id: str, optional
Used by Spikeinterface and neo to calculate the t_start, if not provided and the stream is unique
Loading
Oops, something went wrong.
Loading
Oops, something went wrong.