Skip to content

Commit

Permalink
windows absurdly slow; skip damn near everything
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicholas Clark committed May 1, 2024
1 parent 34c5c41 commit 08eff8f
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 13 deletions.
4 changes: 2 additions & 2 deletions tests/testthat/test-dynamic.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
context("dynamic")

skip_on_cran()

test_that("dynamic to gp spline is working properly", {
expect_match(attr(terms(mvgam:::interpret_mvgam(formula = y ~ dynamic(covariate, rho = 1,
stationary = FALSE),
Expand Down Expand Up @@ -76,7 +78,6 @@ test_that("rho argument cannot be larger than N - 1", {
})

test_that("dynamic to spline works for trend_formulas", {
skip_on_cran()
beta_data$data_train$random <- rnorm(NROW(beta_data$data_train))
mod <- mvgam(y ~ dynamic(random, rho = 5),
trend_formula = ~ dynamic(random, rho = 15),
Expand All @@ -92,7 +93,6 @@ test_that("dynamic to spline works for trend_formulas", {
})

test_that("dynamic to Hilbert works for trend_formulas", {
skip_on_cran()
beta_data$data_train$random <- rnorm(NROW(beta_data$data_train))
mod <- mvgam(y ~ dynamic(random),
trend_formula = ~ dynamic(random, k = 22),
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-gp.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
context("gp")

skip_on_cran()

test_that("gp_to_s is working properly", {
# All true gp() terms should be changed to s() with k = k+1
formula <- y ~ s(series) + gp(banana) +
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-marginaleffects.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
context("marginaleffects")

skip_on_cran()

test_that("data_grid gives expected output structure", {
# Dataframe example
simdat <- sim_mvgam(n_series = 3, prop_trend = 1,
Expand Down Expand Up @@ -42,7 +44,6 @@ test_that("get_data gives expected output structure", {
})

test_that("get_predict gives expected output structure", {
skip_on_cran()
preds <- get_predict(mvgam:::mvgam_example4)
expect_equal(NROW(preds), NROW(mvgam:::mvgam_example4$obs_data))

Expand All @@ -51,7 +52,6 @@ test_that("get_predict gives expected output structure", {
})

test_that("averages give expected output structures", {
skip_on_cran()
ems <- avg_predictions(mvgam:::mvgam_example3)
expect_equal(NROW(ems), 1)
expect_true(all(c("estimate", "conf.low", "conf.high") %in% colnames(ems)))
Expand Down
11 changes: 2 additions & 9 deletions tests/testthat/test-mvgam.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
context("mvgam")

skip_on_cran()

# JAGS setup should work, whether installed or not
test_that("JAGS setups work", {
skip_on_cran()
simdat <- sim_mvgam()
mod <- mvgam(y ~ s(season),
trend_model = 'RW',
Expand Down Expand Up @@ -100,7 +100,6 @@ test_that("response variable must be specified", {
})

test_that("prior_only works", {
skip_on_cran()
mod <- mvgam(y ~ s(season),
trend_model = AR(p = 2),
drift = TRUE,
Expand Down Expand Up @@ -308,7 +307,6 @@ test_that("series levels must match unique entries in series", {
})

test_that("share_obs_params working", {
skip_on_cran()
# Standard beta
mod <- mvgam(y ~ s(season, by = series),
trend_model = RW(cor = TRUE),
Expand Down Expand Up @@ -447,7 +445,6 @@ test_that("share_obs_params working", {
})

test_that("trend_map is behaving propoerly", {
skip_on_cran()
sim <- sim_mvgam(n_series = 3)
mod_data <- sim$data_train
trend_map <- data.frame(series = unique(mod_data$series),
Expand Down Expand Up @@ -475,7 +472,6 @@ test_that("trend_map is behaving propoerly", {
})

test_that("models with only random effects should work without error", {
skip_on_cran()
sim <- sim_mvgam(n_series = 3)
mod_data <- sim$data_train
mod_map <- mvgam(y ~ s(series, bs = 're'),
Expand All @@ -485,7 +481,6 @@ test_that("models with only random effects should work without error", {
})

test_that("models with only fs smooths should work without error", {
skip_on_cran()
sim <- sim_mvgam(n_series = 3)
mod_data <- sim$data_train
mod_map <- mvgam(y ~ s(season, series, bs = 'fs'),
Expand All @@ -495,7 +490,6 @@ test_that("models with only fs smooths should work without error", {
})

test_that("trend_formula setup is working properly", {
skip_on_cran()
sim <- sim_mvgam(n_series = 3)
mod_data <- sim$data_train
mod_map <- mvgam(y ~ s(series, bs = 're'),
Expand Down Expand Up @@ -536,7 +530,6 @@ test_that("trend_formula setup is working properly", {
# Check that parametric effect priors are properly incorporated in the
# model for a wide variety of model forms
test_that("parametric effect priors correctly incorporated in models", {
skip_on_cran()
mod_data <- mvgam:::mvgam_examp_dat
mod_data$data_train$x1 <-
rnorm(NROW(mod_data$data_train))
Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-piecewise.R
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ df <- rbind(data.frame(y = y,
fake = rnorm(100)))

test_that("logistic caps should be included in the correct order", {
skip_on_cran()
mod <- mvgam(formula = y ~ 0,
data = df,
trend_model = PW(growth = 'logistic',
Expand Down

0 comments on commit 08eff8f

Please sign in to comment.