From a63047c2cf7a71b3f86da1f48009cedff2804f63 Mon Sep 17 00:00:00 2001 From: Cody Baker Date: Mon, 23 Sep 2024 21:39:25 -0400 Subject: [PATCH 1/5] reorganize --- src/ibl_to_nwb/brainwide_map/__init__.py | 1 - src/ibl_to_nwb/brainwide_map/datainterfaces/__init__.py | 1 - src/{ => ibl_to_nwb/converters}/__init__.py | 0 .../brainwidemapconverter.py | 4 ++-- src/ibl_to_nwb/{ => converters}/iblconverter.py | 0 .../datainterfaces/brainwidemaptrialsinterface.py | 0 .../initial_conversion_environment.txt | 0 .../brainwide_map_general.yml} | 0 src/ibl_to_nwb/{brainwide_map => }/metadata/trials.yml | 0 src/ibl_to_nwb/requirements.txt | 8 -------- .../{brainwide_map/metadata => scripts}/__init__.py | 0 .../{brainwide_map => scripts}/convert_brainwide_map.py | 0 .../convert_brainwide_map_parallel.py | 0 .../convert_brainwide_map_processed_only.py | 0 .../convert_brainwide_map_processed_only_local_testing.py | 0 .../convert_brainwide_map_processed_only_parallel.py | 0 .../convert_brainwide_map_raw_only_parallel.py | 0 17 files changed, 2 insertions(+), 12 deletions(-) delete mode 100644 src/ibl_to_nwb/brainwide_map/datainterfaces/__init__.py rename src/{ => ibl_to_nwb/converters}/__init__.py (100%) rename src/ibl_to_nwb/{brainwide_map => converters}/brainwidemapconverter.py (76%) rename src/ibl_to_nwb/{ => converters}/iblconverter.py (100%) rename src/ibl_to_nwb/{brainwide_map => }/datainterfaces/brainwidemaptrialsinterface.py (100%) rename src/ibl_to_nwb/{brainwide_map => environments}/initial_conversion_environment.txt (100%) rename src/ibl_to_nwb/{brainwide_map/brainwide_map_metadata.yml => metadata/brainwide_map_general.yml} (100%) rename src/ibl_to_nwb/{brainwide_map => }/metadata/trials.yml (100%) delete mode 100644 src/ibl_to_nwb/requirements.txt rename src/ibl_to_nwb/{brainwide_map/metadata => scripts}/__init__.py (100%) rename src/ibl_to_nwb/{brainwide_map => scripts}/convert_brainwide_map.py (100%) rename src/ibl_to_nwb/{brainwide_map => scripts}/convert_brainwide_map_parallel.py (100%) rename src/ibl_to_nwb/{brainwide_map => scripts}/convert_brainwide_map_processed_only.py (100%) rename src/ibl_to_nwb/{brainwide_map => scripts}/convert_brainwide_map_processed_only_local_testing.py (100%) rename src/ibl_to_nwb/{brainwide_map => scripts}/convert_brainwide_map_processed_only_parallel.py (100%) rename src/ibl_to_nwb/{brainwide_map => scripts}/convert_brainwide_map_raw_only_parallel.py (100%) diff --git a/src/ibl_to_nwb/brainwide_map/__init__.py b/src/ibl_to_nwb/brainwide_map/__init__.py index 624495d..e69de29 100644 --- a/src/ibl_to_nwb/brainwide_map/__init__.py +++ b/src/ibl_to_nwb/brainwide_map/__init__.py @@ -1 +0,0 @@ -from .brainwidemapconverter import BrainwideMapConverter diff --git a/src/ibl_to_nwb/brainwide_map/datainterfaces/__init__.py b/src/ibl_to_nwb/brainwide_map/datainterfaces/__init__.py deleted file mode 100644 index 35c45ea..0000000 --- a/src/ibl_to_nwb/brainwide_map/datainterfaces/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .brainwidemaptrialsinterface import BrainwideMapTrialsInterface diff --git a/src/__init__.py b/src/ibl_to_nwb/converters/__init__.py similarity index 100% rename from src/__init__.py rename to src/ibl_to_nwb/converters/__init__.py diff --git a/src/ibl_to_nwb/brainwide_map/brainwidemapconverter.py b/src/ibl_to_nwb/converters/brainwidemapconverter.py similarity index 76% rename from src/ibl_to_nwb/brainwide_map/brainwidemapconverter.py rename to src/ibl_to_nwb/converters/brainwidemapconverter.py index 6abdea2..134d07e 100644 --- a/src/ibl_to_nwb/brainwide_map/brainwidemapconverter.py +++ b/src/ibl_to_nwb/converters/brainwidemapconverter.py @@ -2,14 +2,14 @@ from neuroconv.utils import dict_deep_update, load_dict_from_file -from ..iblconverter import IblConverter +from src.ibl_to_nwb.converters.iblconverter import IblConverter class BrainwideMapConverter(IblConverter): def get_metadata(self) -> dict: metadata = super().get_metadata() - experiment_metadata = load_dict_from_file(file_path=Path(__file__).parent / "brainwide_map_metadata.yml") + experiment_metadata = load_dict_from_file(file_path=Path(__file__).parent / "brainwide_map_general.yml") metadata = dict_deep_update(metadata, experiment_metadata) return metadata diff --git a/src/ibl_to_nwb/iblconverter.py b/src/ibl_to_nwb/converters/iblconverter.py similarity index 100% rename from src/ibl_to_nwb/iblconverter.py rename to src/ibl_to_nwb/converters/iblconverter.py diff --git a/src/ibl_to_nwb/brainwide_map/datainterfaces/brainwidemaptrialsinterface.py b/src/ibl_to_nwb/datainterfaces/brainwidemaptrialsinterface.py similarity index 100% rename from src/ibl_to_nwb/brainwide_map/datainterfaces/brainwidemaptrialsinterface.py rename to src/ibl_to_nwb/datainterfaces/brainwidemaptrialsinterface.py diff --git a/src/ibl_to_nwb/brainwide_map/initial_conversion_environment.txt b/src/ibl_to_nwb/environments/initial_conversion_environment.txt similarity index 100% rename from src/ibl_to_nwb/brainwide_map/initial_conversion_environment.txt rename to src/ibl_to_nwb/environments/initial_conversion_environment.txt diff --git a/src/ibl_to_nwb/brainwide_map/brainwide_map_metadata.yml b/src/ibl_to_nwb/metadata/brainwide_map_general.yml similarity index 100% rename from src/ibl_to_nwb/brainwide_map/brainwide_map_metadata.yml rename to src/ibl_to_nwb/metadata/brainwide_map_general.yml diff --git a/src/ibl_to_nwb/brainwide_map/metadata/trials.yml b/src/ibl_to_nwb/metadata/trials.yml similarity index 100% rename from src/ibl_to_nwb/brainwide_map/metadata/trials.yml rename to src/ibl_to_nwb/metadata/trials.yml diff --git a/src/ibl_to_nwb/requirements.txt b/src/ibl_to_nwb/requirements.txt deleted file mode 100644 index 3801602..0000000 --- a/src/ibl_to_nwb/requirements.txt +++ /dev/null @@ -1,8 +0,0 @@ -neuroconv -spikeinterface>=0.97.0 # Actually need to use the streaming IBL fix for maximum efficiency -ONE-api>=1.16.3 -ibllib>=2.21.0 -ndx-pose>=0.1.1 -ndx-ibl==0.1.0 -probeinterface -iblatlas diff --git a/src/ibl_to_nwb/brainwide_map/metadata/__init__.py b/src/ibl_to_nwb/scripts/__init__.py similarity index 100% rename from src/ibl_to_nwb/brainwide_map/metadata/__init__.py rename to src/ibl_to_nwb/scripts/__init__.py diff --git a/src/ibl_to_nwb/brainwide_map/convert_brainwide_map.py b/src/ibl_to_nwb/scripts/convert_brainwide_map.py similarity index 100% rename from src/ibl_to_nwb/brainwide_map/convert_brainwide_map.py rename to src/ibl_to_nwb/scripts/convert_brainwide_map.py diff --git a/src/ibl_to_nwb/brainwide_map/convert_brainwide_map_parallel.py b/src/ibl_to_nwb/scripts/convert_brainwide_map_parallel.py similarity index 100% rename from src/ibl_to_nwb/brainwide_map/convert_brainwide_map_parallel.py rename to src/ibl_to_nwb/scripts/convert_brainwide_map_parallel.py diff --git a/src/ibl_to_nwb/brainwide_map/convert_brainwide_map_processed_only.py b/src/ibl_to_nwb/scripts/convert_brainwide_map_processed_only.py similarity index 100% rename from src/ibl_to_nwb/brainwide_map/convert_brainwide_map_processed_only.py rename to src/ibl_to_nwb/scripts/convert_brainwide_map_processed_only.py diff --git a/src/ibl_to_nwb/brainwide_map/convert_brainwide_map_processed_only_local_testing.py b/src/ibl_to_nwb/scripts/convert_brainwide_map_processed_only_local_testing.py similarity index 100% rename from src/ibl_to_nwb/brainwide_map/convert_brainwide_map_processed_only_local_testing.py rename to src/ibl_to_nwb/scripts/convert_brainwide_map_processed_only_local_testing.py diff --git a/src/ibl_to_nwb/brainwide_map/convert_brainwide_map_processed_only_parallel.py b/src/ibl_to_nwb/scripts/convert_brainwide_map_processed_only_parallel.py similarity index 100% rename from src/ibl_to_nwb/brainwide_map/convert_brainwide_map_processed_only_parallel.py rename to src/ibl_to_nwb/scripts/convert_brainwide_map_processed_only_parallel.py diff --git a/src/ibl_to_nwb/brainwide_map/convert_brainwide_map_raw_only_parallel.py b/src/ibl_to_nwb/scripts/convert_brainwide_map_raw_only_parallel.py similarity index 100% rename from src/ibl_to_nwb/brainwide_map/convert_brainwide_map_raw_only_parallel.py rename to src/ibl_to_nwb/scripts/convert_brainwide_map_raw_only_parallel.py From d632ceb6ae946c5109f531da0fe5799a5b149ec0 Mon Sep 17 00:00:00 2001 From: Cody Baker Date: Mon, 23 Sep 2024 21:52:44 -0400 Subject: [PATCH 2/5] modern import control --- .../initial_conversion_environment.txt | 0 .../{brainwide_map => _metadata}/__init__.py | 0 .../brainwide_map_general.yml | 0 .../{metadata => _metadata}/ecephys.yml | 0 .../{metadata => _metadata}/pupils.yml | 0 .../{metadata => _metadata}/trials.yml | 0 .../{metadata => _metadata}/wheel.yml | 0 .../{metadata => _scripts}/__init__.py | 0 .../convert_brainwide_map.py | 0 .../convert_brainwide_map_parallel.py | 0 .../convert_brainwide_map_processed_only.py | 0 ...inwide_map_processed_only_local_testing.py | 0 ...t_brainwide_map_processed_only_parallel.py | 0 ...convert_brainwide_map_raw_only_parallel.py | 0 src/ibl_to_nwb/converters/__init__.py | 7 +++++ ...nverter.py => _brainwide_map_converter.py} | 2 +- .../{iblconverter.py => _iblconverter.py} | 0 src/ibl_to_nwb/datainterfaces/__init__.py | 28 +++++++++++++------ ...sinterface.py => _brainwide_map_trials.py} | 2 +- ...extractor.py => _ibl_sorting_extractor.py} | 0 ...interface.py => _ibl_sorting_interface.py} | 4 +-- ...terface.py => _ibl_streaming_interface.py} | 4 +-- .../{lickinterface.py => _lick_times.py} | 0 ...mationinterface.py => _pose_estimation.py} | 0 ...rackinginterface.py => _pupil_tracking.py} | 2 +- ...ergyinterface.py => _roi_motion_energy.py} | 0 .../{wheelinterface.py => _wheel_movement.py} | 2 +- src/ibl_to_nwb/scripts/__init__.py | 0 28 files changed, 35 insertions(+), 16 deletions(-) rename src/ibl_to_nwb/{environments => _environments}/initial_conversion_environment.txt (100%) rename src/ibl_to_nwb/{brainwide_map => _metadata}/__init__.py (100%) rename src/ibl_to_nwb/{metadata => _metadata}/brainwide_map_general.yml (100%) rename src/ibl_to_nwb/{metadata => _metadata}/ecephys.yml (100%) rename src/ibl_to_nwb/{metadata => _metadata}/pupils.yml (100%) rename src/ibl_to_nwb/{metadata => _metadata}/trials.yml (100%) rename src/ibl_to_nwb/{metadata => _metadata}/wheel.yml (100%) rename src/ibl_to_nwb/{metadata => _scripts}/__init__.py (100%) rename src/ibl_to_nwb/{scripts => _scripts}/convert_brainwide_map.py (100%) rename src/ibl_to_nwb/{scripts => _scripts}/convert_brainwide_map_parallel.py (100%) rename src/ibl_to_nwb/{scripts => _scripts}/convert_brainwide_map_processed_only.py (100%) rename src/ibl_to_nwb/{scripts => _scripts}/convert_brainwide_map_processed_only_local_testing.py (100%) rename src/ibl_to_nwb/{scripts => _scripts}/convert_brainwide_map_processed_only_parallel.py (100%) rename src/ibl_to_nwb/{scripts => _scripts}/convert_brainwide_map_raw_only_parallel.py (100%) rename src/ibl_to_nwb/converters/{brainwidemapconverter.py => _brainwide_map_converter.py} (86%) rename src/ibl_to_nwb/converters/{iblconverter.py => _iblconverter.py} (100%) rename src/ibl_to_nwb/datainterfaces/{brainwidemaptrialsinterface.py => _brainwide_map_trials.py} (98%) rename src/ibl_to_nwb/datainterfaces/{iblsortingextractor.py => _ibl_sorting_extractor.py} (100%) rename src/ibl_to_nwb/datainterfaces/{iblsortinginterface.py => _ibl_sorting_interface.py} (90%) rename src/ibl_to_nwb/datainterfaces/{iblstreaminginterface.py => _ibl_streaming_interface.py} (98%) rename src/ibl_to_nwb/datainterfaces/{lickinterface.py => _lick_times.py} (100%) rename src/ibl_to_nwb/datainterfaces/{iblposeestimationinterface.py => _pose_estimation.py} (100%) rename src/ibl_to_nwb/datainterfaces/{pupiltrackinginterface.py => _pupil_tracking.py} (97%) rename src/ibl_to_nwb/datainterfaces/{roimotionenergyinterface.py => _roi_motion_energy.py} (100%) rename src/ibl_to_nwb/datainterfaces/{wheelinterface.py => _wheel_movement.py} (98%) delete mode 100644 src/ibl_to_nwb/scripts/__init__.py diff --git a/src/ibl_to_nwb/environments/initial_conversion_environment.txt b/src/ibl_to_nwb/_environments/initial_conversion_environment.txt similarity index 100% rename from src/ibl_to_nwb/environments/initial_conversion_environment.txt rename to src/ibl_to_nwb/_environments/initial_conversion_environment.txt diff --git a/src/ibl_to_nwb/brainwide_map/__init__.py b/src/ibl_to_nwb/_metadata/__init__.py similarity index 100% rename from src/ibl_to_nwb/brainwide_map/__init__.py rename to src/ibl_to_nwb/_metadata/__init__.py diff --git a/src/ibl_to_nwb/metadata/brainwide_map_general.yml b/src/ibl_to_nwb/_metadata/brainwide_map_general.yml similarity index 100% rename from src/ibl_to_nwb/metadata/brainwide_map_general.yml rename to src/ibl_to_nwb/_metadata/brainwide_map_general.yml diff --git a/src/ibl_to_nwb/metadata/ecephys.yml b/src/ibl_to_nwb/_metadata/ecephys.yml similarity index 100% rename from src/ibl_to_nwb/metadata/ecephys.yml rename to src/ibl_to_nwb/_metadata/ecephys.yml diff --git a/src/ibl_to_nwb/metadata/pupils.yml b/src/ibl_to_nwb/_metadata/pupils.yml similarity index 100% rename from src/ibl_to_nwb/metadata/pupils.yml rename to src/ibl_to_nwb/_metadata/pupils.yml diff --git a/src/ibl_to_nwb/metadata/trials.yml b/src/ibl_to_nwb/_metadata/trials.yml similarity index 100% rename from src/ibl_to_nwb/metadata/trials.yml rename to src/ibl_to_nwb/_metadata/trials.yml diff --git a/src/ibl_to_nwb/metadata/wheel.yml b/src/ibl_to_nwb/_metadata/wheel.yml similarity index 100% rename from src/ibl_to_nwb/metadata/wheel.yml rename to src/ibl_to_nwb/_metadata/wheel.yml diff --git a/src/ibl_to_nwb/metadata/__init__.py b/src/ibl_to_nwb/_scripts/__init__.py similarity index 100% rename from src/ibl_to_nwb/metadata/__init__.py rename to src/ibl_to_nwb/_scripts/__init__.py diff --git a/src/ibl_to_nwb/scripts/convert_brainwide_map.py b/src/ibl_to_nwb/_scripts/convert_brainwide_map.py similarity index 100% rename from src/ibl_to_nwb/scripts/convert_brainwide_map.py rename to src/ibl_to_nwb/_scripts/convert_brainwide_map.py diff --git a/src/ibl_to_nwb/scripts/convert_brainwide_map_parallel.py b/src/ibl_to_nwb/_scripts/convert_brainwide_map_parallel.py similarity index 100% rename from src/ibl_to_nwb/scripts/convert_brainwide_map_parallel.py rename to src/ibl_to_nwb/_scripts/convert_brainwide_map_parallel.py diff --git a/src/ibl_to_nwb/scripts/convert_brainwide_map_processed_only.py b/src/ibl_to_nwb/_scripts/convert_brainwide_map_processed_only.py similarity index 100% rename from src/ibl_to_nwb/scripts/convert_brainwide_map_processed_only.py rename to src/ibl_to_nwb/_scripts/convert_brainwide_map_processed_only.py diff --git a/src/ibl_to_nwb/scripts/convert_brainwide_map_processed_only_local_testing.py b/src/ibl_to_nwb/_scripts/convert_brainwide_map_processed_only_local_testing.py similarity index 100% rename from src/ibl_to_nwb/scripts/convert_brainwide_map_processed_only_local_testing.py rename to src/ibl_to_nwb/_scripts/convert_brainwide_map_processed_only_local_testing.py diff --git a/src/ibl_to_nwb/scripts/convert_brainwide_map_processed_only_parallel.py b/src/ibl_to_nwb/_scripts/convert_brainwide_map_processed_only_parallel.py similarity index 100% rename from src/ibl_to_nwb/scripts/convert_brainwide_map_processed_only_parallel.py rename to src/ibl_to_nwb/_scripts/convert_brainwide_map_processed_only_parallel.py diff --git a/src/ibl_to_nwb/scripts/convert_brainwide_map_raw_only_parallel.py b/src/ibl_to_nwb/_scripts/convert_brainwide_map_raw_only_parallel.py similarity index 100% rename from src/ibl_to_nwb/scripts/convert_brainwide_map_raw_only_parallel.py rename to src/ibl_to_nwb/_scripts/convert_brainwide_map_raw_only_parallel.py diff --git a/src/ibl_to_nwb/converters/__init__.py b/src/ibl_to_nwb/converters/__init__.py index e69de29..936d87c 100644 --- a/src/ibl_to_nwb/converters/__init__.py +++ b/src/ibl_to_nwb/converters/__init__.py @@ -0,0 +1,7 @@ +from ._brainwide_map_converter import BrainwideMapConverter +from ._iblconverter import IblConverter + +__all__ = [ + "BrainwideMapConverter", + "IblConverter", +] diff --git a/src/ibl_to_nwb/converters/brainwidemapconverter.py b/src/ibl_to_nwb/converters/_brainwide_map_converter.py similarity index 86% rename from src/ibl_to_nwb/converters/brainwidemapconverter.py rename to src/ibl_to_nwb/converters/_brainwide_map_converter.py index 134d07e..7d78b5e 100644 --- a/src/ibl_to_nwb/converters/brainwidemapconverter.py +++ b/src/ibl_to_nwb/converters/_brainwide_map_converter.py @@ -2,7 +2,7 @@ from neuroconv.utils import dict_deep_update, load_dict_from_file -from src.ibl_to_nwb.converters.iblconverter import IblConverter +from src.ibl_to_nwb.converters._iblconverter import IblConverter class BrainwideMapConverter(IblConverter): diff --git a/src/ibl_to_nwb/converters/iblconverter.py b/src/ibl_to_nwb/converters/_iblconverter.py similarity index 100% rename from src/ibl_to_nwb/converters/iblconverter.py rename to src/ibl_to_nwb/converters/_iblconverter.py diff --git a/src/ibl_to_nwb/datainterfaces/__init__.py b/src/ibl_to_nwb/datainterfaces/__init__.py index d2370f4..461e6cb 100644 --- a/src/ibl_to_nwb/datainterfaces/__init__.py +++ b/src/ibl_to_nwb/datainterfaces/__init__.py @@ -1,8 +1,20 @@ -from .iblposeestimationinterface import IblPoseEstimationInterface -from .iblsortingextractor import IblSortingExtractor -from .iblsortinginterface import IblSortingInterface -from .iblstreaminginterface import IblStreamingApInterface, IblStreamingLfInterface -from .lickinterface import LickInterface -from .pupiltrackinginterface import PupilTrackingInterface -from .roimotionenergyinterface import RoiMotionEnergyInterface -from .wheelinterface import WheelInterface +from ._pose_estimation import IblPoseEstimationInterface +from ._ibl_sorting_extractor import IblSortingExtractor +from ._ibl_sorting_interface import IblSortingInterface +from ._ibl_streaming_interface import IblStreamingApInterface, IblStreamingLfInterface +from ._lick_times import LickInterface +from ._pupil_tracking import PupilTrackingInterface +from ._roi_motion_energy import RoiMotionEnergyInterface +from ._wheel_movement import WheelInterface + +__all__ = [ + "IblPoseEstimationInterface", + "IblSortingExtractor", + "IblSortingInterface", + "IblStreamingApInterface", + "IblStreamingLfInterface", + "LickInterface", + "PupilTrackingInterface", + "RoiMotionEnergyInterface", + "WheelInterface", +] diff --git a/src/ibl_to_nwb/datainterfaces/brainwidemaptrialsinterface.py b/src/ibl_to_nwb/datainterfaces/_brainwide_map_trials.py similarity index 98% rename from src/ibl_to_nwb/datainterfaces/brainwidemaptrialsinterface.py rename to src/ibl_to_nwb/datainterfaces/_brainwide_map_trials.py index 3a30043..7772c5d 100644 --- a/src/ibl_to_nwb/datainterfaces/brainwidemaptrialsinterface.py +++ b/src/ibl_to_nwb/datainterfaces/_brainwide_map_trials.py @@ -15,7 +15,7 @@ def __init__(self, one: ONE, session: str): def get_metadata(self) -> dict: metadata = super().get_metadata() - trial_metadata = load_dict_from_file(file_path=Path(__file__).parent.parent / "metadata" / "trials.yml") + trial_metadata = load_dict_from_file(file_path=Path(__file__).parent.parent / "_metadata" / "trials.yml") metadata.update(trial_metadata) return metadata diff --git a/src/ibl_to_nwb/datainterfaces/iblsortingextractor.py b/src/ibl_to_nwb/datainterfaces/_ibl_sorting_extractor.py similarity index 100% rename from src/ibl_to_nwb/datainterfaces/iblsortingextractor.py rename to src/ibl_to_nwb/datainterfaces/_ibl_sorting_extractor.py diff --git a/src/ibl_to_nwb/datainterfaces/iblsortinginterface.py b/src/ibl_to_nwb/datainterfaces/_ibl_sorting_interface.py similarity index 90% rename from src/ibl_to_nwb/datainterfaces/iblsortinginterface.py rename to src/ibl_to_nwb/datainterfaces/_ibl_sorting_interface.py index 9b1a08b..18c478f 100644 --- a/src/ibl_to_nwb/datainterfaces/iblsortinginterface.py +++ b/src/ibl_to_nwb/datainterfaces/_ibl_sorting_interface.py @@ -7,7 +7,7 @@ ) from neuroconv.utils import load_dict_from_file -from .iblsortingextractor import IblSortingExtractor +from ._ibl_sorting_extractor import IblSortingExtractor class IblSortingInterface(BaseSortingExtractorInterface): @@ -16,7 +16,7 @@ class IblSortingInterface(BaseSortingExtractorInterface): def get_metadata(self) -> dict: metadata = super().get_metadata() - ecephys_metadata = load_dict_from_file(file_path=Path(__file__).parent.parent / "metadata" / "ecephys.yml") + ecephys_metadata = load_dict_from_file(file_path=Path(__file__).parent.parent / "_metadata" / "ecephys.yml") metadata.update(Ecephys=dict()) metadata["Ecephys"].update(UnitProperties=ecephys_metadata["Ecephys"]["UnitProperties"]) diff --git a/src/ibl_to_nwb/datainterfaces/iblstreaminginterface.py b/src/ibl_to_nwb/datainterfaces/_ibl_streaming_interface.py similarity index 98% rename from src/ibl_to_nwb/datainterfaces/iblstreaminginterface.py rename to src/ibl_to_nwb/datainterfaces/_ibl_streaming_interface.py index 0f0a051..f8aac0b 100644 --- a/src/ibl_to_nwb/datainterfaces/iblstreaminginterface.py +++ b/src/ibl_to_nwb/datainterfaces/_ibl_streaming_interface.py @@ -104,7 +104,7 @@ def get_metadata_schema(self) -> dict: def get_metadata(self) -> dict: metadata = super().get_metadata() - ecephys_metadata = load_dict_from_file(file_path=Path(__file__).parent.parent / "metadata" / "ecephys.yml") + ecephys_metadata = load_dict_from_file(file_path=Path(__file__).parent.parent / "_metadata" / "ecephys.yml") metadata["Ecephys"].update({self.es_key: ecephys_metadata["Ecephys"]["ElectricalSeriesAp"]}) if len(self.available_streams) > 1: @@ -176,7 +176,7 @@ def get_metadata(self) -> dict: metadata = super().get_metadata() metadata["Ecephys"].pop("ElectrodeGroup") - ecephys_metadata = load_dict_from_file(file_path=Path(__file__).parent.parent / "metadata" / "ecephys.yml") + ecephys_metadata = load_dict_from_file(file_path=Path(__file__).parent.parent / "_metadata" / "ecephys.yml") metadata["Ecephys"].update({self.es_key: ecephys_metadata["Ecephys"]["ElectricalSeriesLf"]}) if len(self.available_streams) > 1: diff --git a/src/ibl_to_nwb/datainterfaces/lickinterface.py b/src/ibl_to_nwb/datainterfaces/_lick_times.py similarity index 100% rename from src/ibl_to_nwb/datainterfaces/lickinterface.py rename to src/ibl_to_nwb/datainterfaces/_lick_times.py diff --git a/src/ibl_to_nwb/datainterfaces/iblposeestimationinterface.py b/src/ibl_to_nwb/datainterfaces/_pose_estimation.py similarity index 100% rename from src/ibl_to_nwb/datainterfaces/iblposeestimationinterface.py rename to src/ibl_to_nwb/datainterfaces/_pose_estimation.py diff --git a/src/ibl_to_nwb/datainterfaces/pupiltrackinginterface.py b/src/ibl_to_nwb/datainterfaces/_pupil_tracking.py similarity index 97% rename from src/ibl_to_nwb/datainterfaces/pupiltrackinginterface.py rename to src/ibl_to_nwb/datainterfaces/_pupil_tracking.py index 7fd0e06..7a04add 100644 --- a/src/ibl_to_nwb/datainterfaces/pupiltrackinginterface.py +++ b/src/ibl_to_nwb/datainterfaces/_pupil_tracking.py @@ -20,7 +20,7 @@ def __init__(self, one: ONE, session: str, camera_name: str): def get_metadata(self) -> dict: metadata = super().get_metadata() - pupils_metadata = load_dict_from_file(file_path=Path(__file__).parent.parent / "metadata" / "pupils.yml") + pupils_metadata = load_dict_from_file(file_path=Path(__file__).parent.parent / "_metadata" / "pupils.yml") metadata.update(pupils_metadata) return metadata diff --git a/src/ibl_to_nwb/datainterfaces/roimotionenergyinterface.py b/src/ibl_to_nwb/datainterfaces/_roi_motion_energy.py similarity index 100% rename from src/ibl_to_nwb/datainterfaces/roimotionenergyinterface.py rename to src/ibl_to_nwb/datainterfaces/_roi_motion_energy.py diff --git a/src/ibl_to_nwb/datainterfaces/wheelinterface.py b/src/ibl_to_nwb/datainterfaces/_wheel_movement.py similarity index 98% rename from src/ibl_to_nwb/datainterfaces/wheelinterface.py rename to src/ibl_to_nwb/datainterfaces/_wheel_movement.py index 4413e79..64f684d 100644 --- a/src/ibl_to_nwb/datainterfaces/wheelinterface.py +++ b/src/ibl_to_nwb/datainterfaces/_wheel_movement.py @@ -18,7 +18,7 @@ def __init__(self, one: ONE, session: str): def get_metadata(self) -> dict: metadata = super().get_metadata() - metadata.update(load_dict_from_file(file_path=Path(__file__).parent.parent / "metadata" / "wheel.yml")) + metadata.update(load_dict_from_file(file_path=Path(__file__).parent.parent / "_metadata" / "wheel.yml")) return metadata diff --git a/src/ibl_to_nwb/scripts/__init__.py b/src/ibl_to_nwb/scripts/__init__.py deleted file mode 100644 index e69de29..0000000 From a6078c71f01a4e75e756807713212a1b7e07d67c Mon Sep 17 00:00:00 2001 From: Cody Baker Date: Mon, 23 Sep 2024 21:54:58 -0400 Subject: [PATCH 3/5] update test --- .github/workflows/deploy_tests_on_pull_request.yml | 2 +- .../workflows/{installation.yml => test_installation.yml} | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) rename .github/workflows/{installation.yml => test_installation.yml} (84%) diff --git a/.github/workflows/deploy_tests_on_pull_request.yml b/.github/workflows/deploy_tests_on_pull_request.yml index 9453950..817b20c 100644 --- a/.github/workflows/deploy_tests_on_pull_request.yml +++ b/.github/workflows/deploy_tests_on_pull_request.yml @@ -9,4 +9,4 @@ concurrency: # Cancel previous workflows on the same pull request jobs: TestInstallation: - uses: ./.github/workflows/installation.yml + uses: ./.github/workflows/test_installation.yml diff --git a/.github/workflows/installation.yml b/.github/workflows/test_installation.yml similarity index 84% rename from .github/workflows/installation.yml rename to .github/workflows/test_installation.yml index fec1a94..d6c1771 100644 --- a/.github/workflows/installation.yml +++ b/.github/workflows/test_installation.yml @@ -35,5 +35,8 @@ jobs: - name: Test import run: python -c "import ibl_to_nwb" - - name: Test import - run: python -c "import ibl_to_nwb.brainwide_map" + - name: Test data interface imports + run: python -c "import ibl_to_nwb.datainterface" + + - name: Test converters imports + run: python -c "import ibl_to_nwb.converters" From 9f0c448423d6fa1163735bc3037b5a24c15918cb Mon Sep 17 00:00:00 2001 From: Cody Baker Date: Mon, 23 Sep 2024 22:07:10 -0400 Subject: [PATCH 4/5] typo --- .github/workflows/test_installation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_installation.yml b/.github/workflows/test_installation.yml index d6c1771..e5bf72d 100644 --- a/.github/workflows/test_installation.yml +++ b/.github/workflows/test_installation.yml @@ -36,7 +36,7 @@ jobs: run: python -c "import ibl_to_nwb" - name: Test data interface imports - run: python -c "import ibl_to_nwb.datainterface" + run: python -c "import ibl_to_nwb.datainterfaces" - name: Test converters imports run: python -c "import ibl_to_nwb.converters" From 8d4194ba783d43df69600154d19f8cd4fd323d3c Mon Sep 17 00:00:00 2001 From: Cody Baker Date: Mon, 23 Sep 2024 22:10:02 -0400 Subject: [PATCH 5/5] fix dependencies --- pyproject.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index d292583..151d7ac 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,6 +21,8 @@ license = {file = "license.txt"} requires-python = ">=3.9" dependencies = [ "neuroconv", + "spikeinterface", + "probeinterface", "ndx-pose>=0.1.1", "ndx-ibl==0.1.0", "ONE-api",