ConfigArgParse icon indicating copy to clipboard operation
ConfigArgParse copied to clipboard

Parse yaml directories as key=value pairs

Open SilasK opened this issue 4 years ago • 2 comments

Hellow I work on https://github.com/snakemake/snakemake/issues/1186

I would like that the YAMLConfigFileParser would parse yaml directories to key-value pairs.

config.yaml

default_resources:
  mem_mb: 10
  time:300

would be parsed to: --default_resources mem_mb=10 time=300

Do you think this is a reasonable feature request?

SilasK avatar Nov 24 '21 15:11 SilasK

I think complicated values like this with compound / non-primitive types are too complex for the main configargparse repo. You're welcome to create a subclass or fork of configargparse for these more specialized use cases.

bw2 avatar Jan 26 '22 02:01 bw2

Could you show me where in the code I would need to check if the input is a dict.

SilasK avatar Feb 06 '22 08:02 SilasK