From c0889af12a02516c14166e9e837507622c3f58c7 Mon Sep 17 00:00:00 2001 From: Young Geun Kim Date: Thu, 6 Feb 2025 05:06:26 -0800 Subject: [PATCH] skip some tests in CRAN --- cran-comments.md | 8 +++----- tests/testthat/test-spillover.R | 12 ++++++++++++ tests/testthat/test-var-bayes.R | 30 ++++++++++++++++++++++++++++++ tests/testthat/test-vhar-bayes.R | 30 ++++++++++++++++++++++++++++++ 4 files changed, 75 insertions(+), 5 deletions(-) diff --git a/cran-comments.md b/cran-comments.md index eaadcffd..dac50dbe 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,10 +1,8 @@ -## Patch version update +## Minor version update -This is a quick fix for fatal algorithm fault. -In this version, we +## Round 2 -- Fixed MCMC algorithm when constant term exists. -- Fixed Forecasting algorithm for MCMC objects. +- Skipped some CPU-intensive tests on CRAN to prevent excessive resource usage in CRAN test environments. ## Test environments diff --git a/tests/testthat/test-spillover.R b/tests/testthat/test-spillover.R index 3906a57a..326c3dce 100644 --- a/tests/testthat/test-spillover.R +++ b/tests/testthat/test-spillover.R @@ -1,6 +1,8 @@ # spillover() and dynamic_spillover()-------------- test_that("VAR-Spillover", { skip_on_ci() + skip_on_cran() + num_row <- 30 win_size <- 29 num_col <- 2 @@ -16,6 +18,8 @@ test_that("VAR-Spillover", { test_that("VHAR-Spillover", { skip_on_ci() + skip_on_cran() + num_row <- 30 win_size <- 29 num_col <- 2 @@ -31,6 +35,8 @@ test_that("VHAR-Spillover", { test_that("VAR-LDLT-Spillover", { skip_on_ci() + skip_on_cran() + num_row <- 30 win_size <- 29 num_col <- 2 @@ -55,6 +61,8 @@ test_that("VAR-LDLT-Spillover", { test_that("VHAR-LDLT-Spillover", { skip_on_ci() + skip_on_cran() + num_row <- 30 win_size <- 29 num_col <- 2 @@ -78,6 +86,8 @@ test_that("VHAR-LDLT-Spillover", { test_that("VAR-SV-Spillover", { skip_on_ci() + skip_on_cran() + num_row <- 30 num_col <- 2 var_lag <- 1 @@ -98,6 +108,8 @@ test_that("VAR-SV-Spillover", { test_that("VHAR-SV-Spillover", { skip_on_ci() + skip_on_cran() + num_row <- 30 num_col <- 2 har_lag <- c(5, 22) diff --git a/tests/testthat/test-var-bayes.R b/tests/testthat/test-var-bayes.R index 82ade5b8..7290505d 100644 --- a/tests/testthat/test-var-bayes.R +++ b/tests/testthat/test-var-bayes.R @@ -1,5 +1,7 @@ # var_bayes()------------------------- test_that("VAR-Minn-LDLT", { + skip_on_cran() + set.seed(1) fit_test <- var_bayes( etf_vix[1:50, 1:2], @@ -14,6 +16,8 @@ test_that("VAR-Minn-LDLT", { }) test_that("VAR-HS-LDLT", { + skip_on_cran() + set.seed(1) fit_test <- var_bayes( etf_vix[1:50, 1:2], @@ -29,6 +33,8 @@ test_that("VAR-HS-LDLT", { }) test_that("VAR-SSVS-LDLT", { + skip_on_cran() + set.seed(1) fit_test <- var_bayes( etf_vix[1:50, 1:2], @@ -44,6 +50,8 @@ test_that("VAR-SSVS-LDLT", { }) test_that("VAR-Hierminn-LDLT", { + skip_on_cran() + set.seed(1) fit_test <- var_bayes( etf_vix[1:50, 1:2], @@ -58,6 +66,8 @@ test_that("VAR-Hierminn-LDLT", { }) test_that("VAR-NG-LDLT", { + skip_on_cran() + set.seed(1) fit_test <- var_bayes( etf_vix[1:50, 1:2], @@ -73,6 +83,8 @@ test_that("VAR-NG-LDLT", { }) test_that("VAR-DL-LDLT", { + skip_on_cran() + set.seed(1) fit_test <- var_bayes( etf_vix[1:50, 1:2], @@ -88,6 +100,8 @@ test_that("VAR-DL-LDLT", { }) test_that("VAR-GDP-LDLT", { + skip_on_cran() + set.seed(1) fit_test <- var_bayes( etf_vix[1:50, 1:2], @@ -103,6 +117,8 @@ test_that("VAR-GDP-LDLT", { }) test_that("VAR-Minn-SV", { + skip_on_cran() + set.seed(1) fit_test <- var_bayes( etf_vix[1:50, 1:2], @@ -117,6 +133,8 @@ test_that("VAR-Minn-SV", { }) test_that("VAR-HS-LDLT", { + skip_on_cran() + set.seed(1) fit_test <- var_bayes( etf_vix[1:50, 1:2], @@ -132,6 +150,8 @@ test_that("VAR-HS-LDLT", { }) test_that("VAR-SSVS-SV", { + skip_on_cran() + set.seed(1) fit_test <- var_bayes( etf_vix[1:50, 1:2], @@ -147,6 +167,8 @@ test_that("VAR-SSVS-SV", { }) test_that("VAR-Hierminn-SV", { + skip_on_cran() + set.seed(1) fit_test <- var_bayes( etf_vix[1:50, 1:2], @@ -161,6 +183,8 @@ test_that("VAR-Hierminn-SV", { }) test_that("VAR-NG-SV", { + skip_on_cran() + set.seed(1) fit_test <- var_bayes( etf_vix[1:50, 1:2], @@ -176,6 +200,8 @@ test_that("VAR-NG-SV", { }) test_that("VAR-DL-SV", { + skip_on_cran() + set.seed(1) fit_test <- var_bayes( etf_vix[1:50, 1:2], @@ -191,6 +217,8 @@ test_that("VAR-DL-SV", { }) test_that("VAR-DL-SV", { + skip_on_cran() + set.seed(1) fit_test <- var_bayes( etf_vix[1:50, 1:2], @@ -206,6 +234,8 @@ test_that("VAR-DL-SV", { }) test_that("Multi chain", { + skip_on_cran() + set.seed(1) iter_test <- 5 chain_test <- 2 diff --git a/tests/testthat/test-vhar-bayes.R b/tests/testthat/test-vhar-bayes.R index e43a1e77..5bb62f16 100644 --- a/tests/testthat/test-vhar-bayes.R +++ b/tests/testthat/test-vhar-bayes.R @@ -1,5 +1,7 @@ # vhar_bayes()------------------------- test_that("VHAR-Minn-LDLT", { + skip_on_cran() + set.seed(1) fit_test <- vhar_bayes( etf_vix[1:50, 1:2], @@ -13,6 +15,8 @@ test_that("VHAR-Minn-LDLT", { }) test_that("VHAR-HS-LDLT", { + skip_on_cran() + set.seed(1) fit_test <- vhar_bayes( etf_vix[1:50, 1:2], @@ -27,6 +31,8 @@ test_that("VHAR-HS-LDLT", { }) test_that("VHAR-SSVS-LDLT", { + skip_on_cran() + set.seed(1) fit_test <- vhar_bayes( etf_vix[1:50, 1:2], @@ -41,6 +47,8 @@ test_that("VHAR-SSVS-LDLT", { }) test_that("VHAR-Hierminn-LDLT", { + skip_on_cran() + set.seed(1) fit_test <- vhar_bayes( etf_vix[1:50, 1:2], @@ -54,6 +62,8 @@ test_that("VHAR-Hierminn-LDLT", { }) test_that("VHAR-NG-LDLT", { + skip_on_cran() + set.seed(1) fit_test <- vhar_bayes( etf_vix[1:50, 1:2], @@ -68,6 +78,8 @@ test_that("VHAR-NG-LDLT", { }) test_that("VHAR-DL-LDLT", { + skip_on_cran() + set.seed(1) fit_test <- vhar_bayes( etf_vix[1:50, 1:2], @@ -82,6 +94,8 @@ test_that("VHAR-DL-LDLT", { }) test_that("VHAR-GDP-LDLT", { + skip_on_cran() + set.seed(1) fit_test <- vhar_bayes( etf_vix[1:50, 1:2], @@ -96,6 +110,8 @@ test_that("VHAR-GDP-LDLT", { }) test_that("Members - VHAR-Minn-SV", { + skip_on_cran() + set.seed(1) fit_test <- vhar_bayes( etf_vix[1:50, 1:2], @@ -109,6 +125,8 @@ test_that("Members - VHAR-Minn-SV", { }) test_that("Members - VHAR-HS-SV", { + skip_on_cran() + set.seed(1) fit_test <- vhar_bayes( etf_vix[1:50, 1:2], @@ -123,6 +141,8 @@ test_that("Members - VHAR-HS-SV", { }) test_that("Members - VHAR-SSVS-SV", { + skip_on_cran() + set.seed(1) fit_test <- vhar_bayes( etf_vix[1:50, 1:2], @@ -137,6 +157,8 @@ test_that("Members - VHAR-SSVS-SV", { }) test_that("Members - VHAR-Hierminn-SV", { + skip_on_cran() + set.seed(1) fit_test <- vhar_bayes( etf_vix[1:50, 1:2], @@ -150,6 +172,8 @@ test_that("Members - VHAR-Hierminn-SV", { }) test_that("Members - VHAR-NG-SV", { + skip_on_cran() + set.seed(1) fit_test <- vhar_bayes( etf_vix[1:50, 1:2], @@ -164,6 +188,8 @@ test_that("Members - VHAR-NG-SV", { }) test_that("Members - VHAR-DL-SV", { + skip_on_cran() + set.seed(1) fit_test <- vhar_bayes( etf_vix[1:50, 1:2], @@ -178,6 +204,8 @@ test_that("Members - VHAR-DL-SV", { }) test_that("Members - VHAR-GDP-SV", { + skip_on_cran() + set.seed(1) fit_test <- vhar_bayes( etf_vix[1:50, 1:2], @@ -192,6 +220,8 @@ test_that("Members - VHAR-GDP-SV", { }) test_that("Multi chain", { + skip_on_cran() + set.seed(1) iter_test <- 5 chain_test <- 2