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

Consider enhancements/additions to device configuration #341

Open
tangkong opened this issue May 25, 2022 · 0 comments
Open

Consider enhancements/additions to device configuration #341

tangkong opened this issue May 25, 2022 · 0 comments

Comments

@tangkong
Copy link
Contributor

Ideas for improvement

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)

Current Behavior

With #337, we will support editing:

  • tab completion settings (whitelist, blacklist, replacing tablist)
  • Editing the kind of a device and its components

Possible Solution

Creating more subroutines, similar to update_whitelist, update_kind, etc.

Context

From discussion in #337

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant