Python client plan __repr__ doesn't take into account *args **kwargs
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 52/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- python
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- Python
- スター
- 13
- フォーク
- 14
- 平均マージ
- 4日 14時間
- マージ済み PR(30日)
- 14
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
DiamondLightSource/blueapi のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
DiamondLightSource/blueapi#1626 ·
メンテナーはふだん 1 日以内に返信
-
難易度 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 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
DiamondLightSource/blueapi#1716 ·
メンテナーはふだん 1 日以内に返信
DiamondLightSource/blueapi の issue をすべて見る
似ている issue
-
[Resource]: Loreオープンresource-submission validation-passed
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
hesreallyhim/awesome-claude-code#3234 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
openminion/openminion#376 ·
メンテナーはふだん 1 日以内に返信
-
Type: ☹︎ Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
posit-dev/great-tables#1028 ·
メンテナーはふだん 1 日以内に返信
-
integration: apple_tv
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
home-assistant/core#188282 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
A "since" range is worded as a career: "the past two seasons" says "regular season career (2025 on)"オープンP4: low
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
jeffknupp/association#538 ·