Python client plan __repr__ doesn't take into account *args **kwargs
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ó
- 4/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 52/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- python
- Lĩnh vực
- developer-experience
Hướng nghiên cứu
The issue identifies the Python client plan cache __repr__ and the schema as the areas to investigate; it does not name files or tests. Start by tracing how the schema supplies plan parameter information to the client representation. Done means the representation shows *args, **kwargs, tuple parameters, and their required types correctly, as in the acceptance criterion.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
When using the python client, is it extremely useful for a user to understand what parameters a plan takes. They can remind them selves by simply typing the plan name and the __repr__ will display a string representation of the plan parameters.
The current schema doesn't have enough information for the client to correctly rebuild the required plan arguments to inform a user what a plan parameters expect to take. Currently blueapi would provide the user the below:
>>> bc.plans.step_grid_scan
step_grid_scan(
detectors: list[Readable | AsyncReadable],
trajectory: list[Any],
extra_trajectories: list[list[Any]] | None = None,
snake_axes: bool = True,
metadata: dict | None = None
)
However, this should look like this instead:
>>> pl.step_grid_scan
step_grid_scan(
detectors: Sequence[Readable | AsyncReadable],
trajectory: tuple[Movable[float], float, float, float],
*extra_trajectories: tuple[Movable[float], float, float, float],
snake_axes: bool = True,
metadata: dict[str, Any] | None = None
)
As you can see, the current implementation doesn't show the user what parameters are * and **. It also doesn't handle tuples or able to resolve the required types inside the tuple.
I got this working with a proof of concept here https://github.com/DiamondLightSource/blueapi/pull/1663 but is too stale and too hard to rebase as it was based on original *args **kwargs implementation with V1 and V2 task and parameters. It adds additional information to assist the schema, though it should probably enhance the schema.
Acceptance Criteria
- Client plan cache
__repr__displays to a user the correct parameters a plan should take
- Ngôn ngữ chính
- Python
- Star
- 13
- Fork
- 14
- Merge trung bình
- 4 ngày 14 giờ
- Pull request đã merge (30 ngày)
- 14
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
-
Độ 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
-
Độ 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
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
DiamondLightSource/blueapi#1716 ·
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ự
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
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 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
sergey-miryanov/gcmon#230 ·
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 78/100
Azure-Samples/azure-search-openai-demo#3249 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG] Failed archive extraction deletes the dataset cacheCó thể đã có người làm @dajiaohuang đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
alibaba/GraphScope#4674 ·