Skip to content

Commit

Permalink
Update fastcpd 0.14.3
Browse files Browse the repository at this point in the history
*   Skip certain tests on CRAN.
  • Loading branch information
doccstat committed Apr 22, 2024
1 parent 91ef265 commit 0020f66
Show file tree
Hide file tree
Showing 12 changed files with 35 additions and 6 deletions.
7 changes: 5 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: fastcpd
Title: Fast Change Point Detection via Sequential Gradient Descent
Version: 0.14.2
Version: 0.14.3
Authors@R: c(
person("Xingchi", "Li", , "[email protected]",
role = c("aut", "cre", "cph"),
Expand Down Expand Up @@ -72,7 +72,10 @@ VignetteBuilder:
knitr
Config/testthat/edition: 3
Config/testthat/parallel: true
Config/testthat/start-first: fastcpd_arima, fastcpd_ts
Config/testthat/start-first:
vignettes-comparison-pelt,
examples-fastcpd_arima,
examples-fastcpd_ts
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.3.1
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# fastcpd 0.14.3

* Skip certain tests on CRAN.

# fastcpd 0.14.2

* Fix CRAN noSuggests error.
Expand Down
4 changes: 4 additions & 0 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## Updates since last CRAN release (0.14.1)

# fastcpd 0.14.3

* Skip certain tests on CRAN.

### fastcpd 0.14.2

* Fix CRAN noSuggests error.
2 changes: 2 additions & 0 deletions tests/testthat/test-examples-fastcpd_mean-time_1.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
testthat::test_that(
"examples/fastcpd_mean-time_1.R", {
testthat::skip_on_cran()

source("examples/fastcpd_mean-time_1.R")
testthat::expect_equal(result@cp_set, 10007)
testthat::expect_lt(result_time[3], 30)
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-examples-fastcpd_mean-time_2.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
testthat::test_that(
"examples/fastcpd_mean-time_2.txt", {
testthat::skip_on_cran()

examples_mean_time <- readLines("examples/fastcpd_mean-time_2.txt")
source(textConnection(paste(
examples_mean_time[seq_len(length(examples_mean_time) - 2) + 1],
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-examples-fastcpd_mean-time_3.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
testthat::test_that(
"examples/fastcpd_mean-time_3.txt", {
testthat::skip_on_cran()

examples_mean_time <- readLines("examples/fastcpd_mean-time_3.txt")
source(textConnection(paste(
examples_mean_time[seq_len(length(examples_mean_time) - 2) + 1],
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-examples-fastcpd_meanvariance-time_1.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
testthat::test_that(
"examples/fastcpd_meanvariance-time_1.txt", {
testthat::skip_on_cran()

examples_time <- readLines("examples/fastcpd_meanvariance-time_1.txt")
source(textConnection(paste(
examples_time[seq_len(length(examples_time) - 2) + 1],
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-examples-fastcpd_meanvariance-time_2.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
testthat::test_that(
"examples/fastcpd_meanvariance-time_2.txt", {
testthat::skip_on_cran()

examples_time <- readLines("examples/fastcpd_meanvariance-time_2.txt")
source(textConnection(paste(
examples_time[seq_len(length(examples_time) - 2) + 1],
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-examples-fastcpd_variance-time_1.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
testthat::test_that(
"examples/fastcpd_variance-time_1.txt", {
testthat::skip_on_cran()

examples_variance_time <- readLines("examples/fastcpd_variance-time_1.txt")
source(textConnection(paste(
examples_variance_time[seq_len(length(examples_variance_time) - 2) + 1],
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-examples-fastcpd_variance-time_2.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
testthat::test_that(
"examples/fastcpd_variance-time_2.txt", {
testthat::skip_on_cran()

examples_variance_time <- readLines("examples/fastcpd_variance-time_2.txt")
source(textConnection(paste(
examples_variance_time[seq_len(length(examples_variance_time) - 2) + 1],
Expand Down
10 changes: 6 additions & 4 deletions tests/testthat/test-vignettes-comparison-pelt.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Everything in this script is provided as is. The purpose of this script is to
# do a sanity check on the C++ implementation of `fastcpd`.

testthat::skip("Skip due to time limit on CRAN.")
testthat::skip_on_cran()

# nolint start: script provided as is

Expand Down Expand Up @@ -44,7 +44,7 @@ testthat::test_that("logistic regression", {
rep(c(
"fit_glm: algorithm did not converge",
"fit_glm: fitted probabilities numerically 0 or 1 occurred"
), c(6, 3984))
), c(6, 3983))
)

testthat::expect_equal(change_points_binomial_fastcpd_vanilla, 125)
Expand Down Expand Up @@ -186,7 +186,8 @@ testthat::test_that("penalized linear regression", {
cbind(data[, d + 1], data[, 1:d]),
epsilon = 1e-5,
beta = beta,
cost_adjustment = "BIC"
cost_adjustment = "BIC",
pruning_coef = 0
)@cp_set

testthat::expect_equal(
Expand All @@ -199,7 +200,8 @@ testthat::test_that("penalized linear regression", {
vanilla_percentage = 1,
epsilon = 1e-5,
beta = beta,
cost_adjustment = "BIC"
cost_adjustment = "BIC",
pruning_coef = 0
)@cp_set

testthat::expect_equal(
Expand Down
2 changes: 2 additions & 0 deletions vignettes/comparison-pelt.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -934,6 +934,7 @@ fastcpd.lasso(
epsilon = 1e-5,
beta = beta,
cost_adjustment = "BIC",
pruning_coef = 0,
r.progress = FALSE
)@cp_set
#> [1] 100 300 520 800 901
Expand All @@ -957,6 +958,7 @@ fastcpd.lasso(
epsilon = 1e-5,
beta = beta,
cost_adjustment = "BIC",
pruning_coef = 0,
r.progress = FALSE
)@cp_set
#> [1] 103 299 510 800 900
Expand Down

0 comments on commit 0020f66

Please sign in to comment.