fix SB authentication issues in .Rmd pipelines
Running the 00_get_data.Rmd
with @mewieczo , we're noticing that the SB timeouts are pretty annoying. In #121 (closed) @dblodgett suggested a check_auth()
function using the system keyring, but it didn't work well on WSL. I'm proposing an alternative here:
- Set SB username and passwords as environment variables with
Sys.setenv()
before knitting the .Rmd- If possible, add a check for these environment variables and set them from user input if necessary. If this turns out to be impossible in the Rmd context, then fail out of the .Rmd if the environment variables aren't set
- Precede each of the SB downloads with a modified version of the
check_auth()
function, which gets the password from the environment variable rather than from the keyring
The check_auth()
solution already requires that an environment variable (the username) be set, so I think this would be a similar level of difficulty to run, but it would work cross-platform.