Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Propagate renv.lock from pharmaverse/admiralci #314

Merged
merged 1 commit into from
Aug 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion .Rprofile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Set renv profile base on R version.
.get_dependencies <- function(project_dir) {

admdev_loc <- find.package("admiraldev", lib.loc = .libPaths(), quiet = TRUE)
adm_dev_suggests <- if (length(admdev_loc) != 0) {
adm_dev_suggests <- if(length(admdev_loc) != 0) {
renv:::renv_dependencies_discover_description(admdev_loc, fields = c("Depends", "Imports", "LinkingTo", "Suggests"))
} else {
data.frame(Packages = character(0))
Expand Down
3 changes: 2 additions & 1 deletion .devcontainer/4.1/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"containerEnv": {
"ROOT": "true",
"PASSWORD": "rstudio",
"DISABLE_AUTH": "true"
"DISABLE_AUTH": "true",
"RENV_AUTOLOADER_ENABLED": "false"
},
"features": {
"ghcr.io/rocker-org/devcontainer-features/r-rig:1": {
Expand Down
3 changes: 2 additions & 1 deletion .devcontainer/4.2/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"containerEnv": {
"ROOT": "true",
"PASSWORD": "rstudio",
"DISABLE_AUTH": "true"
"DISABLE_AUTH": "true",
"RENV_AUTOLOADER_ENABLED": "false"
},
"features": {
"ghcr.io/rocker-org/devcontainer-features/r-rig:1": {
Expand Down
3 changes: 2 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"containerEnv": {
"ROOT": "true",
"PASSWORD": "rstudio",
"DISABLE_AUTH": "true"
"DISABLE_AUTH": "true",
"RENV_AUTOLOADER_ENABLED": "false"
},
"features": {
"ghcr.io/rocker-org/devcontainer-features/r-rig:1": {
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/postCreateCommand.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash

R -q -e 'renv::activate(profile = paste(R.version$major, substr(R.version$minor, 1, 1), sep = ".")); renv::restore(); staged.dependencies::install_deps(staged.dependencies::dependency_table(project = ".", verbose = 1), verbose = 1);'
R -q -e 'renv::restore(lockfile = file.path("renv", "profiles", paste(R.version$major, substr(R.version$minor, 1, 1), sep = "."), "renv.lock")); staged.dependencies::install_deps(staged.dependencies::dependency_table(project = ".", verbose = 1), verbose = 1);'

jq --arg folder "$(pwd)/" '. + { "initial_working_directory": $folder }' .devcontainer/rstudio-prefs.json > ~/.config/rstudio/rstudio-prefs.json