[Feature] Allow picking specific default file to merge with specific override file in API
iTrellis-OzairP opened this issue · comments
Ozair Patel commented
My directory structure for my project looks like this
$ tree live/environments
live/environments
├── _default.yaml
├── dev.yaml
└── prod.yaml
I want to be able to selectively choose to merge dev.yaml
with _defaults.yaml
or prod.yaml
with _defaults.yaml
. Hell if I wanted to I should be able to merge dev.yaml
with prod.yaml
.
Expected Behaviour
# Non-existent API
config_processor.process_custom(default="live/environments/_default.yaml", override="live/environments/dev.yaml")
Merges dev.yaml
on top of _default.yaml
Actual Behaviour
config_processor.process(path="live/environments")
Takes the last file, prod.yaml
and merges with _default.yaml
.
Adrian Muraru commented
IMO, this adds too much complexity.
"hi" in himl stands for hierarchical and in this case we'd introduce merging logic horizontally.
In your example above - the dev and prod could be moved as sub-folders and achieve similar behaviour