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

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# v0.6.6 (Upcoming)

## 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)
* Interfaces and converters now have `verbose=False` by default [PR #1153](https://github.com/catalystneuro/neuroconv/pull/1153)
* 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)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ Convert LightningPose pose estimation data to NWB using :py:class:`~neuroconv.da
>>> labeled_video_file_path = str(folder_path / "labeled_videos/test_vid_labeled.mp4")

>>> converter = LightningPoseConverter(file_path=file_path, original_video_file_path=original_video_file_path, labeled_video_file_path=labeled_video_file_path, verbose=False)
Source data is valid!
>>> metadata = converter.get_metadata()
>>> # For data provenance we add the time zone information to the conversion
>>> session_start_time = metadata["NWBFile"]["session_start_time"]
Expand Down
1 change: 0 additions & 1 deletion docs/conversion_examples_gallery/recording/openephys.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 ...
1 change: 0 additions & 1 deletion docs/conversion_examples_gallery/recording/spikeglx.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ We can easily convert all data stored in the native SpikeGLX folder structure to
>>>
>>> folder_path = f"{ECEPHY_DATA_PATH}/spikeglx/Noise4Sam_g0"
>>> converter = SpikeGLXConverterPipe(folder_path=folder_path)
Source data is valid!
>>> # Extract what metadata we can from the source files
>>> metadata = converter.get_metadata()
>>> # For data provenance we add the time zone information to the conversion
Expand Down
4 changes: 2 additions & 2 deletions src/neuroconv/datainterfaces/behavior/audio/audiointerface.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def add_to_nwbfile(
write_as: Literal["stimulus", "acquisition"] = "stimulus",
iterator_options: Optional[dict] = None,
overwrite: bool = False,
verbose: bool = True,
verbose: bool = False,
pauladkisson marked this conversation as resolved.
Show resolved Hide resolved
):
"""
Parameters
Expand All @@ -187,7 +187,7 @@ def add_to_nwbfile(
iterator_options : dict, optional
Dictionary of options for the SliceableDataChunkIterator.
overwrite : bool, default: False
verbose : bool, default: True
verbose : bool, default: False

Returns
-------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
):
"""
Expand All @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: Falsee
h-mayorquin marked this conversation as resolved.
Show resolved Hide resolved
If True, will print out additional information.
es_key : str, default: "ElectricalSeries"
The key of this ElectricalSeries in the metadata dictionary.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class BaseSortingExtractorInterface(BaseExtractorInterface):

ExtractorModuleName = "spikeinterface.extractors"

def __init__(self, verbose=True, **source_data):
def __init__(self, verbose=False, **source_data):
super().__init__(**source_data)
self.sorting_extractor = self.get_extractor()(**source_data)
self.verbose = verbose
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
):
"""
Expand Down Expand Up @@ -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
----------
Expand All @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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.

Expand Down
4 changes: 2 additions & 2 deletions src/neuroconv/datainterfaces/ecephys/edf/edfdatainterface.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
):
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
):
Expand All @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class NeuralynxSortingInterface(BaseSortingExtractorInterface):
associated_suffixes = (".nse", ".ntt", ".nse", ".nev")
info = "Interface for Neuralynx sorting data."

def __init__(self, folder_path: DirectoryPath, sampling_frequency: Optional[float] = None, verbose: bool = True):
def __init__(self, folder_path: DirectoryPath, sampling_frequency: Optional[float] = None, verbose: bool = False):
"""_summary_

Parameters
Expand All @@ -121,7 +121,7 @@ def __init__(self, folder_path: DirectoryPath, sampling_frequency: Optional[floa
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
"""

Expand Down
Loading
Loading