ConfigArgParse icon indicating copy to clipboard operation
ConfigArgParse copied to clipboard

write config file ignores "store actions"

Open alon-dotan-starkware opened this issue 4 years ago • 1 comments

example:

from configargparse import ArgumentParser


if __name__ == '__main__':
    base_parser = ArgumentParser(
        add_config_file_help=True,
        description='test',
        args_for_writing_out_config_file=['--generate_config_file'],
        args_for_setting_config_path=['--config_file'])
    base_parser.add_argument('--genome_7', default='bla', help='path to genome file')
    base_parser.add_argument('--genome_1', action='store_true')
    args = base_parser.parse_args()
python tester.py --generate_config_file /tmp/config.ini
cat /tmp/config.ini
genome_7 = bla

alon-dotan-starkware avatar Feb 16 '21 19:02 alon-dotan-starkware

That's a bug. A PR to fix this would be appreciated.

bw2 avatar Feb 17 '21 02:02 bw2