Blueapi doesn't support ophyd-async DeviceVector
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 68/100
Hướng nghiên cứu
Bắt đầu từ interface devices của BlueapiClient và tái hiện vấn đề bằng cấu hình mock i09 được cung cấp cùng ví dụ DeviceVector từ dodal. Kiểm tra cách devs.test và các device con được đánh chỉ mục được biểu diễn, sau đó xác minh rằng có thể truy cập device con của DeviceVector bằng chỉ mục số thông qua BlueapiClient. Hoàn thành khi ví dụ chấp nhận không còn trả về một ký tự từ tên device và việc truy cập theo chỉ mục trả về device con.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- Python
- Star
- 13
- Fork
- 14
- Merge trung bình
- 1 ngày 18 giờ
- Pull request đã merge (30 ngày)
- 17
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của DiamondLightSource/blueapi
-
kwargs: {} gets added to plan **kwargsCó thể đã có người làm @oliwenmandiamond đã nhận 7 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
DiamondLightSource/blueapi#1719 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
deployment
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
DiamondLightSource/blueapi#1626 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
deployment dev-environment
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
DiamondLightSource/blueapi#1623 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Cannot Install SoftiocĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
DiamondLightSource/blueapi#1605 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
DiamondLightSource/blueapi#1494 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của DiamondLightSource/blueapi
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
elviskahoro/sdk-python-attio#144 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
RenyiELBO raises TypeError when model has no sample sitesCó thể đã có người làm @alibb007 đã nhận hôm nay. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: Four evaluation scripts unpack init_memmachine_params's five return values into three namesĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
MemMachine/MemMachine#1911 ·
Maintainer thường phản hồi trong vòng 3 ngày