question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. Itย collects links to all the places you might be looking at while hunting down a tough bug.

And, if youโ€™re still stuck at the end, weโ€™re happy to hop on a call to see how we can help out.

Allow adding extra lines to separate commands/parameters

See original GitHub issue

This one might be niche, not that useful, and (maybe) annoying to implement. I decided to post it here anyway.

I noticed that when I have several commands, the help dialogue looks very busy and difficult to read:

โ•ญโ”€ Modules โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚  download-database          Download the latest version of Genomad's database and save it in the DESTINATION         โ”‚
โ”‚                             directory.                                                                               โ”‚
โ”‚  annotate                   Predict the genes in the INPUT file (FASTA format), annotate them using Genomad's        โ”‚
โ”‚                             markers (located in the DATABASE directory), and write the results to the OUTPUT         โ”‚
โ”‚                             directory.                                                                               โ”‚
โ”‚  find-proviruses            Find integrated viruses within the sequences in INPUT file using the Genomad markers     โ”‚
โ”‚                             (located in the DATABASE directory) and write the results to the OUTPUT directory. This  โ”‚
โ”‚                             command depends on the data generated by the annotate module.                            โ”‚
โ”‚  marker-classification      Classify the sequences in the INPUT file (FASTA format) based on the presence of         โ”‚
โ”‚                             Genomad markers (located in the DATABASE directory) and write the results to the OUTPUT  โ”‚
โ”‚                             directory. This command depends on the data generated by the annotate module.            โ”‚
โ”‚  nn-classification          Classify the sequences in the INPUT file (FASTA format) using the Genomad neural         โ”‚
โ”‚                             network and write the results to the OUTPUT directory.                                   โ”‚
โ”‚  aggregated-classification  Aggregate the results of the marker-classification and nn-classification modules to      โ”‚
โ”‚                             classify the sequences in the INPUT file (FASTA format) and write the results to the     โ”‚
โ”‚                             OUTPUT directory.                                                                        โ”‚
โ”‚  score-calibration          Performs score calibration of the sequences in the INPUT file (FASTA format) using the   โ”‚
โ”‚                             batch correction method and write the results to the OUTPUT directory. This module       โ”‚
โ”‚                             requires that at least one of the classification modules was classified previously       โ”‚
โ”‚                             (marker-classification, nn-classification, aggregated-classification).                   โ”‚
โ”‚  summary                    Generates a classification report file for the sequences in the INPUT file (FASTA        โ”‚
โ”‚                             format) and write it to the OUTPUT directory.                                            โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

If I add an additional line to separate the commands, the dialogue looks much better.

โ•ญโ”€ Modules โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚  download-database          Download the latest version of Genomad's database and save it in the DESTINATION         โ”‚
โ”‚                             directory.                                                                               โ”‚
โ”‚                                                                                                                      โ”‚
โ”‚  annotate                   Predict the genes in the INPUT file (FASTA format), annotate them using Genomad's        โ”‚
โ”‚                             markers (located in the DATABASE directory), and write the results to the OUTPUT         โ”‚
โ”‚                             directory.                                                                               โ”‚
โ”‚                                                                                                                      โ”‚
โ”‚  find-proviruses            Find integrated viruses within the sequences in INPUT file using the Genomad markers     โ”‚
โ”‚                             (located in the DATABASE directory) and write the results to the OUTPUT directory. This  โ”‚
โ”‚                             command depends on the data generated by the annotate module.                            โ”‚
โ”‚                                                                                                                      โ”‚
โ”‚  marker-classification      Classify the sequences in the INPUT file (FASTA format) based on the presence of         โ”‚
โ”‚                             Genomad markers (located in the DATABASE directory) and write the results to the OUTPUT  โ”‚
โ”‚                             directory. This command depends on the data generated by the annotate module.            โ”‚
โ”‚                                                                                                                      โ”‚
โ”‚  nn-classification          Classify the sequences in the INPUT file (FASTA format) using the Genomad neural         โ”‚
โ”‚                             network and write the results to the OUTPUT directory.                                   โ”‚
โ”‚                                                                                                                      โ”‚
โ”‚  aggregated-classification  Aggregate the results of the marker-classification and nn-classification modules to      โ”‚
โ”‚                             classify the sequences in the INPUT file (FASTA format) and write the results to the     โ”‚
โ”‚                             OUTPUT directory.                                                                        โ”‚
โ”‚                                                                                                                      โ”‚
โ”‚  score-calibration          Performs score calibration of the sequences in the INPUT file (FASTA format) using the   โ”‚
โ”‚                             batch correction method and write the results to the OUTPUT directory. This module       โ”‚
โ”‚                             requires that at least one of the classification modules was classified previously       โ”‚
โ”‚                             (marker-classification, nn-classification, aggregated-classification).                   โ”‚
โ”‚                                                                                                                      โ”‚
โ”‚  summary                    Generates a classification report file for the sequences in the INPUT file (FASTA        โ”‚
โ”‚                             format) and write it to the OUTPUT directory.                                            โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
apcamargocommented, May 17, 2022

Youโ€™re too efficient. I canโ€™t keep up hahaha. Thank you so much, @ewels!

Iโ€™ll try to contribute by figuring out how to fix the other aesthetic bugs that have been bothering me (https://github.com/ewels/rich-click/issues/35 and https://github.com/ewels/rich-click/issues/34), but they are much trickier than I was expecting.

1reaction
ewelscommented, May 17, 2022

Great! I set it up with padding and pad_edge already (the latter set to False by default, which the best effect): https://github.com/ewels/rich-click/blob/95a35943ec36f39b45951e635540e4883258fdf2/src/rich_click/rich_click.py#L48-L49

But I guess that there is still some other cell padding or something creeping in which could be finetuned to get exactly the right effectโ€ฆ But I didnโ€™t spend ages looking as I thought it looked ok as it was ๐Ÿ˜…

Note that some of the table style settings only work when the box is set to something other than None. I probably should have mentioned that in the readme somewhere. Thatโ€™s why I set it to SIMPLE here: https://github.com/ewels/rich-click/blob/95a35943ec36f39b45951e635540e4883258fdf2/examples/click/10_table_styles.py#L3-L4

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Add Command Line Parameters to PC Game Shortcuts
First, create a shortcut for the EXE file if you don't see a game icon on the desktop. Then, right-click shortcut > Properties....
Read more >
Split long commands in multiple lines through Windows batch ...
1. The line cmd1.bat && cmd2.bat is different from the parens form: execute cmd2.bat iff cmd1. ยท ( echo <line break here> hello...
Read more >
Understanding Command Line Arguments and How to Use ...
Command line arguments are extra commands you can use when launching a program so that the program's functionality will change.
Read more >
How to define commands in System.CommandLine
This article explains how to define commands, options, and arguments in command-line apps that are built with the System.CommandLine libraryย ...
Read more >
Quotes, Escape Characters, Delimiters - Windows CMD - SS64
Delimiters separate one parameter from the next - they split the command line up into words. Parameters are most often separated by spaces,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found