Skip to content

Allow configuration of plan imports to perform automatic wrapping with selected pre-processors #474

Closed as not planned

Description

@DiamondJoseph

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).

Activity

  1. callumforrester commented on May 20, 2024

    @callumforrester
    Contributor

    Another thought, can also use the scanID hook on the run engine

  2. stan-dot commented on Sep 9, 2024

    @stan-dot
    Contributor

    @DiamondJoseph what is the difference between proxied and non-proxied versions of plans?

    Also the issue name is quite nebulous

  3. added
    c: worker
    on Sep 9, 2024
  4. DiamondJoseph commented on Sep 9, 2024

    @DiamondJoseph
    ContributorAuthor

    @stan-dot I meant

    import bluesky.plan_stubs as bps
    
    @diamond_specific_decorator(s)
    def func(*args, **kwargs) -> MsgGenerator:  # Diamond specific annotations
        return bps.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.

  5. stan-dot commented on Sep 9, 2024

    @stan-dot
    Contributor

    do we have many of those DLS specific decorators?

  6. DiamondJoseph commented on Sep 9, 2024

    @DiamondJoseph
    ContributorAuthor
  7. DiamondJoseph commented on Aug 28, 2025

    @DiamondJoseph
    ContributorAuthor

    When all instruments are migrated to NumTracker, this will become not required for the wrapped plans in dodal.

  8. abbiemery commented on Feb 25, 2026

    @abbiemery
    Contributor

    This is no longer required for data writing. Adding pre-processors via config can be revisited when it becomes an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    c: worker

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions