Skip to content
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

Separate user interaction logic of RE from task running logic #1654

Open
callumforrester opened this issue Jan 23, 2024 · 1 comment
Open
Labels
hackathon Good issues for the upcoming bluesky hackathon

Comments

@callumforrester
Copy link
Contributor

The RunEngine currently executes a plan through its __call__ dunder which handles user interaction logic (argument wrangling et al.) and task running logic (actually interpreting the plan and talking to hardware).

Possible Solution

Create a promoted, public version of RunEngine._run() which __call__ calls after wrangling the arguments. The public run() (assuming we use that name) kicks off a separate asyncio task and includes some facility for restricting vocabulary (messages the RE can interpret).

Context

Separating these two is useful for #1652 because it paves a path to the RE running two asyncio tasks simultaneously. The more machine-friendly interface will also be useful for headless bluesky applications such as queueserver.
The restricted vocabulary is useful for both of the above cases as it facilities ensuring that some plans are run in a headless mode by disallowing "wait for user input"-style messages.

@tacaswell
Copy link
Contributor

I think the public RE.run should be as plain of a async def as possible and leave managing it in a task or simply await'd to the caller.

@callumforrester callumforrester added hackathon Good issues for the upcoming bluesky hackathon good first issue labels Apr 8, 2024
@rtuck99 rtuck99 self-assigned this Apr 17, 2024
@rtuck99 rtuck99 removed their assignment Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hackathon Good issues for the upcoming bluesky hackathon
Projects
Status: Todo
Development

No branches or pull requests

3 participants