Skip to content

Use config_[PackageName].yml instead of config.yml for user config file

The motivation is that it avoids collision between configurations when several fairify packages are used in a session.

loadConfig <- function(userFile = "config.yml", pathDefaultCfg = system.file("config.yml", package = utils::packageName())) {
  fairify::loadConfig(userFile = userFile, pathDefaultCfg = pathDefaultCfg)
}

Should become something like:

loadConfig <- function(userFile = sprintf("config_%s.yml", utils::packageName()), 
                       pathDefaultCfg = system.file("config.yml", package = utils::packageName())) {
  fairify::loadConfig(userFile = userFile, pathDefaultCfg = pathDefaultCfg)
}

We also should assure a backward compatibility with an obsolescence warning.

Edited by David Dorchies