Repository navigation
refactor: Combine plans and plan_functions - #1743
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1743 +/- ##
=======================================
Coverage 96.46% 96.46%
=======================================
Files 49 49
Lines 3791 3791
=======================================
Hits 3657 3657
Misses 134 134 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
shree-iyengar-dls
marked this pull request as ready for review
November 5, 2026 17:57
tpoliaw
approved these changes
Nov 9, 2026
ZohebShaikh
pushed a commit
that referenced
this pull request
Nov 9, 2026
Fixes #180 Summary of changes: - `class Plan` in `blueapi/core/bluesky_types.py` is no longer a `BlueapiBaseModel` but is now a `dataclass` - `class Plan` contains `plan_function` which is of the type `PlanGenerator` - `class PlanModel` remains unchanged - the changes above mean we no longer have the duplicated `plan_functions` dictionary in `class BlueskyContext`
ZohebShaikh
pushed a commit
to ZohebShaikh/blueapi
that referenced
this pull request
Nov 11, 2026
This PR follows DiamondLightSource#1739. Devices in `BlueskyContext` are now wrapped in a `BlueapiDevice` dataclass. This is similar to DiamondLightSource#1743. Summary of changes: - `BlueskyContext.devices` was `dict[str, Device]` where Device represented bluesky protocols. Now `BlueskyContext.devices` is a `dict[str, BlueapiDevice]` - `DeviceModel` and the REST side are unchanged - `ctx.devices` is a dictionary of `BlueapiDevice` wrappers - `find_device` will look up the first part of the address (`stage` in `stage.x`) in `ctx.devices` and returns a `Device` - `find_component` is no longer a standalone function but has been moved to `BlueapiDevice`. This functions follows from `find_device`, e.g. finds the `x` on `stage` to give `stage.x` --------- Co-authored-by: Peter Holloway <peter.holloway@diamond.ac.uk>
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.
Fixes #180
Summary of changes:
class Planinblueapi/core/bluesky_types.pyis no longer aBlueapiBaseModelbut is now adataclassclass Plancontainsplan_functionwhich is of the typePlanGeneratorclass PlanModelremains unchangedplan_functionsdictionary inclass BlueskyContext