NAICNO/Jobanalyzer

sonalyze config file

Opened this issue · 0 comments

This is a papercut that I would like to fix: for the sonalyze command line, I mostly have to specify the same -remote ... -auth-file ... (and even -cluster) for every invocation. It would be useful to have a config file that can supply defaults. Defaults should be overridable; for example, if -data-dir is specified then none of the defaults for remote operation should be relevant; in the same way, if -- file... is used then -data-dir defaults are also ignorable.

Not sure what the format should be but conservatively we do a section-name [datastore-defaults] followed by lines of text where each line could be key=value where they key might be the option, so

[datastore-defaults]
remote=https://naic-monitor.uio.no
cluster=fox
auth-file=~/.ssh/sonalyzed-auth.txt

The config file should be findable in "normal places" eg in the local dir and in $HOME at least; TBD.

One could then imagine sections for the individual commands, mostly to override "user-friendly" defaults:

[sacct-defaults]
all=true

This all adds up to a fair amount of logic but it is probably nicely contained in the arg parser framework.