config icon indicating copy to clipboard operation
config copied to clipboard

support for config files that don't use default

Open alex-gable opened this issue 7 years ago • 2 comments

Given that there isn't a global standard for yml file structures, this should not be a dependency for reading a config file.

I'd suggest replacing line 58 with default_config <- config_yaml[[config]] to have it check for the presence of the specified config, in the case that R_CONFIG_ACTIVE is specified as a value other than default or that a user specifies a config in the function call.

While this would work, I think re-writing that block to more specifically check for config as defined in the function call "default" or otherwise, as this step pretty intently looks strictly for "default".

Also, the documentation specifies R_CONFIG_NAME as the environment variable. It looks like this feature was not fully implemented in @jjallaire's branch.

Happy to (attempt) to make this change.

alex-gable avatar Feb 06 '18 04:02 alex-gable

Ultimately, it's hard to justify using this package over configr given the state of functionality.

alex-gable avatar Feb 06 '18 04:02 alex-gable

I fully support this idea. It's great that this package supports having multiple configs (local, stage, prod, etc), but for many usecases all I want is just a single config. I just want to use a config file rather than hardcode parameters in the source code, but I don't have different configurations. It adds a bit of friction and unnecessary complexity to have to indent everything inside default:. It's also confusing when others who aren't familiar with this package look at the yml file and wonder what's the purpose of that first line.

daattali avatar Dec 21 '19 01:12 daattali