BlueapiClient devices do not know about child devices until after user uses them
メンテナーはふだん 1 日以内に返信
@ZohebShaikh がすでに取り組んでいます。
2026年10月8日 から。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 45/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- python
- 領域
- api, cli, developer-experience
調査の方向性
issue に記載されている BlueapiClient のデバイス読み込みおよびキャッシュのパスから始め、次に DeviceManager がデバイスと子デバイスをどのように提供するかを追跡します。対象範囲にデバイスツリー、または repr と予約済み属性が含まれるかを明確にします。読み込み直後に、事前の検索なしで子デバイスをオートコンプリートに利用できる状態を Done とします。
索引モデルが issue の本文から書いたものです。
説明
BlueapiClient asks blueapi server for all available devices and then caches them. This makes it so autocomplete now works on the terminal making it very handy when composing plans on command line. However, blueapi cannot handle child devices.
Very often, a device will hold a group of other devices / signals and need to be accessed to run plans. For example Motor stages will have x, y, z motor components. pgm devices have child signals/motors for energy.
So a very basic example would be
plans.set_absolute(pgm.energy, 500)
plans.set_absolute(stage.x, 10)
plans.set_absolute(stage.y, 20)
BlueapiClient has no idea these child devices of energy, x, and y exist so the user has to guess what is available.
How it works is if it doesn't exist from the cache, the device is requested from the server and then if it exists, it is then added to cache and then autocomplete now works. However, when loading devices, BlueapiClient should be aware of all devices on the server, including all child devices of a Device, so that automcomplete will work straight away rather than guessing first for all devices.
This is related to https://github.com/DiamondLightSource/dodal/issues/2208 because DeviceManager only provides the higher level devices to blueapi and not the device children so it has no concept of the child devices unless asked explicitly to check for it.
This would vastly improve the user experience using the client if you could print the device tree or the device __repr__ to show it (similiar to a plan __repr__ displays the plan signature) to know what is available to work with and that auto complete for child devices works from the start.
As we are going to have name clashes with device attributes and what blueapi needs, we should probably reserve in dodal device attributes so that they never have a model signal / sub device. Similar to how ophyd-async reserves bluesky key words. This could be done inside DeviceManager. When it loads in a device, it checks there are no signals / child devices with model as an attribute.
- 主要言語
- Python
- スター
- 14
- フォーク
- 14
- 平均マージ
- 2日 23時間
- マージ済み PR(30日)
- 27
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
DiamondLightSource/blueapi のほかの issue
-
support: low
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
DiamondLightSource/blueapi#1772 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
deployment dev-environment
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
DiamondLightSource/blueapi#1623 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
DiamondLightSource/blueapi#1605 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
DiamondLightSource/blueapi#1494 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
DiamondLightSource/blueapi#1788 ·
メンテナーはふだん 1 日以内に返信
DiamondLightSource/blueapi の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
UKGovernmentBEIS/inspect_ai#6733 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
ProyectoRespira/respira-webapp#334 ·
メンテナーはふだん 1 日以内に返信
-
bug security-alert
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
spectrayan/carefold#391 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
Jakeschincariol/instagram-agent-skill#83 ·
メンテナーはふだん 10 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 64/100