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 May 25, 2024
1 parent 6f7003b commit 3eb6046
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 27 deletions.
2 changes: 1 addition & 1 deletion spec/ndx-microscopy.extensions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ groups:
- null
doc: Link to the objective lens device.
quantity: "?"

- neurodata_type_def: Microscopy
neurodata_type_inc: LabMetaData
doc: Extends LabMetaData to hold all Microscopy metadata.
Expand Down
11 changes: 6 additions & 5 deletions src/pynwb/ndx_microscopy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,16 @@
load_namespaces(str(__spec_path))

from ndx_ophys_devices import (
Indicator,
ExcitationSource,
Photodetector,
DichroicMirror,
BandOpticalFilter,
DichroicMirror,
EdgeOpticalFilter,
ObjectiveLens,
ExcitationSource,
Indicator,
Microscope,
ObjectiveLens,
Photodetector,
)

Microscopy = get_class("Microscopy", extension_name)
MicroscopyTable = get_class("MicroscopyTable", extension_name)
ImagingSpace = get_class("ImagingSpace", extension_name)
Expand Down
6 changes: 3 additions & 3 deletions src/pynwb/ndx_microscopy/testing/_mock.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def mock_PlanarMicroscopySeries(
planar_microscopy_series = ndx_microscopy.PlanarMicroscopySeries(
name=series_name,
description=description,
microscopy_table_region = microscopy_table_region,
microscopy_table_region=microscopy_table_region,
data=series_data,
unit=unit,
conversion=conversion,
Expand Down Expand Up @@ -163,7 +163,7 @@ def mock_VariableDepthMicroscopySeries(
variable_depth_microscopy_series = ndx_microscopy.VariableDepthMicroscopySeries(
name=series_name,
description=description,
microscopy_table_region = microscopy_table_region,
microscopy_table_region=microscopy_table_region,
data=series_data,
depth_per_frame_in_mm=series_depth_per_frame_in_mm,
unit=unit,
Expand Down Expand Up @@ -213,7 +213,7 @@ def mock_VolumetricMicroscopySeries(
volumetric_microscopy_series = ndx_microscopy.VolumetricMicroscopySeries(
name=series_name,
description=description,
microscopy_table_region = microscopy_table_region,
microscopy_table_region=microscopy_table_region,
data=series_data,
unit=unit,
conversion=conversion,
Expand Down
13 changes: 7 additions & 6 deletions src/pynwb/tests/test_constructors.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
"""Test in-memory Python API constructors for ndx-microscopy extension."""

import pytest

from ndx_ophys_devices.testing import (
mock_Indicator,
mock_Photodetector,
mock_DichroicMirror,
mock_BandOpticalFilter,
mock_DichroicMirror,
mock_EdgeOpticalFilter,
mock_ObjectiveLens,
mock_ExcitationSource,
mock_Indicator,
mock_Microscope,
mock_ObjectiveLens,
mock_Photodetector,
)

from ndx_microscopy.testing import (
Expand All @@ -22,6 +21,8 @@
mock_VolumetricImagingSpace,
mock_VolumetricMicroscopySeries,
)


def test_constructor_microscopy():
mock_Microscopy()

Expand All @@ -46,7 +47,7 @@ def test_constructor_planar_microscopy_series():
def test_constructor_variable_depth_microscopy_series():
imaging_space = mock_PlanarImagingSpace()

mock_VariableDepthMicroscopySeries(imaging_space=imaging_space )
mock_VariableDepthMicroscopySeries(imaging_space=imaging_space)


def test_constructor_volumetric_microscopy_series():
Expand Down
16 changes: 4 additions & 12 deletions src/pynwb/tests/test_ndx_microscopy.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,29 +44,23 @@ def test_constructor_planar_microscopy_series():
light_source = mock_ExcitationSource()
imaging_space = mock_PlanarImagingSpace(microscope=microscope)

mock_PlanarMicroscopySeries(
microscope=microscope, light_source=light_source, imaging_space=imaging_space
)
mock_PlanarMicroscopySeries(microscope=microscope, light_source=light_source, imaging_space=imaging_space)


def test_constructor_variable_depth_microscopy_series():
microscope = mock_Microscope()
light_source = mock_ExcitationSource()
imaging_space = mock_PlanarImagingSpace(microscope=microscope)

mock_VariableDepthMicroscopySeries(
microscope=microscope, light_source=light_source, imaging_space=imaging_space
)
mock_VariableDepthMicroscopySeries(microscope=microscope, light_source=light_source, imaging_space=imaging_space)


def test_constructor_volumetric_microscopy_series():
microscope = mock_Microscope()
light_source = mock_ExcitationSource()
imaging_space = mock_PlanarImagingSpace(microscope=microscope)

mock_VolumetricMicroscopySeries(
microscope=microscope, light_source=light_source, imaging_space=imaging_space
)
mock_VolumetricMicroscopySeries(microscope=microscope, light_source=light_source, imaging_space=imaging_space)


@pytest.fixture(scope="module")
Expand All @@ -77,9 +71,7 @@ def nwbfile_with_microscopy():
light_source = mock_ExcitationSource()
imaging_space = mock_PlanarImagingSpace(microscope=microscope)

mock_PlanarMicroscopySeries(
microscope=microscope, light_source=light_source, imaging_space=imaging_space
)
mock_PlanarMicroscopySeries(microscope=microscope, light_source=light_source, imaging_space=imaging_space)

return nwbfile

Expand Down

0 comments on commit 3eb6046

Please sign in to comment.