Repository navigation
Better UI for command line launch - #829
Conversation
* Use ansi colours for the default values and filled values in the group select view of params (nf-core#816) * Add to group select prompt a warning that a value is required, if not yet filled and no default
Codecov Report
@@ Coverage Diff @@
## dev #829 +/- ##
==========================================
- Coverage 78.34% 78.00% -0.35%
==========================================
Files 22 22
Lines 2480 2491 +11
==========================================
Hits 1943 1943
- Misses 537 548 +11
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Very nice, couldn't find anything suspicious 👍
| # Show error messages if we have any | ||
| for msg in error_msgs: | ||
| question["choices"].append( | ||
| questionary.Choice( | ||
| [("bg:ansiblack fg:ansired bold", " error "), ("fg:ansired", f" - {msg}")], disabled=True | ||
| ) | ||
| ) | ||
| error_msgs = [] |
There was a problem hiding this comment.
Wouldn't that make more sense after line 491, where you check for errors?
Or does it require a 'fresh' question object?
There was a problem hiding this comment.
No, the logic is a bit funny here. If there are errors then the question is asked again. So in lines 491 we collect error messages, then the loop fires again. Here we are printing the errors if there are any from the last time we went around and then clearing them once shown (so that they don't persist forever).
There was a problem hiding this comment.
Ah I get it, makes sense like that :D thanks!
Refined UI around the Questionary prompts:
Screenshots of cli interface before and after changes in this PR:
Implementation of #816 and with help from tmbo/questionary#107
PR checklist
CHANGELOG.mdis updateddocsis updated