Python client plan __repr__ doesn't take into account *args **kwargs
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 52/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- python
- Ambito
- developer-experience
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- Python
- Stelle
- 13
- Fork
- 14
- Merge medio
- 4g 14h
- PR unite (30g)
- 14
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di DiamondLightSource/blueapi
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
DiamondLightSource/blueapi#1626 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
DiamondLightSource/blueapi#1623 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Cannot Install SoftiocApertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
DiamondLightSource/blueapi#1605 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
DiamondLightSource/blueapi#1494 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
DiamondLightSource/blueapi#1716 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di DiamondLightSource/blueapi
Issue simili
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 85/100
WLAN-Pi/wlanpi-profiler#341 ·
I maintainer di solito rispondono entro 1 giorno
-
Memory leak: the shared `validation_aborted_error` keeps every traceback it is raised throughForse già presa @Fire162 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
graphql-python/graphql-core#287 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
roman-corgi/ctc-dip#160 ·
I maintainer di solito rispondono entro 1 giorno
-
type-bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
render_findings.py reads and writes in the host's default encoding, so findings.html breaks on a cp1252 Windows hostForse già presa @Aaqibhafeezkhan l’ha presa oggi. Apertabug good first issue mentored python size: XS up-for-grabs
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
dheerajjha/mcp-migrate#366 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno