Skip to content

Commit

Permalink
fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
doserjef committed Sep 1, 2024
1 parent acecd18 commit 8ba3b50
Show file tree
Hide file tree
Showing 16 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion tests/testthat/test-PGOcc.R
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ test_that("default priors, inits, burn, thin work", {
data = data.list,
n.samples = n.samples,
parallel.chains = TRUE,
n.chains = 3,
n.chains = 1,
n.omp.threads = 1,
verbose = FALSE)
expect_s3_class(out, "PGOcc")
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-intPGOcc.R
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ test_that("individual data set cv works", {
n.report = 100,
n.burn = 500,
n.thin = 2,
n.chains = 2,
n.chains = 1,
k.fold = 2,
k.fold.data = 2)
expect_equal(length(out$k.fold.deviance), 1)
Expand Down Expand Up @@ -492,7 +492,7 @@ out <- intPGOcc(occ.formula = occ.formula,
n.report = 100,
n.burn = 500,
n.thin = 2,
n.chains = 2,
n.chains = 1,
k.fold = 2,
k.fold.threads = 1)

Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-lfJSDM.R
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,7 @@ out <- lfJSDM(formula = formula,
n.report = n.report,
n.burn = 400,
n.thin = 2,
n.chains = 2,
n.chains = 1,
k.fold = 2,
k.fold.threads = 1)

Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-lfMsPGOcc.R
Original file line number Diff line number Diff line change
Expand Up @@ -1077,7 +1077,7 @@ out <- lfMsPGOcc(occ.formula = occ.formula,
n.report = n.report,
n.burn = 400,
n.thin = 2,
n.chains = 2,
n.chains = 1,
k.fold = 2,
k.fold.threads = 1)

Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-msPGOcc.R
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ out <- msPGOcc(occ.formula = occ.formula,
n.report = n.report,
n.burn = 400,
n.thin = 2,
n.chains = 2,
n.chains = 1,
k.fold = 2,
k.fold.threads = 1)

Expand Down Expand Up @@ -691,7 +691,7 @@ out <- msPGOcc(occ.formula = occ.formula,
n.report = n.report,
n.burn = 400,
n.thin = 2,
n.chains = 2,
n.chains = 1,
k.fold = 2,
k.fold.threads = 1)

Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-sfMsPGOcc-NNGP.R
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ out <- sfMsPGOcc(occ.formula = occ.formula,
n.report = 10,
n.burn = 100,
n.thin = 2,
n.chains = 2,
n.chains = 1,
k.fold = 2,
k.fold.threads = 1)

Expand Down
10 changes: 5 additions & 5 deletions tests/testthat/test-spIntPGOcc-GP.R
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ test_that("verbose prints to the screen", {
data = data.list,
n.batch = n.batch,
batch.length = batch.length,
parallel.chains = TRUE,
parallel.chains = FALSE,
accept.rate = 0.43,
cov.model = "exponential",
tuning = tuning.list,
Expand Down Expand Up @@ -453,7 +453,7 @@ test_that("individual data set cv works", {
det.formula = det.formula,
data = data.list,
inits = inits.list,
parallel.chains = TRUE,
parallel.chains = FALSE,
n.batch = n.batch,
batch.length = batch.length,
accept.rate = 0.43,
Expand Down Expand Up @@ -598,7 +598,7 @@ test_that("all correlation functions work", {
det.formula = det.formula,
data = data.list,
n.batch = 40,
parallel.chains = TRUE,
parallel.chains = FALSE,
batch.length = batch.length,
cov.model = "spherical",
tuning = list(phi = 0.5),
Expand Down Expand Up @@ -877,7 +877,7 @@ test_that("missing value error handling works", {
data = tmp.data,
n.batch = 40,
batch.length = batch.length,
parallel.chains = TRUE,
parallel.chains = FALSE,
cov.model = "exponential",
tuning = tuning.list,
NNGP = FALSE,
Expand Down Expand Up @@ -988,7 +988,7 @@ test_that("all correlation functions work", {
data = data.list,
n.batch = 40,
batch.length = batch.length,
parallel.chains = TRUE,
parallel.chains = FALSE,
cov.model = "matern",
priors = list(nu.unif = c(0.5, 2)),
tuning = list(phi = 0.5, nu = 0.5),
Expand Down
8 changes: 4 additions & 4 deletions tests/testthat/test-spMsPGOcc-GP.R
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ test_that("all correlation functions work", {
data = data.list,
inits = inits.list,
n.batch = n.batch,
parallel.chains = TRUE,
parallel.chains = FALSE,
batch.length = batch.length,
accept.rate = 0.43,
priors = prior.list,
Expand Down Expand Up @@ -502,7 +502,7 @@ test_that("default priors, inits, burn, thin work", {
det.formula = det.formula,
data = data.list,
n.batch = n.batch,
parallel.chains = TRUE,
parallel.chains = FALSE,
batch.length = batch.length,
accept.rate = 0.43,
cov.model = "exponential",
Expand Down Expand Up @@ -881,7 +881,7 @@ test_that("all correlation functions work", {
det.formula = det.formula,
data = data.list,
inits = inits.list,
parallel.chains = TRUE,
parallel.chains = FALSE,
n.batch = n.batch,
batch.length = batch.length,
accept.rate = 0.43,
Expand Down Expand Up @@ -6321,7 +6321,7 @@ test_that("all correlation functions work", {
inits = inits.list,
n.batch = n.batch,
batch.length = batch.length,
parallel.chains = TRUE,
parallel.chains = FALSE,
accept.rate = 0.43,
priors = prior.list,
cov.model = "spherical",
Expand Down
8 changes: 4 additions & 4 deletions tests/testthat/test-spPGOcc-GP.R
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ test_that("all correlation functions work", {
det.formula = det.formula,
data = data.list,
n.batch = 40,
parallel.chains = TRUE,
parallel.chains = FALSE,
batch.length = batch.length,
cov.model = "gaussian",
tuning = list(phi = 0.5),
Expand Down Expand Up @@ -178,7 +178,7 @@ test_that("verbose prints to the screen", {
det.formula = det.formula,
data = data.list,
inits = inits.list,
parallel.chains = TRUE,
parallel.chains = FALSE,
n.batch = n.batch,
batch.length = batch.length,
priors = prior.list,
Expand Down Expand Up @@ -405,7 +405,7 @@ test_that("all correlation functions work", {
det.formula = det.formula,
data = data.list,
n.batch = 40,
parallel.chains = TRUE,
parallel.chains = FALSE,
batch.length = batch.length,
cov.model = "matern",
priors = list(nu.unif = c(0.5, 2)),
Expand Down Expand Up @@ -656,7 +656,7 @@ test_that("default priors and inits work", {
out <- spPGOcc(occ.formula = occ.formula,
det.formula = det.formula,
data = data.list,
parallel.chains = TRUE,
parallel.chains = FALSE,
n.batch = 40,
batch.length = batch.length,
cov.model = "exponential",
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-stPGOcc-NNGP.R
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ out <- stPGOcc(occ.formula = occ.formula,
n.neighbors = 10,
n.report = n.report,
n.burn = 100,
n.chains = 2,
n.chains = 1,
n.thin = 2,
k.fold = 2,
k.fold.threads = 2)
Expand Down
1 change: 0 additions & 1 deletion tests/testthat/test-svcPGBinom-NNGP.R
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,6 @@ test_that("default priors and inits work", {
data = data.list,
n.batch = 40,
batch.length = batch.length,
parallel.chains = TRUE,
parallel.chains = TRUE,
cov.model = "exponential",
tuning = tuning.list,
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-svcTMsPGOcc.R
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,7 @@ out <- svcTMsPGOcc(occ.formula = occ.formula,
n.report = n.report,
n.burn = 100,
n.thin = 2,
n.chains = 2)
n.chains = 1)

# Test to make sure it worked ---------
test_that("out is of class svcTMsPGOcc", {
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-svcTPGBinom-NNGP.R
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ out <- svcTPGBinom(formula = formula,
n.neighbors = 10,
n.report = n.report,
n.burn = 100,
n.chains = 2,
n.chains = 1,
n.thin = 2,
k.fold = 2,
k.fold.threads = 2)
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-svcTPGOcc-NNGP.R
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ test_that("default priors and inits work", {
search.type = 'cb',
n.report = 10,
n.burn = 100,
n.chains = 3)
n.chains = 1)
expect_s3_class(out, "svcTPGOcc")
})

Expand Down Expand Up @@ -471,7 +471,7 @@ out <- svcTPGOcc(occ.formula = occ.formula,
n.neighbors = 10,
n.report = n.report,
n.burn = 100,
n.chains = 2,
n.chains = 1,
n.thin = 2,
k.fold = 2,
k.fold.threads = 2)
Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-tMsPGOcc.R
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ test_that("default priors, inits, burn, thin work", {
n.batch = n.batch,
ar1 = FALSE,
batch.length = batch.length,
parallel.chains = TRUE,
n.omp.threads = 1,
verbose = FALSE)
expect_s3_class(out, "tMsPGOcc")
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-tPGOcc.R
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ out <- tPGOcc(occ.formula = occ.formula,
n.report = n.report,
n.burn = 400,
n.thin = 6,
n.chains = 2,
n.chains = 1,
k.fold = 2,
k.fold.threads = 1)

Expand Down

0 comments on commit 8ba3b50

Please sign in to comment.