Skip to content

Commit b63faed

Browse files
authored
Merge pull request #255 from StochasticTree/ci-check-hotfix
Fix python unit tests and R package code for CI checks
2 parents 4c027df + f550880 commit b63faed

File tree

5 files changed

+383
-389
lines changed

5 files changed

+383
-389
lines changed

R/posterior_transformation.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,9 +419,11 @@ compute_contrast_bart_model <- function(
419419
if (!is.matrix(rfx_basis_0) || !is.matrix(rfx_basis_1)) {
420420
stop("'rfx_basis_0' and 'rfx_basis_1' must be matrices")
421421
}
422-
if ((nrow(rfx_basis_0) != nrow(X)) || (nrow(rfx_basis_1) != nrow(X))) {
422+
if (
423+
(nrow(rfx_basis_0) != nrow(X_0)) || (nrow(rfx_basis_1) != nrow(X_1))
424+
) {
423425
stop(
424-
"'rfx_basis_0' and 'rfx_basis_1' must have the same number of rows as 'X'"
426+
"'rfx_basis_0' and 'rfx_basis_1' must have the same number of rows as 'X_0' and 'X_1'"
425427
)
426428
}
427429
if (

test/R/testthat/test-api-combinations.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ test_that("Quick check of interactions between components of BART functionality"
372372
skip_on_cran()
373373
# Code from: https://github.com/r-lib/testthat/blob/main/R/skip.R
374374
skip_if(
375-
isTRUE(as.logical(Sys.getenv("RUN_SLOW_TESTS", "false"))),
375+
isFALSE(as.logical(Sys.getenv("RUN_SLOW_TESTS", "false"))),
376376
"skipping slow tests"
377377
)
378378

@@ -554,7 +554,7 @@ test_that("Quick check of interactions between components of BCF functionality",
554554
skip_on_cran()
555555
# Code from: https://github.com/r-lib/testthat/blob/main/R/skip.R
556556
skip_if(
557-
isTRUE(as.logical(Sys.getenv("RUN_SLOW_TESTS", "false"))),
557+
isFALSE(as.logical(Sys.getenv("RUN_SLOW_TESTS", "false"))),
558558
"skipping slow tests"
559559
)
560560

0 commit comments

Comments
 (0)