diff --git a/src/pynwb/ndx_microscopy/__init__.py b/src/pynwb/ndx_microscopy/__init__.py index 6b5f389..394c41b 100644 --- a/src/pynwb/ndx_microscopy/__init__.py +++ b/src/pynwb/ndx_microscopy/__init__.py @@ -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)