Skip to content

Commit

Permalink
skip some tests for cran
Browse files Browse the repository at this point in the history
  • Loading branch information
Naeemkh committed Sep 29, 2023
1 parent d64ffa5 commit 74c7cde
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 8 deletions.
10 changes: 10 additions & 0 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
Re-Submission (September 29, 2023)

Thank you for your feedback. We have adjusted the package to skip the computationally intensive tests during CRAN checks due to the issues observed in one of the operating systems. We would like to kindly request acceptance of the package with this note, as the noted concern is specific to a single OS.

Best regards,
Naeem Khoshnevis
Research Computing and Data Services
Harvard University


Re-Submission (September 29, 2023)

Thank you for your feedback and observations. In response, and as part of this revised submission, we have instituted several modifications to address the raised concerns:
- We have eliminated an additional vignette that required extensive computation.
- We have relocated several examples to the `\donttest{}` block to avoid their execution during CRAN checks.
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-check_covar_balance.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
test_that("Covariate balance check works as expected", {

skip_on_cran()
set.seed(532)
s_data <- generate_syn_data(sample_size = 200,
outcome_sd = 10,
Expand Down
8 changes: 4 additions & 4 deletions tests/testthat/test-estimate_gps.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ test_that("estimate_gps works as expected.", {


test_that("estimate_gps merges data correctly.", {

skip_on_cran()
set.seed(895)
m_d <- generate_syn_data(sample_size = 1000)
m_d$id <- seq_along(1:nrow(m_d))
Expand All @@ -66,7 +66,7 @@ test_that("estimate_gps merges data correctly.", {
})

test_that("estimate_gps input data should include id column.", {

skip_on_cran()
set.seed(895)
m_d <- generate_syn_data(sample_size = 1000)
m_d$id <- seq_along(1:nrow(m_d))
Expand All @@ -88,7 +88,7 @@ test_that("estimate_gps input data should include id column.", {


test_that("estimate_gps residuals works as expected.", {

skip_on_cran()
set.seed(895)
m_d <- generate_syn_data(sample_size = 1000)
data_with_gps <- estimate_gps(m_d[, c("id", "w")],
Expand Down Expand Up @@ -119,7 +119,7 @@ test_that("estimate_gps residuals works as expected.", {


test_that("estimate_gps works as expected for non-overlapped ids.", {

skip_on_cran()
set.seed(895)
m_d <- generate_syn_data(sample_size = 1000)
m_d_2 <- m_d
Expand Down
5 changes: 2 additions & 3 deletions tests/testthat/test-matching_fn.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ test_that("matching_l1 functions as expected.", {
data_with_gps_test <- estimate_gps(s_data[, c("id", "w")],
s_data[, c("id", "cf1", "cf2", "cf3",
"cf4","cf5", "cf6")],
sl_lib = c("SL.xgboost","SL.earth",
"SL.gam","SL.ranger")
sl_lib = c("SL.xgboost")
)

m_d <- data_with_gps_test
Expand All @@ -33,6 +32,6 @@ test_that("matching_l1 functions as expected.", {



expect_equal(nrow(val), 6)
expect_equal(nrow(val), 1)
expect_equal(length(val), 2)
})
1 change: 1 addition & 0 deletions tests/testthat/test-train_it.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ test_that("train_it works as expected.", {
test_that("train_it works as expected (with earth).", {

skip_if_not_installed("earth")
skip_on_cran()

x <- seq(0,1,0.001)
y <- x^2 - x^3 + 4
Expand Down

0 comments on commit 74c7cde

Please sign in to comment.