Skip to content

Commit

Permalink
Merge pull request #275 from tidymodels/hard-check
Browse files Browse the repository at this point in the history
add hard check
  • Loading branch information
EmilHvitfeldt authored Nov 9, 2024
2 parents 8c88b3f + 827d61f commit d52874a
Show file tree
Hide file tree
Showing 75 changed files with 370 additions and 192 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/R-CMD-check-hard.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
#
# NOTE: This workflow only directly installs "hard" dependencies, i.e. Depends,
# Imports, and LinkingTo dependencies. Notably, Suggests dependencies are never
# installed, with the exception of testthat, knitr, and rmarkdown. The cache is
# never used to avoid accidentally restoring a cache containing a suggested
# dependency.
on:
push:
branches: [main, master]
pull_request:

name: R-CMD-check-hard.yaml

permissions: read-all

jobs:
check-no-suggests:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- {os: ubuntu-latest, r: 'release'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
dependencies: '"hard"'
cache: false
extra-packages: |
any::rcmdcheck
any::testthat
any::knitr
any::rmarkdown
needs: check

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'
4 changes: 2 additions & 2 deletions R/clean_levels.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#' [recipes::step_unknown()], [recipes::step_novel()], [recipes::step_other()]
#' @family Steps for Text Cleaning
#'
#' @examplesIf rlang::is_installed("janitor")
#' @examplesIf rlang::is_installed(c("modeldata", "janitor"))
#' library(recipes)
#' library(modeldata)
#' data(Smithsonian)
Expand Down Expand Up @@ -139,7 +139,7 @@ bake.step_clean_levels <- function(object, new_data, ...) {
new_data[[col_name]] <- janitor::make_clean_names(new_data[[col_name]])

}
}
}

new_data
}
Expand Down
2 changes: 1 addition & 1 deletion R/dummy_hash.R
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
#' @seealso [recipes::step_dummy()]
#' @family Steps for Numeric Variables From Characters
#'
#' @examplesIf all(c("text2vec", "data.table") %in% rownames(installed.packages()))
#' @examplesIf all(c("modeldata", "text2vec", "data.table") %in% rownames(installed.packages()))
#' \dontshow{library(data.table)}
#' \dontshow{data.table::setDTthreads(2)}
#' \dontshow{Sys.setenv("OMP_NUM_THREADS" = 1)}
Expand Down
2 changes: 1 addition & 1 deletion R/lda.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#'
#' @family Steps for Numeric Variables From Tokens
#'
#' @examplesIf all(c("text2vec", "data.table") %in% rownames(installed.packages()))
#' @examplesIf all(c("modeldata", "text2vec", "data.table") %in% rownames(installed.packages()))
#' \dontshow{library(data.table)}
#' \dontshow{data.table::setDTthreads(2)}
#' \dontshow{Sys.setenv("OMP_THREAD_LIMIT" = 2)}
Expand Down
2 changes: 1 addition & 1 deletion R/ngram.R
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
#' @seealso [step_tokenize()] to turn characters into [`tokens`][tokenlist()]
#' @family Steps for Token Modification
#'
#' @examples
#' @examplesIf rlang::is_installed("modeldata")
#' library(recipes)
#' library(modeldata)
#' data(tate_text)
Expand Down
2 changes: 1 addition & 1 deletion R/sequence_onehot.R
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
#'
#' @family Steps for Numeric Variables From Characters
#'
#' @examples
#' @examplesIf rlang::is_installed("modeldata")
#' library(recipes)
#' library(modeldata)
#' data(tate_text)
Expand Down
2 changes: 1 addition & 1 deletion R/show_tokens.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#' @return A list of character vectors
#' @export
#'
#' @examples
#' @examplesIf rlang::is_installed("modeldata")
#' text_tibble <- tibble(text = c("This is words", "They are nice!"))
#'
#' recipe(~text, data = text_tibble) %>%
Expand Down
2 changes: 1 addition & 1 deletion R/stem.R
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
#' @seealso [step_tokenize()] to turn characters into [`tokens`][tokenlist()]
#' @family Steps for Token Modification
#'
#' @examples
#' @examplesIf rlang::is_installed("modeldata")
#' library(recipes)
#' library(modeldata)
#' data(tate_text)
Expand Down
2 changes: 1 addition & 1 deletion R/stopwords.R
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
#' @seealso [step_tokenize()] to turn characters into [`tokens`][tokenlist()]
#' @family Steps for Token Modification
#'
#' @examplesIf rlang::is_installed("stopwords")
#' @examplesIf rlang::is_installed(c("modeldata", "stopwords"))
#' library(recipes)
#' library(modeldata)
#' data(tate_text)
Expand Down
2 changes: 1 addition & 1 deletion R/textfeature.R
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
#'
#' @family Steps for Numeric Variables From Characters
#'
#' @examples
#' @examplesIf rlang::is_installed("modeldata")
#' library(recipes)
#' library(modeldata)
#' data(tate_text)
Expand Down
2 changes: 1 addition & 1 deletion R/texthash.R
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
#' [step_text_normalization()] to perform text normalization.
#' @family Steps for Numeric Variables From Tokens
#'
#' @examplesIf all(c("text2vec", "data.table") %in% rownames(installed.packages()))
#' @examplesIf all(c("modeldata", "text2vec", "data.table") %in% rownames(installed.packages()))
#' \dontshow{library(data.table)}
#' \dontshow{data.table::setDTthreads(2)}
#' \dontshow{Sys.setenv("OMP_THREAD_LIMIT" = 2)}
Expand Down
2 changes: 1 addition & 1 deletion R/tf.R
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
#' @seealso [step_tokenize()] to turn characters into [`tokens`][tokenlist()]
#' @family Steps for Numeric Variables From Tokens
#'
#' @examples
#' @examplesIf rlang::is_installed("modeldata")
#' \donttest{
#' library(recipes)
#' library(modeldata)
Expand Down
2 changes: 1 addition & 1 deletion R/tfidf.R
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
#' @seealso [step_tokenize()] to turn characters into [`tokens`][tokenlist()]
#' @family Steps for Numeric Variables From Tokens
#'
#' @examples
#' @examplesIf rlang::is_installed("modeldata")
#' \donttest{
#' library(recipes)
#' library(modeldata)
Expand Down
2 changes: 1 addition & 1 deletion R/tokenfilter.R
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
#' @seealso [step_tokenize()] to turn characters into [`tokens`][tokenlist()]
#' @family Steps for Token Modification
#'
#' @examples
#' @examplesIf rlang::is_installed("modeldata")
#' library(recipes)
#' library(modeldata)
#' data(tate_text)
Expand Down
2 changes: 1 addition & 1 deletion R/tokenize.R
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@
#' @seealso [step_untokenize()] to untokenize.
#' @family Steps for Tokenization
#'
#' @examples
#' @examplesIf rlang::is_installed("modeldata")
#' library(recipes)
#' library(modeldata)
#' data(tate_text)
Expand Down
2 changes: 1 addition & 1 deletion R/tokenize_bpe.R
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
#' @seealso [step_untokenize()] to untokenize.
#' @family Steps for Tokenization
#'
#' @examplesIf rlang::is_installed("tokenizers.bpe")
#' @examplesIf rlang::is_installed(c("modeldata", "tokenizers.bpe"))
#' library(recipes)
#' library(modeldata)
#' data(tate_text)
Expand Down
2 changes: 1 addition & 1 deletion R/tokenize_sentencepiece.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#' @seealso [step_untokenize()] to untokenize.
#' @family Steps for Tokenization
#'
#' @examplesIf rlang::is_installed("sentencepiece")
#' @examplesIf rlang::is_installed(c("modeldata", "sentencepiece"))
#' library(recipes)
#' library(modeldata)
#' data(tate_text)
Expand Down
2 changes: 1 addition & 1 deletion R/tokenize_wordpiece.R
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#' @seealso [step_untokenize()] to untokenize.
#' @family Steps for Tokenization
#'
#' @examplesIf rlang::is_installed("wordpiece")
#' @examplesIf rlang::is_installed(c("modeldata", "wordpiece"))
#' library(recipes)
#' library(modeldata)
#' data(tate_text)
Expand Down
2 changes: 1 addition & 1 deletion R/tokenlist.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#'
#' @return a [tokenlist] object.
#'
#' @examples
#' @examplesIf rlang::is_installed("modeldata")
#' abc <- list(letters, LETTERS)
#' tokenlist(abc)
#'
Expand Down
2 changes: 1 addition & 1 deletion R/tokenmerge.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#' @seealso [step_tokenize()] to turn characters into [`tokens`][tokenlist()]
#' @family Steps for Token Modification
#'
#' @examples
#' @examplesIf rlang::is_installed("modeldata")
#' library(recipes)
#' library(modeldata)
#' data(tate_text)
Expand Down
2 changes: 1 addition & 1 deletion R/untokenize.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#' @seealso [step_tokenize()] to turn characters into [`tokens`][tokenlist()]
#' @family Steps for Un-Tokenization
#'
#' @examples
#' @examplesIf rlang::is_installed("modeldata")
#' library(recipes)
#' library(modeldata)
#' data(tate_text)
Expand Down
2 changes: 2 additions & 0 deletions man/show_tokens.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/step_clean_levels.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/step_dummy_hash.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/step_lda.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions man/step_ngram.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions man/step_sequence_onehot.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions man/step_stem.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/step_stopwords.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions man/step_textfeature.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/step_texthash.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion man/step_tf.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d52874a

Please sign in to comment.