Repository navigation
.Renviron activation in rig proj: handling project secrets and Posit Assistant restrictions #514
Replies: 4 comments 3 replies
|
Great suggestions! I think we'll need to solve this better than just documenting it. Ideally base R itself would detect the virtual environment and amend the library path, and we're hoping to get there in the future. Then the Also, we are planning on updating Posit tools like Positron and Posit Assistant to support rvenv projects directly, as you say, so Sourcing an In any case I don't have a better solution right now, so let's add support for |
|
One question about Also, I named the file |
|
Btw. you don't have to commit |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi team,
First off, thank you for all the recent updates to
rig—the newrig projworkflows, user-level installs, and file-cloning library support have been huge improvements for managing R projects.Reading through
.rvenvlib/rvenv, the rationale for using a committed.Renviron(andR_DEFAULT_PACKAGES) instead of.Rprofileto avoid shadowing~/.Rprofile—while still re-reading~/.Renvironin.onLoad()—makes a lot of sense.However, committing a project-level
.Renvironstill creates two practical friction points:.gitignore: While user-level~/.Renvironis preserved, teams that keep project-specific secrets or API keys in./.Renvironnormally.gitignoreit, which conflicts withrigexpecting.Renvironto be committed for activation..Renvironby default to prevent secret leaks, which prevents them from seeing how therigenvironment is wired up when debugging or working with an assistant.A few possible directions to consider:
.envloaded viadotenv/readRenviron(".env"), orkeyring).rvenvalso source a gitignored.Renviron.localalongside~/.Renviron, so teams have a dedicated, untracked place for project-specific env vars.rigproject config without needing.Renviron).Are there any plans or recommended patterns for handling this?
Thanks again for all the great work on
rig proj!All reactions