Skip to content

Commit

Permalink
Merge branch 'main' into add_nhp_spikeglxX_support
Browse files Browse the repository at this point in the history
  • Loading branch information
CodyCBakerPhD authored Feb 12, 2024
2 parents ba8e769 + 961b781 commit 38b58fd
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 8 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
- name: Install neuroconv with minimal requirements
run: pip install .[test]
run: pip install .
- name: Run import tests
run: |
pytest tests/imports.py::TestImportStructure::test_top_level
Expand All @@ -50,7 +50,8 @@ jobs:
- name: Run minimal tests
run: pytest tests/test_minimal -vv -rsx -n auto --dist loadscope


- name: Install additional specific testing-only requirements
run: pip install .[test]

- name: Install with ecephys requirements
run: pip install .[ecephys]
Expand All @@ -75,8 +76,8 @@ jobs:



- name: Install full requirements (-e needed for codecov report)
run: pip install -e .[full]
- name: Install full requirements
run: pip install -e .[full] # -e needed for codecov report



Expand Down
1 change: 0 additions & 1 deletion requirements-testing.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ ndx-events>=0.2.0 # for special tests to ensure load_namespaces is set to allow
parameterized>=0.8.1
ndx-miniscope
spikeinterface[qualitymetrics]>=0.99.1
roiextractors
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
from typing import Optional

from dateutil.parser import parse as dateparse
from roiextractors.extractors.tiffimagingextractors.scanimagetiff_utils import (
extract_extra_metadata,
)

from ..baseimagingextractorinterface import BaseImagingExtractorInterface
from ....utils import FilePathType
Expand Down Expand Up @@ -42,6 +39,10 @@ def __init__(
The sampling frequency can usually be extracted from the scanimage metadata in
exif:ImageDescription:state.acq.frameRate. If not, use this.
"""
from roiextractors.extractors.tiffimagingextractors.scanimagetiff_utils import (
extract_extra_metadata,
)

self.image_metadata = extract_extra_metadata(file_path=file_path)

if "state.acq.frameRate" in self.image_metadata:
Expand Down
10 changes: 10 additions & 0 deletions tests/imports.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

from unittest import TestCase

from neuroconv import BaseDataInterface


def _strip_magic_module_attributes(ls: list) -> list:
exclude_keys = [
Expand Down Expand Up @@ -89,3 +91,11 @@ def test_datainterfaces(self):
] + interface_name_list

assert sorted(current_structure) == sorted(expected_structure)


def test_datainterfaces_import():
"""Minimal installation should be able to import interfaces from the .datainterfaces submodule."""
# Nothing special about SpikeGLX; just need to pick something to import to ensure a minimal install doesn't fail
from neuroconv.datainterfaces import SpikeGLXRecodingInterface

assert isinstance(SpikeGLXRecodingInterface, BaseDataInterface)

0 comments on commit 38b58fd

Please sign in to comment.