You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow configuration of plan imports to perform automatic wrapping with selected pre-processors #474
e.g. wrapping all built-in bluesky plans with @attach_metadata, to ensure that DirectoryProvider is updated and queried without requiring proxied versions of those plans (once those plans have type annotations).
importbluesky.plan_stubsasbps@diamond_specific_decorator(s)deffunc(*args, **kwargs) ->MsgGenerator: # Diamond specific annotationsreturnbps.func(*args, **kwargs)
So we have a proxy version of func that meets our requirements but is just calling into the non-proxied version.
The ticket supposes that we have a module that we want to import all plan funcs from (e.g. bluesky.plan_stubs) but we want all of our Diamond specific handling to be done, e.g. annotations, decorators.
Activity
callumforrester commentedon May 20, 2024
Another thought, can also use the scanID hook on the run engine
stan-dot commentedon Sep 9, 2024
@DiamondJoseph what is the difference between proxied and non-proxied versions of plans?
Also the issue name is quite nebulous
DiamondJoseph commentedon Sep 9, 2024
@stan-dot I meant
So we have a proxy version of
functhat meets our requirements but is just calling into the non-proxied version.The ticket supposes that we have a module that we want to import all plan funcs from (e.g.
bluesky.plan_stubs) but we want all of our Diamond specific handling to be done, e.g. annotations, decorators.stan-dot commentedon Sep 9, 2024
do we have many of those DLS specific decorators?
DiamondJoseph commentedon Sep 9, 2024
We have one that is absolutely required for data writing
https://github.com/DiamondLightSource/dodal/blob/e8f8b62363e83028d10ac071b557f2d7848c6327/src/dodal/plans/data_session_metadata.py#L12
And will probably have another for ensuring devices are connected?
DiamondJoseph commentedon Aug 28, 2025
When all instruments are migrated to NumTracker, this will become not required for the wrapped plans in dodal.
abbiemery commentedon Feb 25, 2026
This is no longer required for data writing. Adding pre-processors via config can be revisited when it becomes an issue.