-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #145 from openpharma/devel
Add renv lockfiles into object and use renv::install for external deps if inside renv environment
- Loading branch information
Showing
24 changed files
with
1,246 additions
and
257 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
Package: staged.dependencies | ||
Type: Package | ||
Title: Install R packages from Particular Git Branches | ||
Version: 0.2.4 | ||
Version: 0.2.5 | ||
Authors@R: c( | ||
person("Adrian", "Waddell", email = "[email protected]", role = c("aut", "cre")), | ||
person("Maximilian", "Mordig", email = "[email protected]", role = "aut"), | ||
|
@@ -16,6 +16,7 @@ Imports: | |
git2r, | ||
glue, | ||
httr, | ||
jsonlite, | ||
methods, | ||
rcmdcheck, | ||
remotes, | ||
|
@@ -32,11 +33,13 @@ Description: When developing multiple dependent packages, it is often useful to | |
License: file LICENSE | ||
Encoding: UTF-8 | ||
LazyData: true | ||
RoxygenNote: 7.1.2 | ||
RoxygenNote: 7.2.0 | ||
Roxygen: list(markdown = TRUE) | ||
Suggests: | ||
knitr, | ||
miniUI, | ||
mockery, | ||
renv, | ||
rmarkdown, | ||
rstudioapi, | ||
shiny, | ||
|
@@ -52,6 +55,7 @@ Collate: | |
'graph_methods.R' | ||
'host.R' | ||
'ref_strategy.R' | ||
'renv.R' | ||
'rstudio_jobs.R' | ||
'rstudio_addins.R' | ||
'utils.R' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
get_renv_lock_from_repo_dir <- function(repo_dir, renv_profile = NULL) { | ||
if (!is.null(renv_profile)) { | ||
renv_file <- fs::path_join(c(repo_dir, "renv", "profiles", renv_profile, "renv.lock")) | ||
} else { | ||
renv_file <- fs::path_join(c(repo_dir, "renv.lock")) | ||
} | ||
|
||
|
||
if (!fs::file_exists(renv_file)) { | ||
return(NULL) | ||
} | ||
|
||
renv_lock <- tryCatch( | ||
jsonlite::read_json(renv_file), | ||
error = function(cond) { | ||
warning(paste("Unable to open renv.lock file", renv_file, "so it will be ignored")) | ||
NULL | ||
}) | ||
return(renv_lock) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.