Skip to content

Align with PyMoDAQ 5.3.x (extension start-up, FieldLoaderApp, deprecations) - #58

Draft
seb5g wants to merge 2 commits into
5.3.xfrom
fix/pymodaq-5.3-compat
Draft

seb5g wants to merge 2 commits into
5.3.xfrom
fix/pymodaq-5.3-compat

Conversation

@seb5g

@seb5g seb5g commented Oct 26, 2026

Copy link
Copy Markdown
Collaborator

Summary

Audit of the CustomApp / CustomExt of the package against PyMoDAQ 5.3.8 (see the audit document shared in the project). The BeamShaping extension did not even start.

  • pyproject.toml: pymodaq, pymodaq_utils, pymodaq_gui, pymodaq_data now require the 5.3.x series explicitly (<5.4), requires-python >= 3.10, build requirement pymodaq_utils>=5.3.6.
  • Extension start-up: AlgoApp assigned module_and_data_saver, a read-only property of CustomApp in 5.3 (property with a setter now). utilities/calibrating.py imported pymodaq.extensions.scan.scan_manager, which no longer exists, at import time: the call is removed (see below).
  • FieldLoaderApp: the legend action triggered on both 2D viewers makes LegendItem paint a UniformImageItem that has no opts in pymodaq_gui 5.3 (paint error, native crash with PySide6): not triggered anymore. The mask now uses the ROI of the ROIMeta (.roi). The widgets of the previous loader are detached without processEvents().
  • Deprecations flagged by check_plugin: _epsilons, current_value, setup_docks -> setup_docks_and_widgets, pymodaq.utils.custom_ext, load_dashboard_with_arguments in the main() functions.
  • tests/test_custom_apps.py: creates FieldLoaderApp (loaders, mask), AlgoApp, Correction and the extension on an empty Dashboard. tests/conftest.py imports cv2 first (its wheel sets QT_QPA_PLATFORM_PLUGIN_PATH, which breaks PyQt5) and creates the QApplication with mkQApp (the apps read the theme).

Not done / to validate

  • Calibration (BeamShapingCalibration): resources/holography_calibration.xml is a scan configuration of the former scanner manager and has to be rewritten as an entry of the 5.3 scan manager. The calibration is therefore still not usable; a TODO documents it.
  • Tested with PySide6 only locally, no real hardware.

Generated by Claude Code

…and the deprecations

- require pymodaq 5.3.x explicitly (>=5.3.2,<5.4), python >= 3.10
- AlgoApp: module_and_data_saver is a property of CustomApp, override it with a setter
- FieldLoaderApp: do not trigger the legend of the 2D viewers (paint error in pymodaq_gui 5.3, crash with PySide6),
  use the ROI of the ROIMeta for the mask, detach widgets of the previous loader without processEvents
- calibrating: no more import of the removed ScanManager.get_scanner_folder (calibration scan entry to be redone)
- _epsilons, current_value, setup_docks_and_widgets, pymodaq.utils.custom_ext, load_dashboard_with_arguments
- tests creating the CustomApp and the extension

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

At import time pytest-xvfb has not started its display yet, which aborted pytest on the Linux CI jobs.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CAhZwmbyCSpSgfTyicUxuS
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