Skip to content

Consider enhancements/additions to device configuration  #341

@tangkong

Description

@tangkong

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions