Repository navigation
Use ActionInfo in Invocations - #414
Merged
Merged
Conversation
Passing around descriptor instances is hard to type properly and gets really confusing. I've changed `Invocation` so that `action` is an `ActionInfo` object rather than an `ActionDescriptor`, which should fix that problem. I've also changed `list_invocations` to use thing and action names, instead of objects.
Added a test for the new property, which also checks a few other features of Invocation.
bprobert97
reviewed
Nov 2, 2026
This removes a left-over print statement and swaps `is` for `==` in a string comparison. It also adds a timeout to a test that had the potential to hang indefinitely.
rwb27
force-pushed
the
dont-pass-around-actiondescriptor
branch
from
November 2, 2026 21:12
bdf8d9f to
dae42db
Compare
bprobert97
approved these changes
Nov 3, 2026
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.
Passing around descriptor instances is hard to type properly and gets really confusing.
I've changed
Invocationso thatactionis anActionInfoobject rather than anActionDescriptor, which should fix that problem.I've also changed
list_invocationsto use thing and action names, instead of objects.Closes #403
This MR contains the following
ActionInfoobject inInvocations, rather than weak references to aThingand anActionDescriptor.invoke_actionandlist_invocationsto match.Merge checklist:
Any changes to the public API have been updated indocs/src/public_api.rst.New or changed features have been added to (or updated in) the conceptual documentation.Any new or updated dependencies have been added to the project configuration (e.g.,pyproject.toml).Any decrease in test coverage has been justified.test-against-ofm-v3job passes, ortest-against-ofm-feature-branchpasses.New features have been used in a branch of the OpenFlexure Microscope, which is tested intest-against-ofm-feature-branch.This code has been tested manually against simulated hardware (detail tests in "Before merge").This code has been tested against real hardware (detail tests in "Before merge").