cmu-delphi / epidatr

Delphi Epidata API R Client
https://cmu-delphi.github.io/epidatr/
Other
1 stars 5 forks source link

refactor+docs: set_api_key #217

Closed dshemetov closed 10 months ago

dshemetov commented 10 months ago

closes #181

Changes:

dshemetov commented 10 months ago

Might be good to go.

brookslogan commented 10 months ago

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.]

dshemetov commented 10 months ago

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.

brookslogan commented 10 months ago

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.)

dshemetov commented 10 months ago

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.)