Refactor devices#1055
Merged
AdvancedImagingUTSW merged 26 commits intoFeb 12, 2025
Merged
Conversation
Add device types and factories; Simplify the way to start devices.
Co-Authored-By: Annie Wang <6161065+annie-xd-wang@users.noreply.github.com>
Collaborator
|
Just letting you guys know, I get an error on this PR related to the Mirror: (navigate) C:\Users\vastopmv3\Documents\GitHub\navigate\src\navigate>python main.py
2025-02-07 17:03:23,335 - model - ERROR - device_startup_functions: Device not found in configuration: ('OPM-VAST', 'mirror', 'ImagineOptics', 0)
Device not found in configuration: ('OPM-VAST', 'mirror', 'ImagineOptics', 0)
vvvvvvvvvvvvvvvvvvvvvvvvvvv Child Process Traceback vvvvvvvvvvvvvvvvvvvvvvvvvvv
Traceback (most recent call last):
File "C:\Users\vastopmv3\Documents\GitHub\navigate\src\navigate\model\concurrency\concurrency_tools.py", line 501, in _child_loop
obj = initializer(*initargs, **initkwargs)
File "C:\Users\vastopmv3\Documents\GitHub\navigate\src\navigate\model\model.py", line 138, in __init__
self.microscopes[microscope_name] = Microscope(
File "C:\Users\vastopmv3\Documents\GitHub\navigate\src\navigate\model\microscope.py", line 270, in __init__
self.load_and_start_devices(
File "C:\Users\vastopmv3\Documents\GitHub\navigate\src\navigate\model\microscope.py", line 1024, in load_and_start_devices
exec(
File "<string>", line 1, in <module>
File "C:\Users\vastopmv3\Documents\GitHub\navigate\src\navigate\model\device_startup_functions.py", line 462, in start_device
device_not_found(microscope_name, device_category, device_type, device_id)
File "C:\Users\vastopmv3\Documents\GitHub\navigate\src\navigate\model\device_startup_functions.py", line 524, in device_not_found
raise RuntimeError()
RuntimeError
^^^^^^^^^^^^^^^^^^^^^^^^^^^ Child Process Traceback ^^^^^^^^^^^^^^^^^^^^^^^^^^^
vvvvvvvvvvvvvvvvvvvvvvvvvvv Main Process Traceback vvvvvvvvvvvvvvvvvvvvvvvvvvvv
Traceback (most recent call last):
File "C:\Users\vastopmv3\Documents\GitHub\navigate\src\navigate\main.py", line 131, in <module>
main()
File "C:\Users\vastopmv3\Documents\GitHub\navigate\src\navigate\main.py", line 114, in main
Controller(
File "C:\Users\vastopmv3\Documents\GitHub\navigate\src\navigate\controller\controller.py", line 222, in __init__
self.model = ObjectInSubprocess(
File "C:\Users\vastopmv3\Documents\GitHub\navigate\src\navigate\model\concurrency\concurrency_tools.py", line 383, in __init__
assert _get_response(self) == "Successfully initialized"
File "C:\Users\vastopmv3\Documents\GitHub\navigate\src\navigate\model\concurrency\concurrency_tools.py", line 438, in _get_response
raise resp
RuntimeErrorI don't get this on /develop so I'm thinking it is related to the refactor. My logs/model_debug.txt is as follows: 2025-02-07 17:03:23,303 - model - INFO - decorators: DAQBase, (<DictProxy object, typeid 'dict' at 0x1798692f460>,), {}
2025-02-07 17:03:23,304 - model - INFO - decorators: NIDAQ, (<DictProxy object, typeid 'dict' at 0x1798692f460>,), {}
2025-02-07 17:03:23,335 - model - ERROR - device_startup_functions: Device not found in configuration: ('OPM-VAST', 'mirror', 'ImagineOptics', 0) |
Collaborator
|
@dpshepherd @SJShep - This is a major overhaul to how devices are handled. Much cleaner than it was previously. We have tested it on all of our local machines, which cover a lot of different combinations of hardware. We will now take a look at your PR and see if we can integrate it now. However, please let us know if you have any problems. |
AdvancedImagingUTSW
approved these changes
Feb 12, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Will test the code with real devices and fix test cases.