Skip to content

Commit

Permalink
Merge pull request #1912 from pascal-sauer/develop
Browse files Browse the repository at this point in the history
use piamenv::installDeps
  • Loading branch information
pascal-sauer authored Dec 6, 2024
2 parents ae4a651 + 1e542e5 commit 0d51437
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Imports:
ncdf4,
nleqslv,
optparse,
piamenv (>= 0.5.4),
piamenv (>= 0.6.0),
piamInterfaces (>= 0.34.1),
piamPlotComparison (>= 0.0.10),
piamutils,
Expand Down
15 changes: 2 additions & 13 deletions start_bundle_coupled.R
Original file line number Diff line number Diff line change
Expand Up @@ -93,19 +93,6 @@ run_compareScenarios <- "short"
# use an empty magpie model (just reproduces the latest AMT results)
magpie_empty <- FALSE

########################################################################################################
################################# install magpie dependencies ########################################
########################################################################################################
if (!is.null(renv::project())) {
magpieDeps <- renv::dependencies(path_magpie)
installedPackages <- installed.packages()[, "Package"]
missingDeps <- setdiff(unique(magpieDeps$Package), installedPackages)
if (length(missingDeps) > 0) {
message("Installing missing MAgPIE dependencies ", paste(missingDeps, collapse = ", "))
renv::install(missingDeps)
}
}

########################################################################################################
################################# load command line arguments ########################################
########################################################################################################
Expand Down Expand Up @@ -154,6 +141,8 @@ dir.create(file.path(path_magpie, "output"), showWarnings = FALSE)

ensureRequirementsInstalled(rerunPrompt = "start_bundle_coupled.R")

piamenv::installDeps(path_magpie)

errorsfound <- 0
startedRuns <- NULL
finishedRuns <- NULL
Expand Down

0 comments on commit 0d51437

Please sign in to comment.