Python client plan __repr__ doesn't take into account *args **kwargs
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 52/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- python
- Área
- developer-experience
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- Python
- Estrellas
- 13
- Forks
- 14
- Merge medio
- 4 d 14 h
- PR fusionados (30 d)
- 14
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de DiamondLightSource/blueapi
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
DiamondLightSource/blueapi#1626 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
DiamondLightSource/blueapi#1623 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Cannot Install SoftiocAbiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
DiamondLightSource/blueapi#1605 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
DiamondLightSource/blueapi#1494 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
DiamondLightSource/blueapi#1716 ·
Los mantenedores suelen responder en 1 día
Todos los issues de DiamondLightSource/blueapi
Issues similares
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 85/100
WLAN-Pi/wlanpi-profiler#341 ·
Los mantenedores suelen responder en 1 día
-
Memory leak: the shared `validation_aborted_error` keeps every traceback it is raised throughPosiblemente ocupada @Fire162 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
graphql-python/graphql-core#287 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
roman-corgi/ctc-dip#160 ·
Los mantenedores suelen responder en 1 día
-
type-bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
render_findings.py reads and writes in the host's default encoding, so findings.html breaks on a cp1252 Windows hostPosiblemente ocupada @Aaqibhafeezkhan la tomó hoy. Abiertobug good first issue mentored python size: XS up-for-grabs
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
dheerajjha/mcp-migrate#366 · 1 comentario ·
Los mantenedores suelen responder en 1 día