Skip to content

Commit

Permalink
skip some tests in CRAN
Browse files Browse the repository at this point in the history
  • Loading branch information
ygeunkim committed Feb 6, 2025
1 parent c81790e commit c0889af
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 5 deletions.
8 changes: 3 additions & 5 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
12 changes: 12 additions & 0 deletions tests/testthat/test-spillover.R
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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)
Expand Down
30 changes: 30 additions & 0 deletions tests/testthat/test-var-bayes.R
Original file line number Diff line number Diff line change
@@ -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],
Expand All @@ -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],
Expand All @@ -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],
Expand All @@ -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],
Expand All @@ -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],
Expand All @@ -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],
Expand All @@ -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],
Expand All @@ -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],
Expand All @@ -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],
Expand All @@ -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],
Expand All @@ -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],
Expand All @@ -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],
Expand All @@ -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],
Expand All @@ -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],
Expand All @@ -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
Expand Down
30 changes: 30 additions & 0 deletions tests/testthat/test-vhar-bayes.R
Original file line number Diff line number Diff line change
@@ -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],
Expand All @@ -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],
Expand All @@ -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],
Expand All @@ -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],
Expand All @@ -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],
Expand All @@ -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],
Expand All @@ -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],
Expand All @@ -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],
Expand All @@ -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],
Expand All @@ -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],
Expand All @@ -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],
Expand All @@ -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],
Expand All @@ -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],
Expand All @@ -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],
Expand All @@ -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
Expand Down

0 comments on commit c0889af

Please sign in to comment.