-
Notifications
You must be signed in to change notification settings - Fork 145
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
Move hints to their own place, with API and unicorns #3495
Merged
Merged
+336
−127
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
e1a399b
to
7e5490e
Compare
Adding |
176d9dd
to
d54ed6d
Compare
a08c302
to
1d6b965
Compare
ae6f753
to
af70e2e
Compare
therazix
approved these changes
Feb 20, 2025
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.
A couple of f
prefixes are missing for f-strings. Otherwise, looks good.
therazix
reviewed
Feb 20, 2025
af70e2e
to
3ae00ab
Compare
3ae00ab
to
4c41d92
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`".
4c41d92
to
bffe2c3
Compare
lukaszachy
approved these changes
Feb 26, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
ci | full test
Pull request is ready for the full test execution
code | no functional change
"No Functional Change" intended. Patch should not change tmt's behavior in any way.
code | style
Code style changes not affecting functionality
status | blocking other work
An important pull request, blocking other pull requests or issues
status | ready for merge
The only missing piece is to do the rebase the current 'main' and let the CI finish.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I wanted to change a couple of things about "hints" tmt shows to users when when a package is missing and functionality is limited:
pip install
.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
".Pull Request Checklist
tmt about
, together with listing all discovered plugins it should give me enough tools to test the features