You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The recent obj_config PR introduced a path for configuring objects after instantiation. In discussions, we proposed adding:
Inheritance-level configuration (change something on all devices and its subclasses)?
We were leaning toward not implementing this, as it might be too confusing for users
Setting attributes
Applying configuration settings that are simple setattrs is simple enough, just class.my_setting = 3 or something similar.
An API that signals a class/instance setting can be configurable via the obj_config.yml file
One thought: we could support something like that with explicit entrypoint loading or duck-typed methods- hutch-python could see that an object or class has an unknown definition in the config file and check the class for how to handle it. This would probably work reasonably well. I think this second one is what you're suggesting a few comments above? (credit zllentz)
Another thought: A BaseInterface property that does something like device.conf_yml_data = settings? A method set_conf_yml_data (named differently or made semi-private)? (credit klauer)
Ideas for improvement
The recent
obj_config
PR introduced a path for configuring objects after instantiation. In discussions, we proposed adding:class.my_setting = 3
or something similar.Current Behavior
With #337, we will support editing:
Possible Solution
Creating more subroutines, similar to
update_whitelist
,update_kind
, etc.Context
From discussion in #337
The text was updated successfully, but these errors were encountered: