rstudio / config

config package for R
https://rstudio.github.io/config/
256 stars 27 forks source link

inheritance from other config files #7

Closed shearerpmm closed 7 years ago

shearerpmm commented 7 years ago

The inheritance feature is very attractive - my team is wondering if it can be extended. We have many config YAML files that configure different experiments with a common data science pipeline. Certain parts of the config are shared among all experiments; it would be nice to store these in a common base YAML config and have other experiment files inherit from this.

jjallaire commented 7 years ago

That's a great idea! Note that you could write your own function for this today by:

1) Calling config::get() with an explicit file argument for the common and experiment-specific config files respectively (so you'd retrieve two configs).

2) Using the config::merge() function to merge the experiment specific config into the common config, e.g. config <- config::merge(common, experiment)

shearerpmm commented 7 years ago

That's a good point. And it's not clear to me if adding this feature helps your overall design. Feel free to close if you think it's out-of-scope.

jjallaire commented 7 years ago

Okay, I'll close for now and potentially revisit in a future release if this proves a popular usage pattern. Thanks!