Python docstring for message documentation
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 45/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- python
- 領域
- documentation, tooling
調査の方向性
statistics_msgs/msg/MetricsMessage.msg のソースコメントと、issue に示されている生成済みの statistics_msgs.msg._metrics_message クラスを比較します。まず、このクラスを生成する rosidl の Python 生成パスを特定し、次に既存の生成テストを確認します。ソースのメッセージおよびフィールドのドキュメントが対応する Python docstrings に現れ、テストでカバーされていれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- EmberScript
- スター
- 26
- フォーク
- 68
- 平均マージ
- 1日 9時間
- マージ済み PR(30日)
- 3
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ros2/rosidl_python のほかの issue
-
Eliminate array resetting loop in _msg_support.c.em対応中かも @Lidang-Jiang が 167 日前に担当しました。 オープンenhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
ros2/rosidl_python#255 · リアクション 1 件 ·
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 56/100
ros2/rosidl_python#264 · コメント 2 件 ·
-
Message named pkg/Duration with field builtin_interfaces/Duration is invalid対応中かも @Lidang-Jiang が 166 日前に担当しました。 オープンbug
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
ros2/rosidl_python#257 · コメント 8 件 ·
-
enhancement
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
ros2/rosidl_python#242 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 32/100
ros2/rosidl_python#219 · コメント 2 件 ·
ros2/rosidl_python の issue をすべて見る
似ている issue
-
FrameworkBundle SecurityBundle
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
symfony/symfony-docs#23277 ·
メンテナーはふだん 3 日以内に返信
-
[Sync EN] hard link does not need special permissions対応中かも @lacatoire が今日担当しました。 オープンsync-en
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
メンテナーはふだん 1 日以内に返信
-
sync-en
難易度 1/5 1時間未満 初心者へのやさしさ 76/100
メンテナーはふだん 4 日以内に返信
-
bot-triaged module: docs triaged
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
external integration integration-submission
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
langchain-ai/docs#6614 ·
メンテナーはふだん 1 日以内に返信