From 8c41baa6384661b665e3c39d1210b477c6af52e3 Mon Sep 17 00:00:00 2001 From: bopeng-saitama Date: Mon, 23 Oct 2023 17:03:18 +0900 Subject: [PATCH 1/3] refactor: remove -d from ros2 caret command Signed-off-by: bopeng-saitama --- ros2caret/verb/check_ctf.py | 8 +++----- ros2caret/verb/node_summary.py | 6 ++---- ros2caret/verb/topic_summary.py | 4 ++-- ros2caret/verb/trace_point_summary.py | 4 ++-- 4 files changed, 9 insertions(+), 13 deletions(-) diff --git a/ros2caret/verb/check_ctf.py b/ros2caret/verb/check_ctf.py index eaf03bed..9a8030a8 100644 --- a/ros2caret/verb/check_ctf.py +++ b/ros2caret/verb/check_ctf.py @@ -23,13 +23,11 @@ class CheckCTFVerb(VerbExtension): - + def add_arguments(self, parser, cli_name): parser.add_argument( - '-d', '--trace_dir', dest='trace_dir', type=str, - help='the path to the trace directory to be checked', - required=True - ) + 'trace_dir', type=str, + help='the path to the trace directory to be checked') def main(self, *, args): try: diff --git a/ros2caret/verb/node_summary.py b/ros2caret/verb/node_summary.py index bac5dea7..61a4e273 100644 --- a/ros2caret/verb/node_summary.py +++ b/ros2caret/verb/node_summary.py @@ -20,11 +20,9 @@ class NodeSummaryVerb(VerbExtension): def add_arguments(self, parser, cli_name): - # NOTE: It looks good to remove '-d', '--trace_dir', - # since the argument is required. parser.add_argument( - '-d', '--trace_dir', dest='trace_dir', type=str, - help='the path to the trace directory', required=True + 'trace_dir', type=str, + help='the path to the trace directory' ) parser.add_argument( '--duration_filter', dest='d_filter_args', diff --git a/ros2caret/verb/topic_summary.py b/ros2caret/verb/topic_summary.py index 84cb2faf..db169ef7 100644 --- a/ros2caret/verb/topic_summary.py +++ b/ros2caret/verb/topic_summary.py @@ -21,8 +21,8 @@ class TopicSummaryVerb(VerbExtension): def add_arguments(self, parser, cli_name): parser.add_argument( - '-d', '--trace_dir', dest='trace_dir', type=str, - help='the path to the trace directory', required=True + 'trace_dir', type=str, + help='the path to the trace directory' ) parser.add_argument( '--duration_filter', dest='d_filter_args', diff --git a/ros2caret/verb/trace_point_summary.py b/ros2caret/verb/trace_point_summary.py index 05778650..46540d02 100644 --- a/ros2caret/verb/trace_point_summary.py +++ b/ros2caret/verb/trace_point_summary.py @@ -21,8 +21,8 @@ class TracePointSummaryVerb(VerbExtension): def add_arguments(self, parser, cli_name): parser.add_argument( - '-d', '--trace_dir', dest='trace_dir', type=str, - help='the path to the trace directory', required=True + 'trace_dir', type=str, + help='the path to the trace directory' ) parser.add_argument( '--duration_filter', dest='d_filter_args', From e33b93ec917e1898ec166328b1435553c1ea80eb Mon Sep 17 00:00:00 2001 From: bopeng-saitama Date: Mon, 23 Oct 2023 17:17:32 +0900 Subject: [PATCH 2/3] fix: flake8 error Signed-off-by: bopeng-saitama --- ros2caret/verb/check_ctf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ros2caret/verb/check_ctf.py b/ros2caret/verb/check_ctf.py index 9a8030a8..f65a5bbf 100644 --- a/ros2caret/verb/check_ctf.py +++ b/ros2caret/verb/check_ctf.py @@ -23,7 +23,7 @@ class CheckCTFVerb(VerbExtension): - + def add_arguments(self, parser, cli_name): parser.add_argument( 'trace_dir', type=str, From bf20e5e38d263b52ab91e37ce5dbe736d68f9506 Mon Sep 17 00:00:00 2001 From: bopeng-saitama Date: Thu, 26 Oct 2023 10:50:32 +0900 Subject: [PATCH 3/3] refactor: remove -w for ros2 caret command Signed-off-by: bopeng-saitama --- ros2caret/verb/check_caret_rclcpp.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ros2caret/verb/check_caret_rclcpp.py b/ros2caret/verb/check_caret_rclcpp.py index bde25cc4..7a5025c7 100644 --- a/ros2caret/verb/check_caret_rclcpp.py +++ b/ros2caret/verb/check_caret_rclcpp.py @@ -41,8 +41,9 @@ class CheckCaretRclcppVerb(VerbExtension): def add_arguments(self, parser, cli_name): parser.add_argument( - '-w', '--workspace', dest='workspace', type=str, - help='the path to the workspace to be checked', required=True) + 'workspace', type=str, + help='the path to the workspace to be checked' + ) def main(self, *, args): root_dir_path = args.workspace + '/build/'