Closed christophscheuch closed 3 months ago
An easier alternative for a user who only wants to run code is to replace the entire call to os.getenv("...") with her personal credentials. I don't necessarily think that every use case justifies to populate the .env file.
My intention is to include both a clear reformulation what needs to be replaced and an example .env to Getting Started and a reference to it in WRDS chapter. If people want to share their code via GitHub etc then they should know how to work with .env files.
How about prompting the user for the required input?
rstudioapi::askForPassword("WRDS username")
rstudioapi::askForPassword("WRDS password")
We decided to use the prompt approach only in r-tidyfinance and go with the changes in my previous post 🙏
It is neither straight-forward how to create, nor how to replace environment variables for the WRDS connection.
We write: "To establish a connection, you use the function create_engine() with a connection string. Note that you need to replace the WRDS_USER and WRDS_PASSWORD arguments with your own credentials. We defined environment variables for the purpose of this book because we obviously do not want (and are not allowed) to share our credentials with the rest of the world (these environment variables are stored in the .env file of our project directory, loaded with load_dotenv(), and then called with the os.getenv() function)."
Issues:
Proposal: