From 8e992eb45cb8b0ed87c99396b57f9aae79864d28 Mon Sep 17 00:00:00 2001 From: Heberto Mayorquin Date: Thu, 19 Dec 2024 12:36:03 -0600 Subject: [PATCH 1/3] remove source validation --- src/neuroconv/basedatainterface.py | 2 -- src/neuroconv/nwbconverter.py | 1 - 2 files changed, 3 deletions(-) diff --git a/src/neuroconv/basedatainterface.py b/src/neuroconv/basedatainterface.py index d9e9dc11e..64af908e3 100644 --- a/src/neuroconv/basedatainterface.py +++ b/src/neuroconv/basedatainterface.py @@ -68,8 +68,6 @@ def __init__(self, verbose: bool = False, **source_data): self.verbose = verbose self.source_data = source_data - self._validate_source_data(source_data=source_data, verbose=verbose) - def get_metadata_schema(self) -> dict: """Retrieve JSON schema for metadata.""" metadata_schema = load_dict_from_file(Path(__file__).parent / "schemas" / "base_metadata_schema.json") diff --git a/src/neuroconv/nwbconverter.py b/src/neuroconv/nwbconverter.py index 2d70cf8ee..e3b71e202 100644 --- a/src/neuroconv/nwbconverter.py +++ b/src/neuroconv/nwbconverter.py @@ -80,7 +80,6 @@ def _validate_source_data(self, source_data: dict[str, dict], verbose: bool = Tr def __init__(self, source_data: dict[str, dict], verbose: bool = True): """Validate source_data against source_schema and initialize all data interfaces.""" self.verbose = verbose - self._validate_source_data(source_data=source_data, verbose=self.verbose) self.data_interface_objects = { name: data_interface(**source_data[name]) for name, data_interface in self.data_interface_classes.items() From de6026df7944a727f8754d4319b00e3faa10ce86 Mon Sep 17 00:00:00 2001 From: Heberto Mayorquin Date: Fri, 20 Dec 2024 11:11:13 -0600 Subject: [PATCH 2/3] fix two doctset errors --- docs/conversion_examples_gallery/behavior/lightningpose.rst | 1 - docs/conversion_examples_gallery/recording/spikeglx.rst | 1 - 2 files changed, 2 deletions(-) diff --git a/docs/conversion_examples_gallery/behavior/lightningpose.rst b/docs/conversion_examples_gallery/behavior/lightningpose.rst index a024a6799..f0b91e804 100644 --- a/docs/conversion_examples_gallery/behavior/lightningpose.rst +++ b/docs/conversion_examples_gallery/behavior/lightningpose.rst @@ -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"] diff --git a/docs/conversion_examples_gallery/recording/spikeglx.rst b/docs/conversion_examples_gallery/recording/spikeglx.rst index 0bc67fc1d..e6ff6bf03 100644 --- a/docs/conversion_examples_gallery/recording/spikeglx.rst +++ b/docs/conversion_examples_gallery/recording/spikeglx.rst @@ -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 From cf6892458bd760747f322a5a4f72d991a0229143 Mon Sep 17 00:00:00 2001 From: Heberto Mayorquin Date: Fri, 20 Dec 2024 13:03:44 -0600 Subject: [PATCH 3/3] add changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ba0e4068f..c3739b0b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ## Bug Fixes ## Features +* Source validation is no longer performed when initializing interfaces or converters [PR #1168](https://github.com/catalystneuro/neuroconv/pull/1168) ## Improvements