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

Modern reorgnizations #80

Merged
merged 5 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .github/workflows/deploy_tests_on_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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.datainterfaces"

- name: Test converters imports
run: python -c "import ibl_to_nwb.converters"
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion src/ibl_to_nwb/brainwide_map/__init__.py

This file was deleted.

1 change: 0 additions & 1 deletion src/ibl_to_nwb/brainwide_map/datainterfaces/__init__.py

This file was deleted.

7 changes: 7 additions & 0 deletions src/ibl_to_nwb/converters/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from ._brainwide_map_converter import BrainwideMapConverter
from ._iblconverter import IblConverter

__all__ = [
"BrainwideMapConverter",
"IblConverter",
]
Original file line number Diff line number Diff line change
Expand Up @@ -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
28 changes: 20 additions & 8 deletions src/ibl_to_nwb/datainterfaces/__init__.py
Original file line number Diff line number Diff line change
@@ -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",
]
Original file line number Diff line number Diff line change
Expand Up @@ -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

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

Expand Down
Empty file.
8 changes: 0 additions & 8 deletions src/ibl_to_nwb/requirements.txt

This file was deleted.

Loading