Skip to content

Commit

Permalink
TDD prep: redocument() with new roxygen (#159)
Browse files Browse the repository at this point in the history
  • Loading branch information
simonpcouch authored Aug 2, 2024
1 parent 476178b commit edf8110
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Imports:
glue,
hardhat (>= 1.2.0),
lifecycle (>= 1.0.0),
parsnip (>= 1.2.0),
parsnip (>= 1.2.1),
pillar (>= 1.7.0),
prettyunits,
purrr,
Expand All @@ -48,7 +48,7 @@ Suggests:
kknn,
knitr,
modeldata,
recipes (>= 1.0.0),
recipes (>= 1.1.0),
rmarkdown,
spelling,
testthat (>= 3.0.0),
Expand All @@ -69,4 +69,4 @@ Encoding: UTF-8
Language: en-US
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.1
RoxygenNote: 7.3.2
4 changes: 4 additions & 0 deletions tests/testthat/test-fit_best.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ test_that("fit_best fits with correct hyperparameters", {
tune_params <- select_best(tune_res, metric = "rmse")
manual_wf <- fit_best(tune_res, parameters = tune_params)

manual_wf$pre$mold$blueprint$recipe$fit_times <-
fit_best_wf$pre$mold$blueprint$recipe$fit_times
expect_equal(manual_wf, fit_best_wf)

# metric: iic
Expand All @@ -49,6 +51,8 @@ test_that("fit_best fits with correct hyperparameters", {
tune_params_2 <- select_best(tune_res_2, metric = "iic")
manual_wf_2 <- fit_best(tune_res_2, parameters = tune_params_2)

manual_wf_2$pre$mold$blueprint$recipe$fit_times <-
fit_best_wf_2$pre$mold$blueprint$recipe$fit_times
expect_equal(manual_wf_2, fit_best_wf_2)
})

Expand Down

0 comments on commit edf8110

Please sign in to comment.