DiamondLightSource/dodal

Create preprocessor helper function to insert a plan before 'open_run' and after 'close_run' messages

Open

#1.103 aberto em 11 de mar. de 2025

Ver no GitHub
 (0 comments) (0 reactions) (0 assignees)Python (12 forks)auto 404
good first issue

Métricas do repositório

Stars
 (4 stars)
Métricas de merge de PR
 (Métricas PR pendentes)

Description

As of https://github.com/DiamondLightSource/dodal/pull/1099 and https://github.com/DiamondLightSource/mx-bluesky/pull/872, we have made bluesky preprocessors which insert plans before an 'open_run', and after a 'close_run' message is seen in the RunEngine. Both of these preprocessors follow a similar pattern, and in the future more of these are likely to be created. We should create a helper function which looks something like def do_on_run(on_run_open, on_run_close = None, run_key=None) to save duplicating the logic for this part. We should also discuss with Bluesky developers as to whether this would be a useful thing to put in Bluesky instead

Acceptance Criteria

  • Discussion with Bluesky to see if this is a feature they want
  • A function which looks like def do_on_run(on_run_open, on_run_close = None, run_key=None) is added to Bluesky or dodal, depending on the above
  • The undulator preprocessor (in dodal) and the xbpm preprocessor (in mx-bluesky) are updated to use this helper function

Guia do colaborador