Skip to content

Commit 96a64b1

Browse files
committed
fix space issue and set seed
1 parent 1bee7f2 commit 96a64b1

16 files changed

+63
-16
lines changed

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Package: casebase
22
Type: Package
33
Title: Fitting Flexible Smooth-in-Time Hazards and Risk Functions via Logistic and Multinomial Regression
4-
Version: 0.10.4
5-
Date: 2024-02-01
4+
Version: 0.10.5
5+
Date: 2024-04-09
66
Authors@R:
77
c(person(given = "Sahir",
88
family = "Bhatnagar",

NEWS.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# casebase 0.10.5
2+
3+
* Skip tests when R is compiled against ATLAS BLAS
4+
* Set seed for reproducible tests
5+
16
# casebase 0.10.4
27

38
* Fix bug with tangled outputs of vignettes.

tests/testthat/test-absRisk.R

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
context("Absolute risk")
2+
set.seed(12345)
3+
24
# CRAN skip atlas check fix
3-
testthat::skip_if(grepl(pattern = "atlas",sessionInfo()$BLAS,ignore.case=TRUE))
5+
testthat::skip_if(grepl(pattern = "atlas", sessionInfo()$BLAS,
6+
ignore.case = TRUE))
47

58
# Handling warning messages coming from montecarlo integration
69
handler_validmc <- function(msg) {

tests/testthat/test-absRiskComp.R

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
context("Absolute risk-Comp risk")
2+
set.seed(12345)
3+
24
# CRAN skip atlas check fix
3-
testthat::skip_if(grepl(pattern = "atlas",sessionInfo()$BLAS,ignore.case=TRUE))
5+
testthat::skip_if(grepl(pattern = "atlas", sessionInfo()$BLAS,
6+
ignore.case = TRUE))
47

58
# Handling warning messages coming from montecarlo integration
69
handler_validmc <- function(msg) {

tests/testthat/test-confint.R

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
context("Confidence intervals")
2+
set.seed(12345)
3+
4+
# CRAN skip atlas check fix
5+
testthat::skip_if(grepl(pattern = "atlas", sessionInfo()$BLAS,
6+
ignore.case = TRUE))
7+
18
# Handling warning messages coming from montecarlo integration
29
handler_validmc <- function(msg) {
310
if (any(grepl("out of range", msg))) invokeRestart("muffleWarning")

tests/testthat/test-fitting.R

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
context("Fitting")
2+
set.seed(12345)
3+
24
# CRAN skip atlas check fix
3-
testthat::skip_if(grepl(pattern = "atlas",sessionInfo()$BLAS,ignore.case=TRUE))
5+
testthat::skip_if(grepl(pattern = "atlas", sessionInfo()$BLAS,
6+
ignore.case = TRUE))
47

58

69
n <- 100

tests/testthat/test-fittingComp.R

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
context("Fitting-Comp risk")
2+
set.seed(12345)
3+
24
# CRAN skip atlas check fix
3-
testthat::skip_if(grepl(pattern = "atlas",sessionInfo()$BLAS,ignore.case=TRUE))
5+
testthat::skip_if(grepl(pattern = "atlas", sessionInfo()$BLAS,
6+
ignore.case = TRUE))
47

58

69
n <- 100

tests/testthat/test-gam.R

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
context("GAMs")
2+
set.seed(12345)
3+
24
# CRAN skip atlas check fix
3-
testthat::skip_if(grepl(pattern = "atlas",sessionInfo()$BLAS,ignore.case=TRUE))
5+
testthat::skip_if(grepl(pattern = "atlas", sessionInfo()$BLAS,
6+
ignore.case = TRUE))
47

58
# Skip tests if mgcv is not installed
69
testthat::skip_if_not_installed("mgcv")

tests/testthat/test-gbm.R

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
context("GBMs")
2+
set.seed(12345)
3+
4+
testthat::skip_if(TRUE, message = 'GBM is not implemented')
5+
26
# CRAN skip atlas check fix
3-
testthat::skip_if(grepl(pattern = "atlas",sessionInfo()$BLAS,ignore.case=TRUE))
7+
testthat::skip_if(grepl(pattern = "atlas", sessionInfo()$BLAS,
8+
ignore.case = TRUE))
49

510
# Skip tests if gbm is not installed
611
testthat::skip_if_not_installed("gbm")

tests/testthat/test-glmnet.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
context("glmnet")
2+
set.seed(12345)
23

34
# CRAN skip atlas check fix
4-
testthat::skip_if(grepl(pattern = "atlas",sessionInfo()$BLAS,ignore.case=TRUE))
5+
testthat::skip_if(grepl(pattern = "atlas", sessionInfo()$BLAS,
6+
ignore.case = TRUE))
57

68
# Skip tests if gbm is not installed
79
testthat::skip_if_not_installed("glmnet")

0 commit comments

Comments
 (0)