Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Submit feedback
    • Contribute to GitLab
  • Sign in
UW-Glance
UW-Glance
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 27
    • Issues 27
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 1
    • Merge Requests 1
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Eva Schiffer
  • UW-GlanceUW-Glance
  • Issues
  • #27

Closed
Open
Opened Dec 17, 2018 by Alan De Smet@adesmet0 of 4 tasks completed0/4 tasks
  • Report abuse
  • New issue
Report abuse New issue

Move "Available commands in Glance" to argparse epilog

glance help emits this:

Available commands in Glance:
        info             list information about a list of files
        stats            summarize the statistical differences between two files
        help             print help for a specific command or list of commands
        gui              start the Glance graphical user interface
        plotDiffs        create a set of images comparing two files
        inspectReport    create a report to inspect the contents of one file
        colocateData     colocate data from two files
        reportGen        create a report comparing two files
        inspectStats     create statistics summary of one file

It is automatically appended to glance typotypo or bare glance. It does not get appended to glance --help. These should be unified, ideally by moving it into the argparse logic.

  1. In compare.py's main(), move the logic for collecting the commands above the call to config_organizer.parse_arguments()
  2. Move logic for generating help message out of compare.py's main's help() into generating a string to pass to config_organizer.parse_arguments()
  3. Have config_organizer.parse_arguments() pass that string in as an epilog. (This will probably require formatter=argparse.RawDescriptionHelpFormatter in the call to argparse.ArgumentParser! Otherwise the text will be reflowed!)
  4. Modify compare.py's main's help() to call options.print_help() for the print_all_summary case. (This may require some cleverness, as help() is defined before we get options back!)

In the long run we'll want to do more clever things with subparsers, potentially eliminating the need for this logic at all. But this is a step forward.

Edited Dec 17, 2018 by Alan De Smet
To upload designs, you'll need to enable LFS. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
1
Labels
argparse
Assign labels
  • View project labels
Reference: evas/UW-Glance#27