Skip to content

Commit

Permalink
update integration tests with latest code from the main branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Bai-Li-NOAA authored and Andrea-Havron-NOAA committed Aug 22, 2024
1 parent d06064d commit 22b64b6
Show file tree
Hide file tree
Showing 4 changed files with 435 additions and 517 deletions.
Binary file modified tests/testthat/fixtures/integration_test_data.RData
Binary file not shown.
12 changes: 6 additions & 6 deletions tests/testthat/fixtures/simulate-integration-test-data.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,21 @@ maindir <- tempdir()
model_input <- ASSAMC::save_initial_input()

# Configure the input parameters for the simulation
sim_num <- 100
FIMS_100iter <- ASSAMC::save_initial_input(
sim_num <- 150
sim_input <- ASSAMC::save_initial_input(
base_case = TRUE,
input_list = model_input,
maindir = maindir,
om_sim_num = sim_num,
keep_sim_num = sim_num,
figure_number = 1,
seed_num = 9924,
case_name = "FIMS_100iter"
case_name = "sim_data"
)

# Run OM and generate om_input, om_output, and em_input
# using function from the model comparison project
ASSAMC::run_om(input_list = FIMS_100iter)
ASSAMC::run_om(input_list = sim_input)

on.exit(unlink(maindir, recursive = TRUE), add = TRUE)

Expand All @@ -37,12 +37,12 @@ on.exit(setwd(working_dir), add = TRUE)
om_input_list <- om_output_list <- em_input_list <-
vector(mode = "list", length = sim_num)
for (i in 1:sim_num) {
load(file.path(maindir, "FIMS_100iter", "output", "OM", paste0("OM", i, ".RData")))
load(file.path(maindir, "sim_data", "output", "OM", paste0("OM", i, ".RData")))
om_input_list[[i]] <- om_input
om_output_list[[i]] <- om_output
em_input_list[[i]] <- em_input
}

save(om_input_list, om_output_list, em_input_list,
file = test_path("fixtures", "integration_test_data.RData")
)
)
Loading

0 comments on commit 22b64b6

Please sign in to comment.