-
Notifications
You must be signed in to change notification settings - Fork 0
Description
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
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_path -
log_file_path, -
log(flag to turn logging on and off)
-
-
Update logging to honor
log_file_pathandlog -
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(fromflow.R) -
Set all list items as variables in config using
config$...