pcdshub / pcdshub/hutch-python

Consider enhancements/additions to device configuration

Open
#341 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1
Forks
18
Avg merge
7d 9h
Merged PRs (30d)
1

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the obj_config PR and the discussion in issue #337 to understand the existing configuration behavior. Compare the proposed inheritance, attribute-setting, and configurable-entrypoint ideas, then define a focused scope and acceptance criteria before implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.