Blueapi doesn't support ophyd-async DeviceVector
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
从 BlueapiClient 的 devices 接口开始,使用提供的 i09 mock 配置和 dodal 中的 DeviceVector 示例重现问题。检查 devs.test 和带索引的子设备是如何表示的,然后验证能否通过 BlueapiClient 使用数值索引访问 DeviceVector 的子设备。完成的标准是:验收示例不再返回设备名称中的一个字符,并且按索引访问会返回子设备。
由索引模型根据 Issue 内容生成。
描述
Steps to replicate the issue:
Pin dodal inside blueapi to this branch:
"dls-dodal@git+https://github.com/DiamondLightSource/dodal.git@device_vector_example". It adds a test DeviceVector device to i09.
Then run blueapi with i09 beamline in mock mode. Configuration used was:
api:
url: http://0.0.0.0:8000
env:
metadata:
instrument: adsim
sources:
- kind: deviceManager
module: dodal.beamlines.i09
mock: True
- kind: planFunctions
module: dodal.plans
- kind: planFunctions
module: dodal.plan_stubs.wrapped
stomp:
enabled: true
url: tcp://localhost:61613/
numtracker:
url: http://localhost:8406/graphql
Start blueapi server:
uv run blueapi -c /path/to/file.yaml serve
Then in another terminal
>>> from blueapi.client import BlueapiClient
>>> bc = BlueapiClient.from_config_file("/path/to/file.yaml")
>>> bc.instrument_session = "12345"
>>> plans = bc.plans
>>> devs = bc.devices
>>> devs.test
Device(test)
>>> devs.test[1]
'e'
>>> devs.test[2]
's'
The above treats the client object as a str so an index just gets the index of the name. DeviceVector is used when many child devices are required, e.g 30 channels for a device and are accessed by the associated index. It is a pain to statically type this and is much easier to have it be configured instead. For example in normal python you can do the following:
>>> from ophyd_async.core import soft_signal_rw
>>> from ophyd_async.core import DeviceVector
>>> dv = DeviceVector({1: soft_signal_rw(int), 2: soft_signal_rw(int)})
>>> dv[1]
<ophyd_async.core._signal.SignalRW object at 0x7efe71059590>
>>> dv[2]
<ophyd_async.core._signal.SignalRW object at 0x7efe71059e10>
There are also plans for a DeviceMap to be added to ophyd-async too https://github.com/bluesky/ophyd-async/issues/1252.
DeviceVector and DeviceMap should probably be supported in BlueapiClient.
Acceptance Criteria
- Can access DeviceVector children from BlueapiClient
- 主要语言
- Python
- 星标
- 13
- 派生
- 14
- 平均合并
- 1 天 18 小时
- 30 天内合并 PR
- 17
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
DiamondLightSource/blueapi 的其他 Issue
-
kwargs: {} gets added to plan **kwargs可能已有人在做 @oliwenmandiamond 于 7 天前认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 78/100
DiamondLightSource/blueapi#1719 · 已指派 1 人 ·
维护者通常 1 天内回复
-
deployment
难度 2/5 1-3 小时 新手友好度 72/100
DiamondLightSource/blueapi#1626 ·
维护者通常 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 天内回复
查看 DiamondLightSource/blueapi 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 62/100
huggingface/smolagents#3106 ·
维护者通常 2 天内回复
-
area:scripts area:tests bug priority:later
难度 2/5 1-3 小时 新手友好度 72/100
Ikalus1988/MisakaNet#4358 ·
维护者通常 1 天内回复
-
Discovered ports from service discovery are never propagated to modules in Module.load()可能已有人在做 @vishalmore90 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 70/100
OWASP/Nettacker#1828 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 88/100
aws-samples/sample-per-model-bedrock#708 ·
维护者通常 1 天内回复
-
maintenance
难度 2/5 1-3 小时 新手友好度 62/100