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

Standardize command line argument parsing formalism in example scripts

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Won't Fix
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: skymap
    • Labels:
      None
    • Team:
      Data Release Production

      Description

      Standardize all example scripts to use the --id command line formalism for scripts. For example, showVisitSkyMap.py needs updating.

        Attachments

          Issue Links

            Activity

            Hide
            tjenness Tim Jenness added a comment -

            What do we want to do with this ticket?

            Show
            tjenness Tim Jenness added a comment - What do we want to do with this ticket?
            Hide
            lauren Lauren MacArthur added a comment -

            I suppose the bigger question is whether these examples will be mantained/updated to gen3 at all, because currently, e.g.,
            In showVisitSkyMap.py:

            butler = dafPersist.Butler(rootDir)
            

            In plotSkyMap.py:

            parser.add_argument("skymap", nargs=1, help="Path to skymap pickle")
            

            I personally have found showVisitSkyMap.py very useful, so would be happy to know that it (or an equivalent) is easily available to stack users (although I suspect there are many such implementations in notebooks already in the wild!)

            Show
            lauren Lauren MacArthur added a comment - I suppose the bigger question is whether these examples will be mantained/updated to gen3 at all, because currently, e.g., In showVisitSkyMap.py: butler = dafPersist.Butler(rootDir) In plotSkyMap.py: parser.add_argument( "skymap" , nargs = 1 , help = "Path to skymap pickle" ) I personally have found showVisitSkyMap.py very useful, so would be happy to know that it (or an equivalent) is easily available to stack users (although I suspect there are many such implementations in notebooks already in the wild!)
            Hide
            jbosch Jim Bosch added a comment -

            I'm calling this Won't Fix.  Individual scripts may still need work when we retire Gen2, but the extensible Click-based CLI stuff we have in daf_butler provides the reusable components we want, at least for the most part, and I don't think this ticket serves as a useful description of the work to do anymore.

            Show
            jbosch Jim Bosch added a comment - I'm calling this Won't Fix.  Individual scripts may still need work when we retire Gen2, but the extensible Click-based CLI stuff we have in daf_butler provides the reusable components we want, at least for the most part, and I don't think this ticket serves as a useful description of the work to do anymore.
            Hide
            tjenness Tim Jenness added a comment -

            I'm fine with a new ticket for each example script that needs to be fixed up and migrated.

            Whether to use click or the argparse recommendation from the developer guide (where the code is put into the main module so it can be tested in both approaches) will be script-dependent I think.

            Show
            tjenness Tim Jenness added a comment - I'm fine with a new ticket for each example script that needs to be fixed up and migrated. Whether to use click or the argparse recommendation from the developer guide (where the code is put into the main module so it can be tested in both approaches) will be script-dependent I think.

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              lauren Lauren MacArthur
              Watchers:
              Jim Bosch, Lauren MacArthur, Tim Jenness
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Jenkins

                  No builds found.