Skip to content

Add generic widgets for watching signal values, tweaking movables, device status and beamline status. - #148

Open
Jakub Wlodek (jwlodek) wants to merge 18 commits into
NSLS2:mainfrom
jwlodek:beamline-status
Open

Jakub Wlodek (jwlodek) wants to merge 18 commits into
NSLS2:mainfrom
jwlodek:beamline-status

Conversation

@jwlodek

Copy link
Copy Markdown
Contributor
  • Add theming for status section
  • Add widget for watching live value of scalar/string signals
  • Add widget that given a device will generate a status view displaying hinted signal statuses
  • Add unit tests for device status widget
  • Add widget that extends signal status to also offer setpoint and tweak controls for movable signals
  • Add widget that groups move controls to allow for batch moves
  • Create slits control widget out of movable groups
  • Some refactoring of shutter widget to extend from signal status widget
  • Add HEX specific components using new features

@sligara7
Anthony Sligar (sligara7) marked this pull request as ready for review November 12, 2026 16:25
Copilot AI balanced review requested due to automatic review settings November 12, 2026 16:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Unvalidated execution-namespace mismatches can cause the controls to move a different device from the one displayed or check the wrong RunEngine.

5 open issues
What changed in this PR

Adds reusable monitoring and motion-control widgets to the hextools Qt GUI, with HEX-specific slit, filter, and beamline views.

Changes:

  • Add themed live signal, device, and beamline status displays, including shared support for shutter indicators.
  • Add typed setpoints, tweaks, and batch moves for local controls while retaining Queue Server plan widgets.
  • Extend slit and filter subscription interfaces, expose move_filters, and add GUI and device regression tests.
File Description
tests/​photon_delivery_system/​test_slits.py Tests slit-axis readbacks, subscriptions, and progress.
tests/​photon_delivery_system/​test_filters.py Tests filter labels, subscriptions, and paired moves.
tests/​gui/​test_window_close.py Tests status-window integration and slit selection.
tests/​gui/​test_signal_status.py Tests value formatting, alarms, units, and cleanup.
tests/​gui/​test_signal_status_group.py Tests hinted fields and status layouts.
tests/​gui/​test_shutter_status.py Updates indicator tests and covers invalid alarms.
tests/​gui/​test_movable_control.py Tests typed inputs, tweaks, batching, and slit controls.
tests/​gui/​test_hex_status_sections.py Tests HEX status sections and filter controls.
src/​hextools/​profiles/​collection.py Exposes mv and mvr in the operator namespace.
src/​hextools/​photon_delivery_system/​slits.py Introduces subscribable gap and center motion devices.
src/​hextools/​photon_delivery_system/​filters.py Adds subscriptions, label lookup, and move_filters.
src/​hextools/​photon_delivery_system/​__init__.py Exports move_filters.
src/​hextools/​gui/​slits_control.py Adds grouped slit controls and a slit selector.
src/​hextools/​gui/​signal_status.py Adds live scalar displays and subscription handling.
src/​hextools/​gui/​signal_status_group.py Builds device and beamline status layouts.
src/​hextools/​gui/​shutter_status.py Reuses signal-status widgets for shutter indicators.
src/​hextools/​gui/​movable_group.py Adds staged batch-move controls.
src/​hextools/​gui/​movable_control.py Adds typed setpoint and relative-tweak controls.
src/​hextools/​gui/​hex_config.py Defines HEX device discovery and status sections.
src/​hextools/​gui/​_theme.py Styles status headers and field labels.
src/​hextools/​gui/​__main__.py Integrates local controls and the beamline status window.

Review effort: Balanced

Comment thread src/hextools/gui/movable_control.py Resolved
Comment thread src/hextools/gui/hex_config.py Resolved
Comment thread src/hextools/gui/movable_control.py Resolved
Comment thread src/hextools/gui/movable_group.py Resolved
Comment thread src/hextools/gui/signal_status.py Outdated
self.reading_changed.connect(on_reading)
# ophyd-async subscriptions must be made on the bluesky event loop, and
# callbacks arrive on that thread; the queued Qt signal hops back.
loop.call_soon_threadsafe(obj.subscribe_reading, self._on_reading)
Copilot AI balanced review requested due to automatic review settings November 12, 2026 17:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Deferred moves can be submitted to a non-idle RunEngine, and inconsistent device alias selection can prevent the acquisition window from opening.

6 open issues
1 resolved since last review

Review effort: Balanced

Comment on lines +209 to +210
try:
error = run_in_ipython(code)
Comment on lines +93 to +96
parts = name.split(".")
# Attribute access only, so no code in ``name`` is ever evaluated.
if not all(p.isidentifier() and not p.startswith("_") for p in parts):
raise KeyError(name)

@sligara7 Anthony Sligar (sligara7) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pending the merge conflict (probably from me merging PR 145), this PR looks good to merge.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Failed or paused batches discard pending targets and prevent straightforward retries, while indexed-path and alias mismatches can cause control and window construction to fail.

4 open issues
3 resolved since last review

Review effort: Balanced

"""``(variable name, object)`` for each distinct instance of ``types``."""
seen: set[int] = set()
found = []
for name, obj in sorted(namespace.items()):

This branch has not been deployed

No deployments
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.

3 participants