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

dodal connect cannot selectively mock devices when device_factory has been configured to mock specific devices #925

Open
3 tasks
DiamondJoseph opened this issue Nov 26, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@DiamondJoseph
Copy link
Contributor

On p38 we have a selection of devices that we always want to be backed by simulated backends: optical components that are a clone of the setup on i22 so the output of the beamline can be representative of the output on i22.

When we use dodal connect, we can pass True or False for the --sim-backend argument- which then overrules what configuration has been set on the beamline module.

Acceptance Criteria

  • On p38 we can have devices that should be mocked by default
  • When dodal connect is called for p38 with no argument to --sim-backend, the devices that should be mocked by default are connected to mock backends, and other devices connect to real backends
  • There is exactly one documented way to achieve this behaviour
@DiamondJoseph DiamondJoseph added the bug Something isn't working label Nov 26, 2024
@DominicOram
Copy link
Contributor

On p38 we can have devices that should be mocked by default

I thought this was the point of being able to do @device_factory(mock=True)?

When dodal connect is called for p38 with no argument to --sim-backend, the devices that should be mocked by default are connected to mock backends, and other devices connect to real backends

I wouldn't be adverse to removing --sim-backend I don't see a strong use-case for it

@DiamondJoseph
Copy link
Contributor Author

Yep, those devices have device_factory(mock=True), but that value is never checked when using make_all_devices.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants