Fix Version/s: None
Component/s: ts_auxiliary_telescope, ts_main_telescope
Sprint:TSSW Sprint - Aug 17 - Aug 31
Team:Telescope and Site
Enhance the ScriptQueue commander to allow the user to specify logLevel and other options for the add command. Preferably make these optional arguments that use keywords, e.g. logLevel=40.
|Field||Original Value||New Value|
|Status||To Do [ 10001 ]||In Progress [ 3 ]|
|Reviewers||Tiago Ribeiro [ tribeiro ]|
|Status||In Progress [ 3 ]||In Review [ 10004 ]|
|Watchers||Russell Owen, Tiago Ribeiro [ Russell Owen, Tiago Ribeiro ]||Michael Reuter, Russell Owen, Tiago Ribeiro [ Michael Reuter, Russell Owen, Tiago Ribeiro ]|
|Summary||ScriptQueueCommander: support setting logLevel, config, etc. in the add command||ScriptQueueCommander: support setting logLevel, etc. in the add command|
|Description||Enhance the ScriptQueue commander to allow the user to specify logLevel, config (from a file), etc. for the add command. Preferably make these optional arguments that use keywords, e.g. logLevel=40.||Enhance the ScriptQueue commander to allow the user to specify logLevel and other options for the add command. Preferably make these optional arguments that use keywords, e.g. logLevel=40.|
|Status||In Review [ 10004 ]||Reviewed [ 10101 ]|
|Resolution||Done [ 10000 ]|
|Status||Reviewed [ 10101 ]||Done [ 10002 ]|
The queue commander already supported specifying config on the command line – either from a file or as a set of key=value pairs. So that meant adding key=value to support optional parameters wasn't going to work. What I chose to do is add -key=value for the optional fields, with sensible options for each field. For example "-logLevel=40 -location=0". I did not try to get parse enum names, but the help does print the allowed values for location and the usual values for logLevel.
Also I added a new log level option for starting the script queue commander, which sets the default log level for added scripts.
It is enough code that I am a bit worried about the lack of unit tests. But I have not yet figured out how to unit test these controllers.
Pull request: https://github.com/lsst-ts/ts_scriptqueue/pull/52