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

repair 'make test-full': remove fails for coupled runs, cleanup start_bundle_coupled, remove outdated configs #1580

Merged
merged 5 commits into from
Feb 28, 2024
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Imports:
raster,
readr,
readxl,
remind2 (>= 1.125.0),
remind2 (>= 1.135.6),
renv,
reshape2,
reticulate,
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ test-full: ## Run all tests, including coupling tests and a default
$(info Full tests take more than an hour to run, please be patient)
@TESTTHAT_RUN_SLOW=TRUE Rscript -e 'testthat::test_dir("tests/testthat")'

test-full-slurm: ##test-full, but on slurm
$(info Full tests take more than an hour to run, please be patient)
@sbatch --qos=priority --wrap="make test-full" --job-name=test-full --mail-type=END --output=test-full.log --comment="test-full.log"

test-validation: ## Run validation tests, requires a full set of runs in the output folder
$(info Run validation tests, requires a full set of runs in the output folder)
@TESTTHAT_RUN_SLOW=TRUE Rscript -e 'testthat::test_dir("tests/testthat/validation")'
Expand Down
48 changes: 0 additions & 48 deletions config/scenario_config_GCS.csv

This file was deleted.

36 changes: 0 additions & 36 deletions config/scenario_config_coupled_SHAPE.csv

This file was deleted.

2 changes: 0 additions & 2 deletions config/scenario_config_tradeCap_standalone.csv

This file was deleted.

2 changes: 1 addition & 1 deletion scripts/output/export/xlsx_IIASA.R
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ lucode2::readArgs("outputdirs", "filename_prefix", "outputFilename", "model",
if (is.null(mapping)) {
mapping <- gms::chooseFromList(names(piamInterfaces::templateNames()), type = "mapping template")
}
if (length(mapping) == 0 || ! all(file.exists(mapping) | mapping %in% names(templateNames())))
if (length(mapping) == 0 || ! all(file.exists(mapping) | mapping %in% names(templateNames()))) {
stop("mapping='", paste(mapping, collapse = ", "), "' not found.")
}
if (exists("iiasatemplate") && ! is.null(iiasatemplate) && ! file.exists(iiasatemplate)) {
Expand Down
15 changes: 5 additions & 10 deletions scripts/output/single/reporting.R
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,8 @@ load(configfile, envir = envir)

# produce REMIND reporting *.mif based on gdx information
message("\n### start generation of mif files at ", Sys.time())
tmp <- try(convGDX2MIF(gdx, gdx_refpolicycost = gdx_refpolicycost, file = remind_reporting_file,
scenario = scenario, gdx_ref = gdx_ref)) # try to execute convGDX2MIF
if (inherits(tmp, "try-error")) {
convGDX2MIF_REMIND2MAgPIE(gdx, file = remind_reporting_file, scenario = scenario)
}
convGDX2MIF(gdx, gdx_refpolicycost = gdx_refpolicycost, file = remind_reporting_file,
scenario = scenario, gdx_ref = gdx_ref)

# MAGICC code not working with REMIND-EU
# generate MAGICC reporting and append to REMIND reporting
Expand Down Expand Up @@ -122,11 +119,9 @@ if (! is.null(magpie_reporting_file) && file.exists(magpie_reporting_file)) {
message("### end generation of mif files at ", Sys.time())

## produce REMIND LCOE reporting *.csv based on gdx information
if (! isTRUE(envir$cfg$gms$c_empty_model == "on") || ! grepl("^C_TESTTHAT", scenario)) {
message("### start generation of LCOE reporting at ", Sys.time())
tmp <- try(convGDX2CSV_LCOE(gdx,file=LCOE_reporting_file,scen=scenario)) # execute convGDX2MIF_LCOE
message("### end generation of LCOE reporting at ", Sys.time())
}
message("### start generation of LCOE reporting at ", Sys.time())
tmp <- try(convGDX2CSV_LCOE(gdx,file=LCOE_reporting_file,scen=scenario)) # execute convGDX2MIF_LCOE
message("### end generation of LCOE reporting at ", Sys.time())

## generate DIETER reporting if it is needed
## the reporting is appended to REMIND_generic_<scenario>.MIF in "DIETER" Sub Directory
Expand Down
Loading
Loading