-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
846 update i04 to use device_factory #986
base: 846_device_factory_support_for_ophyd_v1
Are you sure you want to change the base?
846 update i04 to use device_factory #986
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## 846_device_factory_support_for_ophyd_v1 #986 +/- ##
===========================================================================
+ Coverage 97.51% 97.55% +0.03%
===========================================================================
Files 148 148
Lines 6279 6299 +20
===========================================================================
+ Hits 6123 6145 +22
+ Misses 156 154 -2 ☔ View full report in Codecov by Sentry. |
) | ||
|
||
|
||
def flux(wait_for_connection: bool = True, fake_with_ophyd_sim: bool = False) -> Flux: | ||
@device_factory() | ||
def flux(mock: bool = False) -> Flux: | ||
"""Get the i04 flux device, instantiate it if it hasn't already been. | ||
If this is called when already instantiated in i04, it will return the existing object. | ||
""" | ||
return device_instantiation( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Must: The objective of device_factory
is to get rid of device_instantiation
, this factory should use the Flux
constructor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Flux is an ophyd v1 device and is not yet converted to ophyd_async. See previous PR where ophyd v1 support was added to device_factory
53a47cc
to
cc1b1a4
Compare
Part of a series of PRs that addresses #846
This PR builds on and depends on
Instructions to reviewer on how to test:
dodal connect i04
connects to all devicesChecks for reviewer
dodal connect ${BEAMLINE}