Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,10 @@ Suggests:
rsample,
scales,
snakecase,
testthat (>= 2.1.0),
testthat (>= 3.0.0),
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't know if you have a preference for this update version.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Praise] Nope, this looks great!

tidyr,
tune,
workflows,
yardstick
RoxygenNote: 7.2.3
Config/testthat/edition: 3
2 changes: 1 addition & 1 deletion tests/testthat/helper-lightgbm.R
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ expect_can_tune_boost_tree <- function(model) {
expect_true(all(!is.nan(tune::collect_metrics(adj)$mean)))

final <- model %>%
tune::finalize_model(tune::select_best(adj)) %>%
tune::finalize_model(tune::select_best(adj, metric = "rmse")) %>%
parsnip::set_mode("regression") %>%
parsnip::fit(mpg ~ ., mtcars)

Expand Down
2 changes: 0 additions & 2 deletions tests/testthat/test-early_stopping.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
context("test early stopping")

test_that("validation uses correct dimensions", {
expect_error(
reg_fit <-
Expand Down
12 changes: 5 additions & 7 deletions tests/testthat/test-helpers.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
context("test axe_tune_data()")

##### TEST axe_tune_data() #####

axe_test_data <- dplyr::tibble(
Expand All @@ -10,7 +8,11 @@ axe_test_data <- dplyr::tibble(

# Test for expected outputs
test_that("output is as expected", {
expect_equivalent(axe_tune_data(axe_test_data), axe_test_data[, 1:2])
expect_equal(
axe_tune_data(axe_test_data),
axe_test_data[, 1:2],
ignore_attr = TRUE
)
})

# Test that invalid inputs throw errors
Expand All @@ -20,8 +22,6 @@ test_that("invalid data types stop process", {
})


context("test axe_recipe()")

##### TEST axe_recipe() #####

iris_recp <- recipes::recipe(
Expand All @@ -43,8 +43,6 @@ test_that("invalid data types stop process", {
})


context("test lgbm_save() and lgbm_load()")

##### TEST lgbm_save() and lgbm_load() #####

library(modeldata)
Expand Down
2 changes: 0 additions & 2 deletions tests/testthat/test-hyperparameters.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
context("test hyperparameters")

model <- parsnip::boost_tree() %>%
parsnip::set_mode("regression")

Expand Down
4 changes: 0 additions & 4 deletions tests/testthat/test-lightgbm.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
context("test lightgbm regression")

test_that("lightgbm regression", {
model <- parsnip::boost_tree(trees = 50) %>%
parsnip::set_engine(
Expand Down Expand Up @@ -123,8 +121,6 @@ test_that("lighgbm throws error", {
})


context("test tune")

test_that("lightgbm with tune", {
model <- parsnip::boost_tree(
trees = tune::tune()
Expand Down
Loading