Add --all alias to commands that include hidden nodes, topics, or services

オープン
#1,302 コメント 2 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@Rajat-Arora がすでに取り組んでいます。

2026年9月25日 から。

  • #1318 @Rajat-Arora による — オープン

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
78/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python
領域
cli

調査の方向性

Start with the listed verb and command modules under ros2node, ros2lifecycle, ros2param, ros2topic, and ros2service, then inspect their add_arguments methods and existing option tests in each package's test/ folder. Add -a and --all while preserving each existing argparse destination, skip ros2lifecycle/verb/list.py, and verify parsing sets the existing include-hidden attribute for every affected command.

索引モデルが issue の本文から書いたものです。

説明

good first issue

Commands in ros2cli use different option names to include hidden entities. For example, ros2 node list and ros2 lifecycle nodes use -a / --all, ros2 node info uses --include-hidden, and other commands use --include-hidden-nodes, --include-hidden-topics, or --include-hidden-services.

Add --all (and -a) as an alias to the following files so users can pass --all consistently across commands:

  • ros2node/ros2node/verb/info.py
  • ros2lifecycle/ros2lifecycle/verb/get.py
  • ros2lifecycle/ros2lifecycle/verb/set.py
  • ros2param/ros2param/verb/delete.py
  • ros2param/ros2param/verb/describe.py
  • ros2param/ros2param/verb/dump.py
  • ros2param/ros2param/verb/get.py
  • ros2param/ros2param/verb/list.py
  • ros2param/ros2param/verb/load.py
  • ros2param/ros2param/verb/set.py
  • ros2topic/ros2topic/command/topic.py
  • ros2topic/ros2topic/verb/find.py
  • ros2topic/ros2topic/verb/list.py
  • ros2service/ros2service/command/service.py
  • ros2service/ros2service/verb/find.py
  • ros2service/ros2service/verb/list.py

(Note: Skip ros2lifecycle/ros2lifecycle/verb/list.py because it already uses -a / --all to display all transitions.)

Example: How to add the alias

Keep the existing long option first (so argparse keeps the same args.<attribute> destination name) and add '--all' and '-a':

# Before:
parser.add_argument(
    '--include-hidden-topics', action='store_true',
    help='Consider hidden topics as well')

# After:
parser.add_argument(
    '--include-hidden-topics', '--all', action='store_true',
    help='Consider hidden topics as well')
Example: How to add a test

You can test argument parsing in the package's test/ folder using argparse.ArgumentParser:

import argparse
from ros2topic.verb.list import ListVerb


def test_list_all_alias():
    parser = argparse.ArgumentParser()
    verb = ListVerb()
    verb.add_arguments(parser, 'ros2 topic list')
    args = parser.parse_args(['--all'])
    assert args.include_hidden_topics is True
主要言語
Python
スター
274
フォーク
246
平均マージ
1日 14時間
マージ済み PR(30日)
12

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ros2/ros2cli のほかの issue

ros2/ros2cli の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。