Skip to content

Commit

Permalink
transition yardstick to Suggests
Browse files Browse the repository at this point in the history
avoid the 20+ dependency NOTE
  • Loading branch information
simonpcouch committed Mar 21, 2024
1 parent c97615e commit 5e6fe4d
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 11 deletions.
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ Imports:
tidyr,
tune (>= 1.2.0),
vctrs (>= 0.6.1),
workflows (>= 1.1.4),
yardstick (>= 1.1.0)
workflows (>= 1.1.4)
Suggests:
covr,
h2o,
Expand All @@ -51,7 +50,8 @@ Suggests:
ranger,
rmarkdown,
testthat (>= 3.0.0),
workflowsets (>= 0.1.0)
workflowsets (>= 0.1.0),
yardstick (>= 1.1.0)
VignetteBuilder:
knitr
Config/Needs/website: tidyverse/tidytemplate
Expand Down
1 change: 0 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,3 @@ importFrom(ggplot2,autoplot)
importFrom(rlang,"%||%")
importFrom(rlang,caller_env)
importFrom(stats,predict)
importFrom(yardstick,metric_set)
5 changes: 0 additions & 5 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,3 @@ mode_is_regression <- function(x) {
}
x
}

# quiet R-CMD-check NOTEs that yardstick is unused
# (see example data .Rmds for usage)
#' @importFrom yardstick metric_set
NULL
2 changes: 2 additions & 0 deletions tests/testthat/test_add_candidates.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ library(kernlab)
skip_if_not_installed("nnet")
library(nnet)

skip_if_not_installed("yardstick")

test_that("stack can add candidates (regression)", {
skip_on_cran()

Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test_blend_predictions.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ library(kernlab)
skip_if_not_installed("nnet")
library(nnet)

skip_if_not_installed("yardstick")

test_that("blend_predictions works", {
skip_on_cran()

Expand Down
5 changes: 3 additions & 2 deletions vignettes/classification.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ library(rsample)
library(parsnip)
library(workflows)
library(recipes)
library(yardstick)
library(stacks)
library(purrr)
library(dplyr)
Expand All @@ -38,8 +37,10 @@ library(ggplot2)
```{r, include = FALSE}
if (rlang::is_installed("ranger") &&
rlang::is_installed("nnet") &&
rlang::is_installed("kernlab")) {
rlang::is_installed("kernlab") &&
rlang::is_installed("yardstick")) {
run <- TRUE
library(yardstick)
} else {
run <- FALSE
}
Expand Down

0 comments on commit 5e6fe4d

Please sign in to comment.