Skip to content

Show the CameraBase settings in the OpenCV plugin class and fix the tests for the checkable ROI buttons - #17

Merged
seb5g merged 4 commits into
mainfrom
fix/explicit-params
Oct 27, 2026
Merged

seb5g merged 4 commits into
mainfrom
fix/explicit-params

Conversation

@seb5g

@seb5g seb5g commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Before: the settings of DAQ_2DViewer_OpenCV were comon_parameters + [...] + webcam_params(), where a helper copied and modified cam_params of CameraBase, so the class preamble did not show where the camera settings come from. The tests also pressed the ROI buttons with a boolean, which the checkable buttons of utils 5.3.2 no longer accept.

After: params = comon_parameters + [OpenCV settings] + cam_params, like CameraBase itself. The webcam differences (colour conversion RGB2GRAY by default, exposure time and buffer hidden) are applied in __init__. The tests press the buttons like the user does.

How: removed webcam_params; tests/test_opencv_camera.py sets checked then activates the parameter; floors raised to pymodaq_plugins_utils>=5.3.2, pymodaq and pymodaq_gui 5.3.9. Tested locally: 28 passed, 1 skipped. No real webcam.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Tdiso1u1ZhikSutj2Qs5Cg

…kable ROI buttons in the tests

The settings of the plugin were built by a helper that copied and modified the ones of CameraBase, so the class
preamble did not show them. They are now written in the class. The ROI buttons are checkable (utils 5.3.1, pymodaq
5.3.9): the tests press them and the floors follow.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tdiso1u1ZhikSutj2Qs5Cg
… differences in __init__

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tdiso1u1ZhikSutj2Qs5Cg
@seb5g seb5g changed the title Spell out the CameraBase settings in the plugin class Show the CameraBase settings in the OpenCV plugin class and fix the tests for the checkable ROI buttons Oct 27, 2026
The opencv-python wheel (not the headless one) sets QT_QPA_PLATFORM_PLUGIN_PATH to the Qt plugins it ships when
cv2 is imported. The creation of a QApplication with PyQt5 then aborts (seen on CI, Python 3.10 with PyQt5).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tdiso1u1ZhikSutj2Qs5Cg

seb5g commented Oct 27, 2026

Copy link
Copy Markdown
Contributor Author

The compatibility / ubuntu-latest / Python 3.10 / pyqt5 job aborted twice at the creation of the QApplication (fatal error in the qapp fixture, before any test body). Cause: the opencv-python wheel (not the headless one) sets QT_QPA_PLATFORM_PLUGIN_PATH to its own Qt plugins when cv2 is imported. I reproduced it locally (xvfb, PyQt5, full opencv-python 5.0.0.93: abort), and ba567fd restores the plugins of the Qt binding when the driver module is imported (same run: 29 passed). The failure was therefore real, not a flake, so no re-run.


Generated by Claude Code

@seb5g
seb5g merged commit 3f99cbe into main Oct 27, 2026
6 of 7 checks passed
@seb5g
seb5g deleted the fix/explicit-params branch October 27, 2026 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants