You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Instead of using constants in the package or writing to variables to the global (user's) environment, store state variables in a config environment within the package.
Create config environment and assign default values to it.
Move most of the items in in globals.R to config by adding a prefix config$ when assigning and retrieving them. If there's any chance it would change in a different deployment it should be in config and not defined as a global constant in the package.
Move state variables created by set_s3_config and retrieved by get_s3_config to the config environment. Replace assign() with config$option <- .
Add Items in config to set:
local_temp_path
log_file_path,
log (flag to turn logging on and off)
Update logging to honor log_file_path and log
Update flow to honor local_temp_path
Write function to set and retrieve options. See example
Move set_s3_config and get_s3_config into s3_config.R (from flow.R)
Set all list items as variables in config using config$...
Instead of using constants in the package or writing to variables to the global (user's) environment, store state variables in a
configenvironment within the package.Create
configenvironment and assign default values to it.Move most of the items in in
globals.Rtoconfigby adding a prefixconfig$when assigning and retrieving them. If there's any chance it would change in a different deployment it should be inconfigand not defined as a global constant in the package.Move state variables created by
set_s3_configand retrieved byget_s3_configto theconfigenvironment. Replaceassign()withconfig$option <-.Add Items in config to set:
local_temp_pathlog_file_path,log(flag to turn logging on and off)Update logging to honor
log_file_pathandlogUpdate flow to honor
local_temp_pathWrite function to set and retrieve options. See example
Move set_s3_config and get_s3_config into
s3_config.R(fromflow.R)Set all list items as variables in config using
config$...