-
Notifications
You must be signed in to change notification settings - Fork 143
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
Add tmt about
, command showing things about tmt itself
#3470
base: hints-everywhere
Are you sure you want to change the base?
Conversation
This sounds like a very nice idea! Are there any limitations about the usage? I tried the new command within the venv but I get no output. |
The current limitation is, it's just listing plugins, nothing more. I hope to get it to share more info, maybe render plugin docs, specs docs, or explanation of various errors, just like
|
00f445b
to
c579ec7
Compare
I wanted to change a couple of things about "hints" tmt shows to users when when a package is missing and functionality is limited: * Static, stored in a single function. That made them detached from their origin, and 3rd party plugins would have no chance to add their own hints. * A bit confined text of hints did not cover all possible venues. PyPI installation was ignored by some, other hints spoke just about using `pip install`. * Hints are interesting and useful, but visible only when error strikes. The patch turns the function into a "registry", a simple dictionary storing them. Plugins and tmt code in general can "register" their hints, and a nice tools are available for showing them. Hints wow have IDs, and there are dedicated IDs for step-specific (``report``, ...) and plugin-specific (``report/foo``) hints, allowing tmt core to print them when step or plugins crashes on import. Plugin-specific hints are now rendered both in their CLI and HTML documentation. In the future, I would like to provide hints not just as "a package foo is missing, install it" guide, but also explaining various errors and issues tmt would report, e.g. pairing them with exceptions, "To learn more, run `tmt about E1234`".
c579ec7
to
34de1cb
Compare
34de1cb
to
d83731e
Compare
d83731e
to
d55f9e5
Compare
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.
Unfortunately does not work well for me:
-
tmt about
shows nothing, let's print maybe the help? -
tracebacks with plaing
tmt about plugins ls
$ tmt about plugins ls
Unhandled ReST node '<title_reference>dict</title_reference>'. (shell returned 2)
a010e3b
to
176d9dd
Compare
Pull Request Checklist