Repository navigation
Do not fail at import when no camera or spectrometer is found - #36
Merged
Merged
Conversation
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Tdiso1u1ZhikSutj2Qs5Cg
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.
Before:
daq_move_ShamrockPll,daq_2Dviewer_AndorCCDPll(anddaq_1Dviewer_ShamrockCCDPll, which inherits from them) fail to import withIndexError: list index out of rangewhen no spectrometer or camera is found, for instance on a CI runner: the class bodies takeSPEC_NAMES[0]/CAM_NAMES[0]. This fails 3 tests oftests/test_plugin_package_structure.py.After: the default value of the
spectro_sn/serial_numberlists is''when the list of devices is empty.daq_2Dviewer_AndorSCMOSPllhad the same line and gets the same change.How:
'value': CAM_NAMES[0] if CAM_NAMES else ''(and the same withSPEC_NAMES) in the three files. This commit was pushed to #34 just after it was merged, so it is repeated here on5.0.x.Tested: the three files compile; the tests were not run (pylablib is not installed in my environment) and no hardware was used.
Generated by Claude Code