Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Dec 18, 2023
1 parent c3eb205 commit ecb63d6
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 31 deletions.
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
from pathlib import Path
from setuptools import setup, find_packages

from setuptools import find_packages, setup

requirements_file_path = Path(__file__).parent / "requirements.txt"
with open(requirements_file_path) as file:
Expand Down
9 changes: 6 additions & 3 deletions src/jazayeri_lab_to_nwb/watters/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
from .wattersbehaviorinterface import WattersEyePositionInterface, WattersPupilSizeInterface
from .watterstrialsinterface import WattersTrialsInterface
from .wattersrecordinginterface import WattersDatRecordingInterface
from .wattersbehaviorinterface import (
WattersEyePositionInterface,
WattersPupilSizeInterface,
)
from .wattersnwbconverter import WattersNWBConverter
from .wattersrecordinginterface import WattersDatRecordingInterface
from .watterstrialsinterface import WattersTrialsInterface
7 changes: 4 additions & 3 deletions src/jazayeri_lab_to_nwb/watters/watters_convert_session.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
"""Primary script to run to convert an entire session for of data using the NWBConverter."""
import os
import datetime
import glob
import json
import logging
import os
from pathlib import Path
from typing import Union
from uuid import uuid4
from zoneinfo import ZoneInfo

from neuroconv.tools.data_transfers import automatic_dandi_upload
from neuroconv.utils import load_dict_from_file, dict_deep_update
from neuroconv.utils import dict_deep_update, load_dict_from_file

from jazayeri_lab_to_nwb.watters import WattersNWBConverter

Expand Down Expand Up @@ -64,6 +64,7 @@ def session_to_nwb(
"""
if dandiset_id is not None:
import dandi # check importability

assert os.getenv("DANDI_API_KEY"), (
"Unable to find environment variable 'DANDI_API_KEY'. "
"Please retrieve your token from DANDI and set this environment variable."
Expand Down Expand Up @@ -249,5 +250,5 @@ def session_to_nwb(
output_dir_path=output_dir_path,
stub_test=stub_test,
overwrite=overwrite,
# dandiset_id = "000620",
# dandiset_id = "000620",
)
10 changes: 5 additions & 5 deletions src/jazayeri_lab_to_nwb/watters/wattersbehaviorinterface.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
"""Primary classes for converting experiment-specific behavior."""
import numpy as np
from pathlib import Path
from pynwb import NWBFile, TimeSeries
from pynwb.behavior import SpatialSeries
from hdmf.backends.hdf5 import H5DataIO

import numpy as np
from hdmf.backends.hdf5 import H5DataIO
from neuroconv.basetemporalalignmentinterface import BaseTemporalAlignmentInterface
from neuroconv.utils import DeepDict, FolderPathType, FilePathType
from neuroconv.tools.nwb_helpers import get_module
from neuroconv.utils import DeepDict, FilePathType, FolderPathType
from pynwb import NWBFile, TimeSeries
from pynwb.behavior import SpatialSeries


class NumpyTemporalAlignmentMixin:
Expand Down
19 changes: 11 additions & 8 deletions src/jazayeri_lab_to_nwb/watters/wattersnwbconverter.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
"""Primary NWBConverter class for this dataset."""
import json
import logging
import numpy as np
from typing import Optional
from pathlib import Path
from typing import Optional

import numpy as np
from neuroconv import NWBConverter
from neuroconv.utils import FolderPathType
from neuroconv.basetemporalalignmentinterface import BaseTemporalAlignmentInterface
from neuroconv.datainterfaces import (
SpikeGLXRecordingInterface,
KiloSortSortingInterface,
SpikeGLXRecordingInterface,
)
from neuroconv.datainterfaces.ecephys.baserecordingextractorinterface import (
BaseRecordingExtractorInterface,
)
from neuroconv.datainterfaces.ecephys.basesortingextractorinterface import (
BaseSortingExtractorInterface,
)
from neuroconv.datainterfaces.ecephys.baserecordingextractorinterface import BaseRecordingExtractorInterface
from neuroconv.datainterfaces.ecephys.basesortingextractorinterface import BaseSortingExtractorInterface
from neuroconv.basetemporalalignmentinterface import BaseTemporalAlignmentInterface
from neuroconv.datainterfaces.text.timeintervalsinterface import TimeIntervalsInterface

from neuroconv.utils import FolderPathType
from spikeinterface.core.waveform_tools import has_exceeding_spikes
from spikeinterface.curation import remove_excess_spikes

Expand Down
14 changes: 7 additions & 7 deletions src/jazayeri_lab_to_nwb/watters/wattersrecordinginterface.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
"""Primary class for Watters Plexon probe data."""
import os
import json
import numpy as np
from pynwb import NWBFile
import os
from pathlib import Path
from typing import Optional, Union

from neuroconv.datainterfaces.ecephys.baserecordingextractorinterface import BaseRecordingExtractorInterface
from neuroconv.utils import FilePathType

import numpy as np
import probeinterface as pi
from neuroconv.datainterfaces.ecephys.baserecordingextractorinterface import (
BaseRecordingExtractorInterface,
)
from neuroconv.utils import FilePathType
from pynwb import NWBFile
from spikeinterface import BaseRecording


Expand Down Expand Up @@ -78,7 +79,6 @@ def __init__(
values=[probe_name] * len(self.recording_extractor.channel_ids),
)


def get_metadata(self) -> dict:
metadata = super().get_metadata()
metadata["Ecephys"]["Device"] = [
Expand Down
8 changes: 4 additions & 4 deletions src/jazayeri_lab_to_nwb/watters/watterstrialsinterface.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
"""Primary class for converting experiment-specific behavior."""
import json
import numpy as np
import pandas as pd
import warnings
from pathlib import Path
from pynwb import NWBFile
from typing import Optional

import numpy as np
import pandas as pd
from neuroconv.datainterfaces.text.timeintervalsinterface import TimeIntervalsInterface
from neuroconv.utils import DeepDict, FolderPathType, FilePathType
from neuroconv.utils import DeepDict, FilePathType, FolderPathType
from pynwb import NWBFile


class WattersTrialsInterface(TimeIntervalsInterface):
Expand Down

0 comments on commit ecb63d6

Please sign in to comment.