Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support for config files that don't use default #13

Open
alex-gable opened this issue Feb 6, 2018 · 2 comments
Open

support for config files that don't use default #13

alex-gable opened this issue Feb 6, 2018 · 2 comments

Comments

@alex-gable
Copy link

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
Copy link
Author

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

@daattali
Copy link

daattali commented Dec 21, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants