-
Notifications
You must be signed in to change notification settings - Fork 0
Plan wrapper functions to allow for easier cleanup of DAE setup changes #267
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
This is not currently achieved. |
Tom-Willemsen
left a comment
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.
Quick non-functional review - please ask if any of my comments don't make sense. Will do a more thorough functional review when these initial API comments have been addressed.
doc/plan_stubs/plan_wrappers.md
Outdated
| ['dae_table_wrapper](ibex_bluesky_core.plan_stubs.dae_table_wrapper) | ||
| ['num_periods_wrapper](ibex_bluesky_core.plan_stubs.num_periods_wrapper) | ||
| ['time_channels_wrapper](ibex_bluesky_core.plan_stubs.time_channels_wrapper) |
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.
just as an fyi, using the py:obj syntax renders slightly nicer. I also think it would be good to give a short description of that each one does here, rather than just dumping them as an unformatted list.
tests/devices/test_dae.py
Outdated
| RE( | ||
| with_num_periods( | ||
| _dummy_plan_which_sets_periods(dae), | ||
| dae=dae, # type: ignore |
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.
Why does this fail type-checking?
tests/devices/test_dae.py
Outdated
| result = await dae.number_of_periods.read() | ||
| assert result["DAE-number_of_periods-signal"]["value"] == original_settings |
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 .get_value() may be cleaner here.
…wrapper # Conflicts: # tests/test_plan_stubs.py
Description of work
Three wrapper functions have been written to simplie DAE clean up:
with_num_periods(n)
with_time_channels(tcbs)
with_dae_tables(wiring, spectra, detector)
testing and documentation has also been updated for the functions.
Ticket
Link to Ticket
Acceptance criteria