Skip to content

Commit f560b94

Browse files
Merge pull request #518 from tidymodels/no-suggests
Enable checks without suggested packages
2 parents 87314bc + c859c50 commit f560b94

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+240
-88
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
2+
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
3+
#
4+
# NOTE: This workflow only directly installs "hard" dependencies, i.e. Depends,
5+
# Imports, and LinkingTo dependencies. Notably, Suggests dependencies are never
6+
# installed, with the exception of testthat, knitr, and rmarkdown. The cache is
7+
# never used to avoid accidentally restoring a cache containing a suggested
8+
# dependency.
9+
on:
10+
push:
11+
branches: [main, master]
12+
pull_request:
13+
14+
name: R-CMD-check-no-suggests.yaml
15+
16+
permissions: read-all
17+
18+
jobs:
19+
check-no-suggests:
20+
runs-on: ${{ matrix.config.os }}
21+
22+
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
23+
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
config:
28+
- {os: ubuntu-latest, r: 'release'}
29+
30+
env:
31+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
32+
R_KEEP_PKG_SOURCE: yes
33+
34+
steps:
35+
- uses: actions/checkout@v4
36+
37+
- uses: r-lib/actions/setup-pandoc@v2
38+
39+
- uses: r-lib/actions/setup-r@v2
40+
with:
41+
r-version: ${{ matrix.config.r }}
42+
http-user-agent: ${{ matrix.config.http-user-agent }}
43+
use-public-rspm: true
44+
45+
- uses: r-lib/actions/setup-r-dependencies@v2
46+
with:
47+
dependencies: '"hard"'
48+
cache: false
49+
extra-packages: |
50+
any::rcmdcheck
51+
any::testthat
52+
any::knitr
53+
any::rmarkdown
54+
needs: check
55+
56+
- uses: r-lib/actions/check-r-package@v2
57+
with:
58+
upload-snapshots: true
59+
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'

R/conf_mat.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
#' [summary.conf_mat()] for computing a large number of metrics from one
4040
#' confusion matrix.
4141
#'
42-
#' @examples
42+
#' @examplesIf rlang::is_installed(c("tidyr", "ggplot2"))
4343
#' library(dplyr)
4444
#' data("hpc_cv")
4545
#'
@@ -342,7 +342,7 @@ flatten <- function(xtab, call = caller_env()) {
342342
#'
343343
#' [conf_mat()]
344344
#'
345-
#' @examples
345+
#' @examplesIf rlang::is_installed(c("tidyr"))
346346
#' data("two_class_example")
347347
#'
348348
#' cmat <- conf_mat(two_class_example, truth = "truth", estimate = "predicted")

R/prob-gain_capture.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
#'
3737
#' @template examples-binary-prob
3838
#' @template examples-multiclass-prob
39-
#' @examples
39+
#' @examplesIf rlang::is_installed(c("ggplot2"))
4040
#' # ---------------------------------------------------------------------------
4141
#' # Visualize gain_capture()
4242
#'

R/prob-gain_curve.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
#' @author Max Kuhn
7373
#'
7474
#' @template examples-binary-prob
75-
#' @examples
75+
#' @examplesIf rlang::is_installed(c("ggplot2"))
7676
#' # ---------------------------------------------------------------------------
7777
#' # `autoplot()`
7878
#'

R/prob-lift_curve.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
#' @author Max Kuhn
6262
#'
6363
#' @template examples-binary-prob
64-
#' @examples
64+
#' @examplesIf rlang::is_installed(c("ggplot2"))
6565
#' # ---------------------------------------------------------------------------
6666
#' # `autoplot()`
6767
#'

R/prob-pr_curve.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#'
2828
#' @author Max Kuhn
2929
#' @template examples-binary-prob
30-
#' @examples
30+
#' @examplesIf rlang::is_installed(c("ggplot2"))
3131
#' # ---------------------------------------------------------------------------
3232
#' # `autoplot()`
3333
#'

R/prob-roc_curve.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
#'
3030
#' @author Max Kuhn
3131
#' @template examples-binary-prob
32-
#' @examples
32+
#' @examplesIf rlang::is_installed(c("ggplot2"))
3333
#' # ---------------------------------------------------------------------------
3434
#' # `autoplot()`
3535
#'

R/surv-brier_survival.R

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@
1919
#'
2020
#' @param ... The column identifier for the survival probabilities this
2121
#' should be a list column of data.frames corresponding to the output given when
22-
#' predicting with [censored](https://censored.tidymodels.org/) model. This
23-
#' should be an unquoted column name although this argument is passed by
24-
#' expression and supports [quasiquotation][rlang::quasiquotation] (you can
22+
#' predicting with [censored](https://censored.tidymodels.org/) model. This
23+
#' should be an unquoted column name although this argument is passed by
24+
#' expression and supports [quasiquotation][rlang::quasiquotation] (you can
2525
#' unquote column names). For `_vec()` functions, the dots are not used.
26-
#'
27-
#' @param estimate A list column of data.frames corresponding to the output
28-
#' given when predicting with [censored](https://censored.tidymodels.org/)
26+
#'
27+
#' @param estimate A list column of data.frames corresponding to the output
28+
#' given when predicting with [censored](https://censored.tidymodels.org/)
2929
#' model. See the details for more information regarding format.
3030
#'
3131
#' @details
@@ -59,7 +59,9 @@
5959
#' comparison of prognostic classification schemes for survival data,”
6060
#' _Statistics in Medicine_, vol. 18, no. 17-18, pp. 2529–2545, 1999.
6161
#'
62-
#' @examples
62+
#' @examplesIf rlang::is_installed(c("tidyr"))
63+
#' # example code
64+
#'
6365
#' library(dplyr)
6466
#'
6567
#' lung_surv %>%

R/surv-brier_survival_integrated.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
#' and comparison of prognostic classification schemes for survival data,”
4444
#' Statistics in Medicine, vol. 18, no. 17-18, pp. 2529–2545, 1999.
4545
#'
46-
#' @examples
46+
#' @examplesIf rlang::is_installed(c("tidyr"))
4747
#' library(dplyr)
4848
#'
4949
#' lung_surv %>%

R/surv-roc_auc_survival.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
#' and comparison of prognostic classification schemes for survival data.
4848
#' _Statist. Med._, 18: 2529-2545.
4949
#'
50-
#' @examples
50+
#' @examplesIf rlang::is_installed(c("tidyr"))
5151
#' library(dplyr)
5252
#'
5353
#' lung_surv %>%

0 commit comments

Comments
 (0)