Skip to content

Commit

Permalink
CRAN fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mdancho84 committed Sep 19, 2023
1 parent b062fc8 commit b902278
Show file tree
Hide file tree
Showing 12 changed files with 27 additions and 21 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ Imports:
tsfeatures,
hms,
assertthat,
generics
generics,
tidymodels
Suggests:
modeltime,
tidymodels,
glmnet,
workflows,
parsnip,
Expand Down
23 changes: 14 additions & 9 deletions tests/testthat.R
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
library(testthat)
library(timetk)
library(dplyr)
library(tidyr)
library(ggplot2)
library(stringr)
library(lubridate)
library(zoo)

# Forecast objects
library(forecast)
library(fracdiff)
library(timeDate)
library(tseries)
library(timeSeries)

# Feature engineering
library(recipes)

# Time Series
library(lubridate)
library(zoo)
library(timetk)

# Other
library(stringr)
library(dplyr)
library(tidyr)
library(ggplot2)

library(testthat)

test_check("timetk")
3 changes: 2 additions & 1 deletion tests/testthat/test-recipes-step_timeseries_signature.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
context("Test recipe: step_timeseries_signature()")


FB_tbl <- FANG %>% filter(symbol == "FB") %>%
FB_tbl <- FANG %>%
dplyr::filter(symbol == "FB") %>%
mutate(date_2 = date + dyears(1))

rec_obj <- recipe(adjusted ~ ., data = FB_tbl) %>%
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-tk_augment_timeseries.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
context("Testing tk_augment_timeseries_signature function")

FB_tbl <- FANG %>%
filter(symbol == "FB")
dplyr::filter(symbol == "FB")

test_tbl <- FB_tbl

Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-tk_index.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
context("Testing tk_index")

FB_tbl <- FANG %>% filter(symbol == "FB")
FB_tbl <- FANG %>% dplyr::filter(symbol == "FB")
FB_xts <- FB_tbl %>% tk_xts(silent = TRUE)
FB_zoo <- FB_tbl %>% tk_zoo(silent = TRUE)
FB_zooreg <- FB_tbl %>% tk_zooreg(start = 2015, freq = 252, silent = TRUE)
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-tk_make_timeseries_future-OLD.R
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ test_that("tk_make_future_timeseries(datetime) test returns correct format.", {
})

test_date <- FANG %>%
filter(symbol == "FB") %>%
dplyr::filter(symbol == "FB") %>%
tk_index()

test_that("tk_make_future_timeseries(date) test returns correct format.", {
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-tk_make_timeseries_future.R
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ test_that("tk_make_future_timeseries(date) test returns correct format.", {


test_date <- FANG %>%
filter(symbol == "FB") %>%
dplyr::filter(symbol == "FB") %>%
tk_index()

# DAILY SCALE ----
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-tk_tbl.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
context("Test tk_tbl")

FB_tbl <- FANG %>% filter(symbol == "FB")
FB_tbl <- FANG %>% dplyr::filter(symbol == "FB")

# FUNCTION: tk_tbl -----

Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-tk_ts.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
context("Test tk_ts")

FB_tbl <- FANG %>% filter(symbol == "FB")
FB_tbl <- FANG %>% dplyr::filter(symbol == "FB")
FB_xts <- tk_xts(FB_tbl, silent = TRUE)
FB_zoo <- tk_zoo(FB_tbl, silent = TRUE)

Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-tk_xts.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
context("Test tk_xts")

FB_tbl <- FANG %>% filter(symbol == "FB")
FB_tbl <- FANG %>% dplyr::filter(symbol == "FB")
FB_zoo <- tk_zoo(FB_tbl, silent = TRUE)

# FUNCTION: tk_xts -----
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-tk_zoo.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
context("Test tk_zoo")

FB_tbl <- FANG %>% filter(symbol == "FB")
FB_tbl <- FANG %>% dplyr::filter(symbol == "FB")
FB_xts <- tk_xts(FB_tbl, silent = TRUE)

# FUNCTION: tk_zoo -----
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-tk_zooreg.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
library(timetk)
context("Test tk_zooreg")

FB_tbl <- FANG %>% filter(symbol == "FB")
FB_tbl <- FANG %>% dplyr::filter(symbol == "FB")
FB_xts <- FB_tbl %>% tk_xts(silent = TRUE)

# FUNCTION: tk_zooreg -----
Expand Down

0 comments on commit b902278

Please sign in to comment.