DiamondLightSource/dodal

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

Open

#1.103 geöffnet am 11. März 2025

Auf GitHub ansehen
 (0 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Python (12 Forks)auto 404
good first issue

Repository-Metriken

Stars
 (4 Stars)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

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

Contributor Guide