Skip to content

Add the Move and Grab reference extension - #22

Open
seb5g wants to merge 5 commits into
5.3.xfrom
feat/move-and-grab-extension
Open

seb5g wants to merge 5 commits into
5.3.xfrom
feat/move-and-grab-extension

Conversation

@seb5g

@seb5g seb5g commented Oct 11, 2026

Copy link
Copy Markdown
Contributor

Before: the package had no extension, and there was no small, working example of a Dashboard extension driving instruments (the core ones are hundreds to thousands of lines).

After: extensions/move_and_grab.py (about 130 lines, extensions = true): it picks an actuator and a detector of the Dashboard's experiment through modules_manager, moves the actuator to a target (a DataActuator with units), grabs the detector, shows the data in a ViewerDispatcher and can save them to the h5 file. It never blocks the GUI (move and grab use callbacks, with a timeout handler), and refuses to quit while busy. The README lists it; the PyMoDAQ page "How a Dashboard extension works" (PyMoDAQ/PyMoDAQ#1296) explains the structure.

How: tested with tests/test_move_and_grab.py (5 tests: structure, instrument lists, move and grab with units and tolerance, quit refused while busy, saving into a temporary folder) against the mock actuator and the mock 0D detector of PyMoDAQ, offscreen with PySide6 6.12 and PyMoDAQ 5.3.2 (all pass locally). Not tested on real hardware, it only uses mock instruments. check_plugin reports nothing for the new module.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Tdiso1u1ZhikSutj2Qs5Cg


Generated by Claude Code

seb5g commented Oct 11, 2026

Copy link
Copy Markdown
Contributor Author

The first CI run failed before reaching any test: the runner has no libEGL.so.1, which Qt needs to import (pytest-qt INTERNALERROR). This repo's Testbase.yml had never run on a PR, so the gap was not visible. I pushed 8ebab75, which adds libegl1 libgl1 to its apt install. The run is in progress.


Generated by Claude Code

seb5g commented Oct 11, 2026

Copy link
Copy Markdown
Contributor Author

CI status. This repo's test workflow had never passed on a PR, so I fixed what blocked it: missing libegl1/libgl1/libxcb-cursor0 on the runner, xdist workers collecting different tests (now serial), and a stale pymodaq.utils.h5modules import in test_exporters.py (now pymodaq_data.h5modules). All 5 new Move and Grab tests pass.

One failure remains and is not from this PR: tests/test_axis_names.py::test_stage_names fails with KeyError: 'anotheraxis' in axis_unit (move_utility_classes.py:335). It sets a new axis name on MockNamedAxes without adding its unit, which the current pymodaq no longer tolerates. I left it alone; it needs a decision on whether the test or the plugin should change.


Generated by Claude Code

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