-
Notifications
You must be signed in to change notification settings - Fork 12
Add docs for where to put dodal logic #1250
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
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1250 +/- ##
==========================================
+ Coverage 97.98% 98.06% +0.07%
==========================================
Files 199 203 +4
Lines 7686 7788 +102
==========================================
+ Hits 7531 7637 +106
+ Misses 155 151 -4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
I think I should probably also include something about when composite devices. Perhaps: if a group of devices would only ever be used together, and never individually, then a composite device is suitable. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Furiously debate the wording
I will try and avoid this as much as possible, that being said...
We already have information like this at:
- https://diamondlightsource.github.io/dodal/main/how-to/create-device.html
- https://diamondlightsource.github.io/dodal/main/reference/device-standards.html#where-to-put-devices
Can we either make sure it's linked or, ideally put it all on the one page and avoid repetition.
1. It only affects one device, is simple, won't change often, and/or is useful for scientists to be able to run outside of any DAQ framework. In this situation, it should go into EPICS. For example, zeroing a motor. | ||
|
||
2. It only affects one device, is complicated, and may require frequent tweaking. This should go into dodal. For example, setting the undulator gap based on an energy input. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should: There is a missing category here. Where it is affects multiple devices but is not experiment specific. e.g. changing the energy for the DCM, whilst keeping the Undulator gap correct. We have done this in UndulatorDCM
but could have used a plan. The reasoning for a device was:
- It takes time and we have no way of running concurrent plans but we do for concurrent device sets
- It's low level and experiment/beamline agnostic
I think there is debate to be had here though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this category is my number 4, maybe I wasn't clear on the "multiple devices" part though.
I was going to include that you could make a composite device in this case too, but I know there are still some differing opinions there. To me, my above comment
Perhaps: if a group of devices would only ever be used together, and never individually, then a composite device is suitable.
covers most cases, and I agree with you that not being able to write parallel plans is another good reason to use a device composite.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I think put that in then. It's ok for docs to say "this is an option to think about in this case but it's very usecase dependant"
I think linking to the ophyd async docs covers a lot of what I had written, but hopefully the new flowchart helps. There is still a bit of repetition in the how to guide for creating a device, but I don't think it's too bad - it goes into more detail |
Fixes #617
Instructions to reviewer on how to test:
tox -e docs autobuild
and read the docs addedAfter writing this I noticed a very similar section in ophyd-async https://blueskyproject.io/ophyd-async/main/explanations/where-device-logic.html . This dodal page is more diamond specific, but I'm perhaps it's better to delete the overlap?
Checks for reviewer
dodal connect ${BEAMLINE}