Ophyd async v0.19.3 - #64
Merged
Merged
Conversation
added 14 commits
July 7, 2026 15:26
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.
Migrate to ophyd-async 0.19.3
Bumps the
ophyd-asyncdependency bound from>=0.13.1,<=0.18to>0.18,<=0.19.3and adaptssecop-ophydto the new device/command/movable APIs introduced in that range.Command devices
SECoPCMDDevice(arg/resultSignals + aSignalXtrigger) with ophyd-async's nativeCommand/TriggerableCommanddevice backends.SECoPCommandBackend(SECoPSignal.py) and wires it intoDeviceFillervia acommand_backend_factory, so commands are filled throughcreate_commands_from_annotationsalongside signals and sub-devices.build_command_signature()(util.py) builds the call signature for a SECoP command from itsCommandTypedatatype: struct arguments are unraveled into keyword-only parameters, non-struct arguments become a single positional-or-keywordarg, and a trailingwait_for_idle: bool = Falseis always appended.stopis intentionally excluded from auto-generated command devices, sinceSECoPMoveableDevicealready implementsStoppable.stop()and a raw command device at the same name would silently shadow it.Movable devices
SECoPMoveableDeviceon top of the newStandardMovable[Any]/MovableLogic[Any], replacing the oldLocatable/Stoppableimplementation.SECoPMovableLogic, which treats a move as complete once the module's status leavesBUSYand enters theIDLErange (rather than waiting for readback == setpoint)._mock_class = DeviceMockonSECoPMoveableDevicesinceStandardMovable's defaultInstantMovableMockwould otherwise install its own mock put-callback ontarget, conflicting with this project'sSECoPBackendmock machinery.Enum handling
secop_enum_name_to_python()and dynamicStrictEnumclass generation (util.py) so SECoP enum member names (e.g."Low Energy","high-power") are consistently mapped to valid Python identifiers._dynamic_enum_class) and codegen'd device classes, reusing a concrete generatedStrictEnumsubclass from an annotatedCommand[[ArgT], ResT]signature when one is already available instead of building a duplicate.Other fixes
set_namecascade bug inSECoPDevices.pyso names propagate correctly to child signals/devices.GenNodeCode.pyand its template/tests — no longer needed with the new command device model.uv.lockfor the newophyd-asyncversion range.Testing
tests/test_Node.py,tests/test_commands.py, andtests/test_classgen.pyto cover the new command backend, movable logic, and enum generation behavior.