-
Notifications
You must be signed in to change notification settings - Fork 160
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
Update report feature with new argument, add temp fix for ifcfg module #324
Conversation
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>
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>
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>
Signed-off-by: claireyywang <clairewang@openrobotics.org>
Signed-off-by: claireyywang <clairewang@openrobotics.org>
Signed-off-by: claireyywang <clairewang@openrobotics.org>
3b43cd5
to
6089ad0
Compare
Signed-off-by: claireyywang <clairewang@openrobotics.org>
…s2cli into claire/ros2doctor-report
Signed-off-by: claireyywang <clairewang@openrobotics.org>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks great! A few comments/nitpicks below
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>
Signed-off-by: claireyywang <clairewang@openrobotics.org>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
quick review
""" | ||
reports = [] | ||
for report_entry_pt in iter_entry_points('ros2doctor.report'): | ||
report_class = report_entry_pt.load()() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current try/except ValueError
block doesn't guard against buggy reports and checks. Also, the second ()
is calling __init__(self)
on the user's class, so it could raise too.
try:
report_class = report_entry_pt.load()()
report_category = report_class.category()
report = report_class.report()
except Exception:
# Checking `Exception` because buggy code could raise anything
# Maybe traceback.format_exc() would be something to output here too?
doctor_warn('Report class from %s failed to run.' % report_entry_pt.name)
Signed-off-by: claireyywang <clairewang@openrobotics.org>
Signed-off-by: claireyywang <clairewang@openrobotics.org>
Signed-off-by: claireyywang <clairewang@openrobotics.org>
Import error added in
network.py
as a temporary fix forifcfg
module. Will remove and update with build dependency once adeb
package is ready.This is an enhancement to
report
feature based on previous discussion #319 (comment)This PR adds
--report_failed
argument, which allows user to only print report of failed checks. Major changes happen informat.py
anddoctor.py
files.Report content is output from each check module and indexed by their module names in
generate_report()
. They are printed out by callingformat_print(modules, report)
. The function takes module names and print out their indexed report, with dynamically allocated space padding computed bycompute_padding
.