From 0906e63f4878af5ec83140baf9ebfa00510ef963 Mon Sep 17 00:00:00 2001 From: Michael Chirico Date: Thu, 13 Jun 2024 15:56:54 -0700 Subject: [PATCH 1/4] Optionally skip test requiring irlba --- tests/testthat/test_Rtsne.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/testthat/test_Rtsne.R b/tests/testthat/test_Rtsne.R index 9341c26..8f159fa 100644 --- a/tests/testthat/test_Rtsne.R +++ b/tests/testthat/test_Rtsne.R @@ -136,7 +136,8 @@ test_that("partial_pca FALSE and TRUE give similar results", { set.seed(42) tsne_out_prcomp <- Rtsne(fat_data, max_iter = iter_equal) - + + skip_if_not_installed("irlba") set.seed(42) tsne_out_irlba <- Rtsne(fat_data, partial_pca = T, max_iter = iter_equal) From 2ec8e7b69e67cf17751e125de6c0a3b70ac39188 Mon Sep 17 00:00:00 2001 From: Michael Chirico Date: Fri, 14 Jun 2024 09:24:44 -0700 Subject: [PATCH 2/4] skip full test --- tests/testthat/test_Rtsne.R | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/testthat/test_Rtsne.R b/tests/testthat/test_Rtsne.R index 8f159fa..f4b50d2 100644 --- a/tests/testthat/test_Rtsne.R +++ b/tests/testthat/test_Rtsne.R @@ -126,6 +126,7 @@ test_that("Continuing from initialization gives approximately the same result as }) test_that("partial_pca FALSE and TRUE give similar results", { + skip_if_not_installed("irlba") # Only first few iterations iter_equal <- 5 @@ -136,8 +137,6 @@ test_that("partial_pca FALSE and TRUE give similar results", { set.seed(42) tsne_out_prcomp <- Rtsne(fat_data, max_iter = iter_equal) - - skip_if_not_installed("irlba") set.seed(42) tsne_out_irlba <- Rtsne(fat_data, partial_pca = T, max_iter = iter_equal) From 0d2fa7319afcbaffd1de91c090cfbb1ea315fedf Mon Sep 17 00:00:00 2001 From: Michael Chirico Date: Fri, 14 Jun 2024 09:25:08 -0700 Subject: [PATCH 3/4] restore ws --- tests/testthat/test_Rtsne.R | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/testthat/test_Rtsne.R b/tests/testthat/test_Rtsne.R index f4b50d2..32c53bd 100644 --- a/tests/testthat/test_Rtsne.R +++ b/tests/testthat/test_Rtsne.R @@ -137,6 +137,7 @@ test_that("partial_pca FALSE and TRUE give similar results", { set.seed(42) tsne_out_prcomp <- Rtsne(fat_data, max_iter = iter_equal) + set.seed(42) tsne_out_irlba <- Rtsne(fat_data, partial_pca = T, max_iter = iter_equal) From 16575185edf0e77e32cb29cfdd656120d2b0698b Mon Sep 17 00:00:00 2001 From: Michael Chirico Date: Fri, 14 Jun 2024 09:25:30 -0700 Subject: [PATCH 4/4] really, really restore ws :) --- tests/testthat/test_Rtsne.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/testthat/test_Rtsne.R b/tests/testthat/test_Rtsne.R index 32c53bd..34b7f8d 100644 --- a/tests/testthat/test_Rtsne.R +++ b/tests/testthat/test_Rtsne.R @@ -137,7 +137,7 @@ test_that("partial_pca FALSE and TRUE give similar results", { set.seed(42) tsne_out_prcomp <- Rtsne(fat_data, max_iter = iter_equal) - + set.seed(42) tsne_out_irlba <- Rtsne(fat_data, partial_pca = T, max_iter = iter_equal)