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

Consider tidying up/splitting up BlueskyContext #616

Open
callumforrester opened this issue Sep 5, 2024 · 2 comments
Open

Consider tidying up/splitting up BlueskyContext #616

callumforrester opened this issue Sep 5, 2024 · 2 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@callumforrester
Copy link
Collaborator

BlueskyContext has become a very large class and is arguably bloated. It also exposes a mix of public fields and methods which may be hard to work with. We should consider splitting it up and neatening up the API.

@DiamondJoseph
Copy link
Collaborator

We may also be able to use some new Pydantic 2 functionality: e.g. revisiting the behaviour of inject and our device reference handling.

https://docs.pydantic.dev/latest/concepts/types/#handling-third-party-types

Probably makes sense to invoke #526 while reconsidering the API

@DiamondJoseph
Copy link
Collaborator

notes:

Assuming that blueapi's API's purpose is to enable autogenerating forms for UI, something like #526, maybe even returning limits per device (#519), device priority (is this ever more complex than default value when one is provided?), Plan function axis plotting preference (special docstring fields?). Better exposure of subdevices?

Is plotting going to be restricted only to those plans that use a ScanSpec? If so, are existing plans going to be refactored to have a default scanspec for plotting?

If blueapi becomes exposed through the graph, then that API is graphql and some of the more optional parts become easier to handle by only returning if requested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants