bw2 / ConfigArgParse

A drop-in replacement for argparse that allows options to also be set via config files and/or environment variables.
MIT License
719 stars 121 forks source link

Accessing parameters from config file which have not been defined as options? #247

Closed tardigradus closed 3 years ago

tardigradus commented 3 years ago

I have some options which will be used regularly and others which will only be changed very rarely. I would like the common options to appear in the help, but not the others (or the others should at least appear in a separate section).

Ideally I would like to access the parameters from the config file, regardless of whether they have been defined as options. Is this possible?

bw2 commented 3 years ago

Yes, you should be able to use add_argument_group for this.

tardigradus commented 3 years ago

So that will allow some options to be displayed in a separate section in the help, but I would still have to add all the parameters in the config file as parser arguments, right?