Closed dshemetov closed 10 months ago
Might be good to go.
One thing that would be nice, but I imagine might actually be stupidly tricky, is to first tell the user what file is being modified, before they press enter to confirm.
[EDIT: just saw the conversation about this above. I did not notice the usethis
messages about the path before. Maybe okay but I still hope we can move to something that doesn't require this manual editing step eventually.]
Yea, that'll be hard. I think we found the minimal effort, maximal user gain solution, so we should probably just go with it.
I thought about manually appending to .Renviron
with write(paste("DELPHI_EPIDATA_KEY=", key), environ_path, append=TRUE)
, but got stuck at trying to find the OS-independent user .Renviron
path again. rappdirs
would only point me to config or cache dirs, but not user environs. There's probably another package that we sifted through in the other thread that has something, but I don't think digging in on this is worth it compared to other things we could work on. Let's wait til we get feedback actual users before optimizing.
btw, this document command looks super handy with GitHub suggestions. Very cool. (And doesn't seem like there should be conflicts if you need to rebase local changes made in parallel to the doc commits.)
Right? It works well enough. (Wonder if we can have CI trigger from its commits too, because sometimes people push without documenting NAMESPACE changes, the CI breaks, but then the CI document pushes a change, but the status of the CI doesn't change to passing. But tuning GH CI often feels like another "pencil straightening" exercise to me.)
closes #181
Changes:
get_api_key()
only reads from environment variable now, no R optionssave_api_key()
now instructs the user to write their key and dynamically opens~/.Renviron
orproj_root/.Renviron