feat(events): instrument plate readers, imagers, and thermocyclers - #1229
Merged
rickwierenga merged 5 commits intoSep 1, 2026
Merged
Conversation
Add structured EventBus lifecycles for plate reader operations and imager capture while preserving existing frontend behavior. Keep measurement and image payloads bounded, and emit one public capture lifecycle across autofocus and auto-exposure internals.
Add structured EventBus lifecycles for stable protocol-facing thermocycler operations without changing backend execution semantics. Leave composite profile orchestration, waits, and status polling outside this event contract.
Document the canonical EventBus schemas, resource semantics, bounded completion metadata, and intentionally excluded composite operations for plate reading, imaging, and thermocycling.
Use the standard-library math implementation for the scalar golden-ratio calculation so autofocus does not fail when the optional NumPy dependency is absent.
rickwierenga
reviewed
Sep 1, 2026
Member
There was a problem hiding this comment.
this file duplicates what's already documented in the event schemas file.
rickwierenga
reviewed
Sep 1, 2026
Member
|
thanks for the PR! tiny comment above |
Contributor
Author
|
Good catch, I fixed that. No code changes. |
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.
Summary
Extends PyLabRobot's structured EventBus coverage to measurement and thermal frontends.
imager.capturelifecycle per public capture request, including autofocus and auto-exposure workflows without exposing their internal attempts as event stormsEvent semantics
The new events follow the existing EventBus contract:
started/completed/failedlifecycle records share oneoperation_idFor imaging, autofocus and auto-exposure may perform multiple internal hardware captures, but one public
capture()request produces one semanticimager.capturelifecycle.For thermocycling,
thermocycler.run_protocol.completedmeans that the backend coroutine returned successfully. It does not claim independent physical verification that the protocol finished on the instrument.Intentionally out of scope
run_pcr_profileas a separate lifecycle: it remains a composite of existing instrumented operationsThese can be addressed separately without expanding the EventBus contract in this PR.
Validation
226 passed, plus29 subtests passed, across EventBus, plate-reading/imaging, and thermocycling suitespython -m mypy pylabrobot— success across 729 source filespython -m ruff check pylabrobot— passedpython -m ruff format --check pylabrobot— passedgit diff --check— passedpip check— passedNo physical hardware was driven during validation.