Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-8933

Fix formatting in validateDrp.py --help message

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: Validation
    • Labels:
      None
    • Story Points:
      0
    • Team:
      SQuaRE

      Description

      Fix formatting in validateDrp.py --help message

      The "description" currently reads as

      Calculate and plot validation Key Project Metrics from the LSST SRD.
      http://ls.st/LPM-17\n Produces results to: STDOUT Summary of key metrics
      REPONAME*.png Plots of key metrics. Generated in current working directory.
      REPONAME*.json JSON serialization of each KPM. where REPONAME is based on the
      repository name but with path separators replaced with underscores. E.g.,
      "Cfht/output" -> "Cfht_output_"
      

      But it should read (as written in the string):

          description = """
          Calculate and plot validation Key Project Metrics from the LSST SRD.
          http://ls.st/LPM-17
       
          Produces results to:
          STDOUT
              Summary of key metrics
          REPONAME*.png
              Plots of key metrics.  Generated in current working directory.
          REPONAME*.json
              JSON serialization of each KPM.
       
          where REPONAME is based on the repository name but with path separators
          replaced with underscores.  E.g., "Cfht/output" -> "Cfht_output_"
          """
      

      • I think this is just a matter of passing formatter_class=argparse.RawDescriptionHelpFormatter to argparse.ArgumentParser

        Attachments

          Issue Links

            Activity

            Hide
            wmwood-vasey Michael Wood-Vasey added a comment -

            This is a trivial one-line addition to fix up the formatting in the help message.

            Show
            wmwood-vasey Michael Wood-Vasey added a comment - This is a trivial one-line addition to fix up the formatting in the help message.
            Hide
            jsick Jonathan Sick added a comment -

            Looks very useful. The PR has a minor recommendation for improvement (I'd opt for the module-level description approach).

            Show
            jsick Jonathan Sick added a comment - Looks very useful. The PR has a minor recommendation for improvement (I'd opt for the module-level description approach).
            Hide
            wmwood-vasey Michael Wood-Vasey added a comment -

            Merged to master.

            Minor suggestion adopted.

            Show
            wmwood-vasey Michael Wood-Vasey added a comment - Merged to master. Minor suggestion adopted.

              People

              Assignee:
              wmwood-vasey Michael Wood-Vasey
              Reporter:
              wmwood-vasey Michael Wood-Vasey
              Reviewers:
              Jonathan Sick
              Watchers:
              Jonathan Sick, Michael Wood-Vasey
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Jenkins

                  No builds found.