Python docstring for message documentation
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- python
- Área
- documentation, tooling
Línea de trabajo
Compara los comentarios del código fuente en statistics_msgs/msg/MetricsMessage.msg con la clase generada statistics_msgs.msg._metrics_message que se muestra en el issue. Empieza por localizar la ruta de generación de Python de rosidl que produce esta clase y, después, identifica las pruebas de generación existentes. Se considera terminado cuando la documentación del mensaje y de sus campos del código fuente aparece en los docstrings de Python correspondientes y está cubierta por pruebas.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Enhancement Request
Required Info:
- Operating System:
- Ubuntu 20.04
- Installation type:
- Source
- Version or commit hash:
- git branch: Humble
- DDS implementation:
- N/A
- Client library (if applicable):
- rclpy
Steps to reproduce issue
When looking at a message class documentation in Python, the message comments don't really show making it more complicated to understand the message.
For example take the statistics_msgs/MetricsMessage, the source file has lots of good documentation for the message itself as well as for each of the fields contained in the message.
When looking at the python documentation for the message, we see:
Help on class MetricsMessage in module statistics_msgs.msg._metrics_message:
class MetricsMessage(builtins.object)
| MetricsMessage(**kwargs)
|
| Message class 'MetricsMessage'.
|
| Methods defined here:
|
| __eq__(self, other)
| Return self==value.
|
| __init__(self, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __repr__(self)
| Return repr(self).
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| get_fields_and_field_types() from statistics_msgs.msg._metrics_message.Metaclass_MetricsMessage
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| measurement_source_name
| Message field 'measurement_source_name'.
|
| metrics_source
| Message field 'metrics_source'.
|
| statistics
| Message field 'statistics'.
|
| unit
| Message field 'unit'.
|
| window_start
| Message field 'window_start'.
|
| window_stop
| Message field 'window_stop'.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| SLOT_TYPES = (<rosidl_parser.definition.UnboundedString object>, <rosi...
|
| __hash__ = None
All of this without any of the message creator help data.
Expected behavior
Instead, we could build in the documentation comments from the original message documentation into the python class docstring making it better for developers to access the documentation.
A potential outcome for this message type:
Help on class MetricsMessage in module statistics_msgs.msg._metrics_message:
class MetricsMessage(builtins.object)
| MetricsMessage(**kwargs)
|
| Message class 'MetricsMessage'.
|
| A generic metrics message providing statistics for measurements from different sources. For example,
|
| measure a system's CPU % for a given window yields the following data points over a window of time:
| - average cpu %
| - std deviation
| - min
| - max
| - sample count
|
| These are all represented as different 'StatisticDataPoint's.
|
| Fields:
| measurement_source_name (string): Name metric measurement source, e.g., node, topic, or process name
| metrics_source (string): Name of the metric being measured, e.g. cpu_percentage, free_memory_mb, message_age, etc.
| unit (string): Unit of measure of the metric, e.g. percent, mb, seconds, etc.
| window_start (builtin_interfaces/Time): Measurement window start time
| window_stop (builtin_interfaces/Time): Measurement window end time
| statistics (sequence<statistics_msgs/StatisticDataPoint>): A list of statistics data point, defined in StatisticDataPoint.msg
|
| Methods defined here:
|
| __eq__(self, other)
| Return self==value.
|
| __init__(self, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __repr__(self)
| Return repr(self).
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| get_fields_and_field_types() from statistics_msgs.msg._metrics_message.Metaclass_MetricsMessage
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
<..snip..>
Feature request
Feature description
Transfer message file documentation into python docstrings for the corresponding message.
- Lenguaje dominante
- EmberScript
- Estrellas
- 26
- Forks
- 68
- Merge medio
- 1 d 9 h
- PR fusionados (30 d)
- 3
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin 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 ros2/rosidl_python
-
Eliminate array resetting loop in _msg_support.c.emPosiblemente ocupada @Lidang-Jiang la tomó hace 166 días. Abiertoenhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
ros2/rosidl_python#255 · 1 reacción ·
-
bug
Dificultad 3/5 1-2 días Aptitud para principiantes 56/100
ros2/rosidl_python#264 · 2 comentarios ·
-
Message named pkg/Duration with field builtin_interfaces/Duration is invalidPosiblemente ocupada @Lidang-Jiang la tomó hace 166 días. Abiertobug
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
ros2/rosidl_python#257 · 8 comentarios ·
-
enhancement
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
ros2/rosidl_python#242 ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 32/100
ros2/rosidl_python#219 · 2 comentarios ·
Todos los issues de ros2/rosidl_python
Issues similares
-
triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Portkey-AI/gateway#1844 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
XRPLF/xrpl-dev-portal#4000 ·
Los mantenedores suelen responder en 1 día
-
docs: clarify replacement for outdated Terms of Service URL in readme.mdPosiblemente ocupada @mohitjoshi-hey la tomó hoy. Abierto
Dificultad 1/5 1-3 horas Aptitud para principiantes 66/100
-
documentation good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
good first issue hacktoberfest pipeline
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
TanbirRamim/open-source-radar#111 ·
Los mantenedores suelen responder en 1 día