Writing this because I just got annoyed by it, and I will otherwise forget to at least write it down.
We have quite a few arguments that are commonly added. We could consider adding a few of them already pre-configured to the parser we can import from parseArgs. The most commonly used one is probably --compactFile. I have done
from k4FWCore.parseArgs import parser
parser.add_argument("--compactFile", type=str, description="...")
countless times. I am fairly certain there are more of them. The simplest solution would be to either add a function parser_with_default_args that sets up these arguments already before users add theirs (possibly even configurable for "sets of arguments").
Alternatively for compactFile specifically we might consider adding it to k4run and in case it is present also inject the GeoSvc properly configured with it into the ExtSvcs of our ApplicationMgr (as we already do with some other services, I think).
Writing this because I just got annoyed by it, and I will otherwise forget to at least write it down.
We have quite a few arguments that are commonly added. We could consider adding a few of them already pre-configured to the
parserwe can import fromparseArgs. The most commonly used one is probably--compactFile. I have donecountless times. I am fairly certain there are more of them. The simplest solution would be to either add a function
parser_with_default_argsthat sets up these arguments already before users add theirs (possibly even configurable for "sets of arguments").Alternatively for
compactFilespecifically we might consider adding it tok4runand in case it is present also inject theGeoSvcproperly configured with it into theExtSvcs of ourApplicationMgr(as we already do with some other services, I think).