Skip to content

Commit

Permalink
Import ndx-ophys-devices first
Browse files Browse the repository at this point in the history
  • Loading branch information
rly committed Dec 18, 2024
1 parent 4db6fee commit 8b90262
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/pynwb/ndx_microscopy/__init__.py
Original file line number Diff line number Diff line change
@@ -8,6 +8,10 @@
# TODO: Remove when python 3.9 becomes the new minimum
from importlib_resources import files

# NOTE: ndx-ophys-devices needs to be imported first because loading the ndx-microscopy namespace depends on
# having the ndx-ophys-devices namespace loaded into the global type map.
from ndx_ophys_devices import ExcitationSource, Indicator, OpticalFilter, Photodetector

extension_name = "ndx-microscopy"

# Get path to the namespace.yaml file with the expected location when installed not in editable mode
@@ -19,7 +23,6 @@
__spec_path = __location_of_this_file.parent.parent.parent / "spec" / f"{extension_name}.namespace.yaml"

load_namespaces(str(__spec_path))
from ndx_ophys_devices import ExcitationSource, Indicator, OpticalFilter, Photodetector

Microscope = get_class("Microscope", extension_name)
ExcitationLightPath = get_class("ExcitationLightPath", extension_name)

0 comments on commit 8b90262

Please sign in to comment.