Details
-
Type:
Story
-
Status: Done
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: pipe_base
-
Labels:
-
Story Points:1
-
Epic Link:
-
Sprint:Alert Production F16 - 10
-
Team:Alert Production
Description
When a command-line task is executed it would be very helpful to have the command logged. This helps diagnose issues with packages such as ci_hsc and validate_drp.
This is trivial when the task is executed from the command line, e.g. add the following to ArgumentParser:
log.info("Running: {}".format(" ".join(sys.arvg)))
|
It is a bit trickier if the command is executed by code that calls CmdLineTask.parseAndRun directly; the arguments are readily available but determining the task will require introspection.
Do you have time to look at this Hsin-Fang Chiang? It's a fairly small change, though includes a new function in lsst.utils along with a unit test.
Try running some of the tests in pipe_base manually, or validate_drp demos or ci_hsc to see the new log message.