Skip to content

Commit

Permalink
Deprecate current Python integration
Browse files Browse the repository at this point in the history
  • Loading branch information
Tonn Rüter committed Nov 8, 2024
1 parent 497f0c4 commit 7ac2f77
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 16 deletions.
5 changes: 0 additions & 5 deletions scripts/start/run.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@ run <- function() {

load("config.Rdata")

if (cfg$pythonEnabled == "on"){
# Set environment variables so that reticulate finds the configured Python virtual env
Sys.setenv(RETICULATE_PYTHON = piamenv::pythonBinPath(".venv"))
}

# Save start time
timeGAMSStart <- Sys.time()

Expand Down
7 changes: 0 additions & 7 deletions scripts/start/submit.R
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,6 @@ submit <- function(cfg, restart = FALSE, stopOnFolderCreateError = TRUE) {
stdout = renvLogPath, stderr = "2>&1")
}

if (cfg$pythonEnabled == "on") {
piamenv::createResultsfolderPythonVirtualEnv(normalizePath(cfg$results_folder))
} else {
# create empty .venv folder so that new venv won't be initialized automatically by .Rprofile
dir.create(file.path(cfg$results_folder, ".venv"))
}

# Save the cfg (with the updated name of the result folder) into the results folder.
# Do not save the new name of the results folder to the .RData file in REMINDs main folder, because it
# might be needed to restart subsequent runs manually and should not contain the time stamp in this case.
Expand Down
4 changes: 0 additions & 4 deletions start.R
Original file line number Diff line number Diff line change
Expand Up @@ -301,10 +301,6 @@ if (any(c("--reprepare", "--restart") %in% flags)) {
cfg$slurmConfig <- slurmConfig
if (testOneRegi_region != "") cfg$gms$c_testOneRegi_region <- testOneRegi_region
}
# Make sure all python requirements are installed
if (cfg$pythonEnabled == "on") {
piamenv::updatePythonVirtualEnv()
}
# Directly start runs that have a gdx file location given as path_gdx... or where this field is empty
gdx_specified <- grepl(".gdx", cfg$files2export$start[path_gdx_list], fixed = TRUE)
gdx_na <- is.na(cfg$files2export$start[path_gdx_list])
Expand Down

0 comments on commit 7ac2f77

Please sign in to comment.