project8/dragonfly

Inconsistent use of save_reactivate

Opened this issue · 0 comments

I think we should be more uniform in our use of psyllid interface's save_reactivate method.

In psyllid_interface currently it is only called once:
https://github.com/project8/dragonfly/blob/develop/dragonfly/implementations/psyllid_provider.py#L330

Its placement is logical method - we expect to call the set_default_config method of roach_daq_run_interface:
https://github.com/project8/dragonfly/blob/develop/dragonfly/implementations/roach_daq_run_interface.py#L521
this in turn has to set a bunch of stuff and then we want the last set (at the end of set_time_window) to do the save_reactivate at the very end.

But none of psyllid interface's other methods call this, whereas most of roach_daq_run_interface's methods do. A more consistent placement would be a save_reactivate call at the end of set_default_config, and no internal calls to the method in psyllid_interface. We should also possibly add warnings to the headers of configure_trigger and configure_time_window in roach_daq_run_interface to indicate they don't complete the configuration by performing the save_reactivate because they are intended as intermediate methods.

Or I welcome other thoughts, @laroque and @cclaessens.

Motivation: this really surprised me today and took me a bit to track down.