Open fgvieira opened 4 years ago
Shouldn't we expect the config to be fully overwritten (and the key url should not be there)?
No, as the documentation states:
Finally, you can use the –configfile command line argument to overwrite values from the configfile statement. Note that any values parsed into the config dictionary with any of above mechanisms are merged, i.e., all keys defined via a configfile statement, or the –configfile and –config command line arguments will end up in the final config dictionary, but if two methods define the same key, command line overwrites the configfile statement.
But I think that an option to overwrite a config file completely could be useful in some cases.
Exactly. PRs for an additional flag to modify the behavior in this regard are welcome.
Snakemake version 5.27.4
Describe the bug When there is a config file loaded and another one is loaded through
--configfile
, the configdict
is updated and not overwritten.Minimal example With a snakefile:
and a config file:
you get (with some errors that are not relevant for here):
but, if you also load this config through the command line:
you get:
Shouldn't we expect the config to be fully overwritten (and the key
url
should not be there)? If not and snakemake actually merges config files (instead of overwriting them), is there a way to enforce the old one to be overwritten?thanks,