Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ros2doctor] Improve doctor_warn() #445

Merged
merged 7 commits into from
Feb 18, 2020
Merged

Conversation

claireyywang
Copy link
Contributor

@claireyywang claireyywang commented Jan 30, 2020

Updates in this PR:

  • Decouple doctor_warn() and Result() to improve error/warning trace-back
    before, warning always trace back to the format.py file
    /home/claire/ros2_ws/build/ros2doctor/ros2doctor/api/format.py: 76: 
    UserWarning: Distribution foxy is not fully supported or tested. 
    To get more consistent features, download a stable version at https://index.ros.org/doc/ros2/Installation/
    
    now, warning points to the exact file where things go wrong
    /home/claire/ros2_ws/build/ros2doctor/ros2doctor/api/platform.py:76:
    UserWarning: Distribution foxy is not fully supported or tested. 
    To get more consistent features, download a stable version at https://index.ros.org/doc/ros2/Installation/
    
  • Add doctor_error() in addition to doctor_warn(), to differentiate warning and error msgs.
  • Use f-string for all print statements
  • Shorten missing package names instead of printing them all out
    before
    /home/claire/ros2_ws/build/ros2doctor/ros2doctor/api/format.py: 76: 
    UserWarning: Cannot find required versions of packages: 
    rosbag2 rosbag2_compression zstd_vendor rviz_visual_testing_framework rviz2 rviz_default_plugins rviz_common ros2bag rosbag2_transport rosbag2_storage_default_plugins rosbag2_converter_default_plugins rosbag2_cpp rosbag2_storage yaml_cpp_vendor ros1_bridge interactive_markers common_interfaces visualization_msgs dummy_robot_bringup robot_state_publisher kdl_parser urdf turtlesim tracetools_launch topic_monitor tf2_tools geometry2 tf2_sensor_msgs tf2_kdl tf2_geometry_msgs tf2_eigen examples_tf2_py tf2_ros tf2_py tf2_msgs test_msgs sros2_cmake sros2 rqt_topic rqt_top rqt_srv rqt_shell rqt_service_caller rqt_reconfigure rqt_py_console rqt_publisher rqt_plot rqt_action rqt_msg rqt_console rqt rqt_py_common rqt_graph rqt_gui_py rqt_gui ros_testing ros2trace ros2topic ros2test ros2component ros2param ros2lifecycle ros2service ros2run ros2launch ros2pkg ros2node ros2multicast ros2interface ros2doctor ros2action ros2cli quality_of_service_demo_py quality_of_service_demo_cpp launch_testing_ros demo_nodes_cpp composition launch_ros examples_rclpy_minimal_subscriber examples_rclpy_minimal_service examples_rclpy_minimal_publisher examples_rclpy_minimal_client examples_rclpy_minimal_action_server
    
    now
    /home/claire/ros2_ws/build/ros2doctor/ros2doctor/api/package.py:118: 
    UserWarning: Cannot find required versions of packages: 
    rosbag2 rosbag2_compression zstd_vendor rviz_visual_testing_framework rviz2 [...] Use `ros2 doctor --report` to see full list.
    
  • Keep error/warning logic consistent everywhere.

claireyywang added 5 commits January 28, 2020 15:10
Signed-off-by: claireyywang <clairewang@openrobotics.org>
Signed-off-by: claireyywang <clairewang@openrobotics.org>
Signed-off-by: claireyywang <clairewang@openrobotics.org>
Signed-off-by: claireyywang <clairewang@openrobotics.org>
Signed-off-by: claireyywang <clairewang@openrobotics.org>
@claireyywang claireyywang added the in review Waiting for review (Kanban column) label Jan 30, 2020
@claireyywang claireyywang self-assigned this Jan 30, 2020
Copy link
Contributor

@sloretz sloretz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few comments; the rest LGTM

ros2doctor/ros2doctor/api/__init__.py Outdated Show resolved Hide resolved
ros2doctor/ros2doctor/api/format.py Outdated Show resolved Hide resolved
ros2doctor/ros2doctor/api/network.py Outdated Show resolved Hide resolved
ros2doctor/ros2doctor/api/package.py Show resolved Hide resolved
claireyywang added 2 commits February 3, 2020 17:13
Signed-off-by: claireyywang <clairewang@openrobotics.org>
Signed-off-by: claireyywang <clairewang@openrobotics.org>
@claireyywang
Copy link
Contributor Author

CI
Linux Build Status
Linux-aarch64 Build Status
OSX Build Status
Windows Build Status
Windows-Container Build Status

@claireyywang claireyywang merged commit a7541b9 into master Feb 18, 2020
@delete-merged-branch delete-merged-branch bot deleted the claire/update-ros2doctor branch February 18, 2020 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in review Waiting for review (Kanban column)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants