Running ‘spelling.R’ [0s/1s]
  Running ‘testthat.R’ [19s/28s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(rules)
  Loading required package: parsnip
  > 
  > test_check("rules")
  
  Attaching package: 'dplyr'
  
  The following object is masked from 'package:testthat':
  
      matches
  
  The following objects are masked from 'package:stats':
  
      filter, lag
  
  The following objects are masked from 'package:base':
  
      intersect, setdiff, setequal, union
  
  [ FAIL 7 | WARN 0 | SKIP 32 | PASS 21 ]
  
  ══ Skipped tests ═══════════════════════════════════════════════════════════════
  • On CRAN (32)
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure (test-rule-fit-regression.R:176:3): early stopping works in xrf_fit ──
  `rf_fit_1 <- fit(rf_mod_1, mpg ~ ., data = mtcars)` threw an unexpected error.
  Message: number of characters is not computable in "bytes" encoding, element 1
  Class:   simpleError/error/condition
  Backtrace:
       ▆
    1. ├─rules:::expect_error_free(...) at test-rule-fit-regression.R:176:2
    2. │ └─testthat::expect_error(..., regexp = NA) at tests/testthat/helpers.R:97:2
    3. │   └─testthat:::expect_condition_matching(...)
    4. │     └─testthat:::quasi_capture(...)
    5. │       ├─testthat (local) .capture(...)
    6. │       │ └─base::withCallingHandlers(...)
    7. │       └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    8. ├─generics::fit(rf_mod_1, mpg ~ ., data = mtcars)
    9. ├─parsnip::fit.model_spec(rf_mod_1, mpg ~ ., data = mtcars)
   10. │ └─parsnip:::form_form(object = object, control = control, env = eval_env)
   11. │   └─parsnip:::eval_mod(...)
   12. │     └─rlang::eval_tidy(e, env = envir, ...)
   13. ├─rules::xrf_fit(...)
   14. │ └─rlang::eval_tidy(cl)
   15. ├─xrf::xrf(...)
   16. ├─xrf:::xrf.formula(...)
   17. │ └─xrf:::evaluate_rules(rules, design_matrix)
   18. │   └─dplyr::bind_cols(per_rule_evaluation$rule_evaluation)
   19. │     ├─dplyr:::fix_call(vec_cbind(!!!dots, .name_repair = .name_repair))
   20. │     │ └─base::withCallingHandlers(...)
   21. │     └─vctrs::vec_cbind(!!!dots, .name_repair = .name_repair)
   22. ├─vctrs:::describe_repair(`<chr>`, `<chr>`)
   23. │ └─rlang::names_inform_repair(orig_names, names)
   24. │   └─rlang::inform(message = message, class = "rlib_message_name_repair")
   25. │     ├─base::withRestarts(...)
   26. │     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   27. │     │   └─base (local) doWithOneRestart(return(expr), restart)
   28. │     └─base::signalCondition(cnd)
   29. │       ├─base::conditionMessage(cond)
   30. │       └─rlang:::conditionMessage.rlang_message(cond)
   31. │         └─rlang::cnd_message(c)
   32. │           └─rlang:::cnd_message_format(cnd, ...)
   33. │             └─rlang (local) cli_format(glue_escape(lines))
   34. │               └─rlang:::.rlang_cli_format(x, cli::format_message)
   35. │                 └─cli::cli_format(x, .envir = emptyenv())
   36. │                   └─cli:::fmt(...)
   37. │                     └─cli:::cli__fmt(rec, collapse, strip_newline, app)
   38. │                       ├─base::do.call(app[[msg$type]], msg$args)
   39. │                       └─cli (local) `<fn>`(text = `<named list>`, id = "cli-2553110-174", class = NULL)
   40. │                         └─cli:::clii_bullets(app, text, id, class)
   41. │                           └─base::lapply(...)
   42. │                             └─cli (local) FUN(X[[i]], ...)
   43. │                               └─app$text(text[[i]])
   44. │                                 └─cli:::clii_text(app, text)
   45. │                                   └─app$xtext(text)
   46. │                                     └─cli:::clii__xtext(...)
   47. │                                       └─cli::ansi_strwrap(text, exdent = exdent, width = app$get_width(extra = padding))
   48. │                                         └─base::lapply(pars, ansi_trimws)
   49. │                                           └─cli (local) FUN(X[[i]], ...)
   50. └─base::.handleSimpleError(...)
   51.   └─dplyr (local) h(simpleError(msg, call))
   52.     └─rlang::cnd_signal(cnd)
  ── Failure (test-rule-fit-regression.R:180:3): early stopping works in xrf_fit ──
  `rf_fit_2 <- fit(rf_mod_2, mpg ~ ., data = mtcars)` threw an unexpected error.
  Message: number of characters is not computable in "bytes" encoding, element 1
  Class:   simpleError/error/condition
  Backtrace:
       ▆
    1. ├─rules:::expect_error_free(...) at test-rule-fit-regression.R:180:2
    2. │ └─testthat::expect_error(..., regexp = NA) at tests/testthat/helpers.R:97:2
    3. │   └─testthat:::expect_condition_matching(...)
    4. │     └─testthat:::quasi_capture(...)
    5. │       ├─testthat (local) .capture(...)
    6. │       │ └─base::withCallingHandlers(...)
    7. │       └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    8. ├─generics::fit(rf_mod_2, mpg ~ ., data = mtcars)
    9. ├─parsnip::fit.model_spec(rf_mod_2, mpg ~ ., data = mtcars)
   10. │ └─parsnip:::form_form(object = object, control = control, env = eval_env)
   11. │   └─parsnip:::eval_mod(...)
   12. │     └─rlang::eval_tidy(e, env = envir, ...)
   13. ├─rules::xrf_fit(...)
   14. │ └─rlang::eval_tidy(cl)
   15. ├─xrf::xrf(...)
   16. ├─xrf:::xrf.formula(...)
   17. │ └─xrf:::evaluate_rules(rules, design_matrix)
   18. │   └─dplyr::bind_cols(per_rule_evaluation$rule_evaluation)
   19. │     ├─dplyr:::fix_call(vec_cbind(!!!dots, .name_repair = .name_repair))
   20. │     │ └─base::withCallingHandlers(...)
   21. │     └─vctrs::vec_cbind(!!!dots, .name_repair = .name_repair)
   22. ├─vctrs:::describe_repair(`<chr>`, `<chr>`)
   23. │ └─rlang::names_inform_repair(orig_names, names)
   24. │   └─rlang::inform(message = message, class = "rlib_message_name_repair")
   25. │     ├─base::withRestarts(...)
   26. │     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   27. │     │   └─base (local) doWithOneRestart(return(expr), restart)
   28. │     └─base::signalCondition(cnd)
   29. │       ├─base::conditionMessage(cond)
   30. │       └─rlang:::conditionMessage.rlang_message(cond)
   31. │         └─rlang::cnd_message(c)
   32. │           └─rlang:::cnd_message_format(cnd, ...)
   33. │             └─rlang (local) cli_format(glue_escape(lines))
   34. │               └─rlang:::.rlang_cli_format(x, cli::format_message)
   35. │                 └─cli::cli_format(x, .envir = emptyenv())
   36. │                   └─cli:::fmt(...)
   37. │                     └─cli:::cli__fmt(rec, collapse, strip_newline, app)
   38. │                       ├─base::do.call(app[[msg$type]], msg$args)
   39. │                       └─cli (local) `<fn>`(text = `<named list>`, id = "cli-2553110-348", class = NULL)
   40. │                         └─cli:::clii_bullets(app, text, id, class)
   41. │                           └─base::lapply(...)
   42. │                             └─cli (local) FUN(X[[i]], ...)
   43. │                               └─app$text(text[[i]])
   44. │                                 └─cli:::clii_text(app, text)
   45. │                                   └─app$xtext(text)
   46. │                                     └─cli:::clii__xtext(...)
   47. │                                       └─cli::ansi_strwrap(text, exdent = exdent, width = app$get_width(extra = padding))
   48. │                                         └─base::lapply(pars, ansi_trimws)
   49. │                                           └─cli (local) FUN(X[[i]], ...)
   50. └─base::.handleSimpleError(...)
   51.   └─dplyr (local) h(simpleError(msg, call))
   52.     └─rlang::cnd_signal(cnd)
  ── Error (test-rule-fit-regression.R:184:3): early stopping works in xrf_fit ───
  `suppressMessages(rf_fit_3 <- fit(rf_mod_3, mpg ~ ., data = mtcars))` threw an unexpected error.
  Message: number of characters is not computable in "bytes" encoding, element 1
  Class:   simpleError/error/condition
  Backtrace:
       ▆
    1. ├─base::suppressMessages(rf_fit_3 <- fit(rf_mod_3, mpg ~ ., data = mtcars))
    2. │ └─base::withCallingHandlers(...)
    3. ├─generics::fit(rf_mod_3, mpg ~ ., data = mtcars)
    4. ├─parsnip::fit.model_spec(rf_mod_3, mpg ~ ., data = mtcars)
    5. │ └─parsnip:::form_form(object = object, control = control, env = eval_env)
    6. │   └─parsnip:::eval_mod(...)
    7. │     └─rlang::eval_tidy(e, env = envir, ...)
    8. ├─rules::xrf_fit(...)
    9. │ └─rlang::eval_tidy(cl)
   10. ├─xrf::xrf(...)
   11. ├─xrf:::xrf.formula(...)
   12. │ └─xrf:::evaluate_rules(rules, design_matrix)
   13. │   └─dplyr::bind_cols(per_rule_evaluation$rule_evaluation)
   14. │     ├─dplyr:::fix_call(vec_cbind(!!!dots, .name_repair = .name_repair))
   15. │     │ └─base::withCallingHandlers(...)
   16. │     └─vctrs::vec_cbind(!!!dots, .name_repair = .name_repair)
   17. ├─vctrs:::describe_repair(`<chr>`, `<chr>`)
   18. │ └─rlang::names_inform_repair(orig_names, names)
   19. │   └─rlang::inform(message = message, class = "rlib_message_name_repair")
   20. │     ├─base::withRestarts(...)
   21. │     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   22. │     │   └─base (local) doWithOneRestart(return(expr), restart)
   23. │     └─base::signalCondition(cnd)
   24. │       ├─base::conditionMessage(cond)
   25. │       └─rlang:::conditionMessage.rlang_message(cond)
   26. │         └─rlang::cnd_message(c)
   27. │           └─rlang:::cnd_message_format(cnd, ...)
   28. │             └─rlang (local) cli_format(glue_escape(lines))
   29. │               └─rlang:::.rlang_cli_format(x, cli::format_message)
   30. │                 └─cli::cli_format(x, .envir = emptyenv())
   31. │                   └─cli:::fmt(...)
   32. │                     └─cli:::cli__fmt(rec, collapse, strip_newline, app)
   33. │                       ├─base::do.call(app[[msg$type]], msg$args)
   34. │                       └─cli (local) `<fn>`(text = `<named list>`, id = "cli-2553110-522", class = NULL)
   35. │                         └─cli:::clii_bullets(app, text, id, class)
   36. │                           └─base::lapply(...)
   37. │                             └─cli (local) FUN(X[[i]], ...)
   38. │                               └─app$text(text[[i]])
   39. │                                 └─cli:::clii_text(app, text)
   40. │                                   └─app$xtext(text)
   41. │                                     └─cli:::clii__xtext(...)
   42. │                                       └─cli::ansi_strwrap(text, exdent = exdent, width = app$get_width(extra = padding))
   43. │                                         └─base::lapply(pars, ansi_trimws)
   44. │                                           └─cli (local) FUN(X[[i]], ...)
   45. └─base::.handleSimpleError(...)
   46.   └─dplyr (local) h(simpleError(msg, call))
   47.     └─rlang::cnd_signal(cnd)
  ── Error (test-rule-fit-regression.R:190:3): early stopping works in xrf_fit ───
  Error in `eval_bare(expr, quo_get_env(quo))`: object 'rf_fit_1' not found
  Backtrace:
      ▆
   1. └─testthat::expect_true(is.null(rf_fit_1$fit$xgb$best_iteration)) at test-rule-fit-regression.R:190:2
   2.   └─testthat::quasi_label(enquo(object), label, arg = "object")
   3.     └─rlang::eval_bare(expr, quo_get_env(quo))
  ── Failure (test-rule-fit-regression.R:201:3): xrf_fit is sensitive to glm_control ──
  `rf_fit_1 <- fit(rf_mod, mpg ~ ., data = mtcars)` threw an unexpected error.
  Message: number of characters is not computable in "bytes" encoding, element 1
  Class:   simpleError/error/condition
  Backtrace:
       ▆
    1. ├─rules:::expect_error_free(rf_fit_1 <- fit(rf_mod, mpg ~ ., data = mtcars)) at test-rule-fit-regression.R:201:2
    2. │ └─testthat::expect_error(..., regexp = NA) at tests/testthat/helpers.R:97:2
    3. │   └─testthat:::expect_condition_matching(...)
    4. │     └─testthat:::quasi_capture(...)
    5. │       ├─testthat (local) .capture(...)
    6. │       │ └─base::withCallingHandlers(...)
    7. │       └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    8. ├─generics::fit(rf_mod, mpg ~ ., data = mtcars)
    9. ├─parsnip::fit.model_spec(rf_mod, mpg ~ ., data = mtcars)
   10. │ └─parsnip:::form_form(object = object, control = control, env = eval_env)
   11. │   └─parsnip:::eval_mod(...)
   12. │     └─rlang::eval_tidy(e, env = envir, ...)
   13. ├─rules::xrf_fit(...)
   14. │ └─rlang::eval_tidy(cl)
   15. ├─xrf::xrf(...)
   16. ├─xrf:::xrf.formula(...)
   17. │ └─xrf:::evaluate_rules(rules, design_matrix)
   18. │   └─dplyr::bind_cols(per_rule_evaluation$rule_evaluation)
   19. │     ├─dplyr:::fix_call(vec_cbind(!!!dots, .name_repair = .name_repair))
   20. │     │ └─base::withCallingHandlers(...)
   21. │     └─vctrs::vec_cbind(!!!dots, .name_repair = .name_repair)
   22. ├─vctrs:::describe_repair(`<chr>`, `<chr>`)
   23. │ └─rlang::names_inform_repair(orig_names, names)
   24. │   └─rlang::inform(message = message, class = "rlib_message_name_repair")
   25. │     ├─base::withRestarts(...)
   26. │     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   27. │     │   └─base (local) doWithOneRestart(return(expr), restart)
   28. │     └─base::signalCondition(cnd)
   29. │       ├─base::conditionMessage(cond)
   30. │       └─rlang:::conditionMessage.rlang_message(cond)
   31. │         └─rlang::cnd_message(c)
   32. │           └─rlang:::cnd_message_format(cnd, ...)
   33. │             └─rlang (local) cli_format(glue_escape(lines))
   34. │               └─rlang:::.rlang_cli_format(x, cli::format_message)
   35. │                 └─cli::cli_format(x, .envir = emptyenv())
   36. │                   └─cli:::fmt(...)
   37. │                     └─cli:::cli__fmt(rec, collapse, strip_newline, app)
   38. │                       ├─base::do.call(app[[msg$type]], msg$args)
   39. │                       └─cli (local) `<fn>`(text = `<named list>`, id = "cli-2553110-624", class = NULL)
   40. │                         └─cli:::clii_bullets(app, text, id, class)
   41. │                           └─base::lapply(...)
   42. │                             └─cli (local) FUN(X[[i]], ...)
   43. │                               └─app$text(text[[i]])
   44. │                                 └─cli:::clii_text(app, text)
   45. │                                   └─app$xtext(text)
   46. │                                     └─cli:::clii__xtext(...)
   47. │                                       └─cli::ansi_strwrap(text, exdent = exdent, width = app$get_width(extra = padding))
   48. │                                         └─base::lapply(pars, ansi_trimws)
   49. │                                           └─cli (local) FUN(X[[i]], ...)
   50. └─base::.handleSimpleError(...)
   51.   └─dplyr (local) h(simpleError(msg, call))
   52.     └─rlang::cnd_signal(cnd)
  ── Error (test-rule-fit-regression.R:205:3): xrf_fit is sensitive to glm_control ──
  Error in `is_quosure(call)`: object 'rf_fit_1' not found
  Backtrace:
      ▆
   1. └─rlang::call_args(rf_fit_1$fit$glm$model$call) at test-rule-fit-regression.R:205:2
   2.   └─rlang::is_quosure(call)
  ── Error (test-rule-fit-regression.R:217:3): xrf_fit guards xgb_control ────────
  `suppressMessages(fit(rf_mod, mpg ~ ., data = mtcars))` threw an unexpected error.
  Message: number of characters is not computable in "bytes" encoding, element 1
  Class:   simpleError/error/condition
  Backtrace:
       ▆
    1. ├─base::suppressMessages(fit(rf_mod, mpg ~ ., data = mtcars))
    2. │ └─base::withCallingHandlers(...)
    3. ├─generics::fit(rf_mod, mpg ~ ., data = mtcars)
    4. ├─parsnip::fit.model_spec(rf_mod, mpg ~ ., data = mtcars)
    5. │ └─parsnip:::form_form(object = object, control = control, env = eval_env)
    6. │   └─parsnip:::eval_mod(...)
    7. │     └─rlang::eval_tidy(e, env = envir, ...)
    8. ├─rules::xrf_fit(...)
    9. │ └─rlang::eval_tidy(cl)
   10. ├─xrf::xrf(...)
   11. ├─xrf:::xrf.formula(...)
   12. │ └─xrf:::evaluate_rules(rules, design_matrix)
   13. │   └─dplyr::bind_cols(per_rule_evaluation$rule_evaluation)
   14. │     ├─dplyr:::fix_call(vec_cbind(!!!dots, .name_repair = .name_repair))
   15. │     │ └─base::withCallingHandlers(...)
   16. │     └─vctrs::vec_cbind(!!!dots, .name_repair = .name_repair)
   17. ├─vctrs:::describe_repair(`<chr>`, `<chr>`)
   18. │ └─rlang::names_inform_repair(orig_names, names)
   19. │   └─rlang::inform(message = message, class = "rlib_message_name_repair")
   20. │     ├─base::withRestarts(...)
   21. │     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   22. │     │   └─base (local) doWithOneRestart(return(expr), restart)
   23. │     └─base::signalCondition(cnd)
   24. │       ├─base::conditionMessage(cond)
   25. │       └─rlang:::conditionMessage.rlang_message(cond)
   26. │         └─rlang::cnd_message(c)
   27. │           └─rlang:::cnd_message_format(cnd, ...)
   28. │             └─rlang (local) cli_format(glue_escape(lines))
   29. │               └─rlang:::.rlang_cli_format(x, cli::format_message)
   30. │                 └─cli::cli_format(x, .envir = emptyenv())
   31. │                   └─cli:::fmt(...)
   32. │                     └─cli:::cli__fmt(rec, collapse, strip_newline, app)
   33. │                       ├─base::do.call(app[[msg$type]], msg$args)
   34. │                       └─cli (local) `<fn>`(text = `<named list>`, id = "cli-2553110-726", class = NULL)
   35. │                         └─cli:::clii_bullets(app, text, id, class)
   36. │                           └─base::lapply(...)
   37. │                             └─cli (local) FUN(X[[i]], ...)
   38. │                               └─app$text(text[[i]])
   39. │                                 └─cli:::clii_text(app, text)
   40. │                                   └─app$xtext(text)
   41. │                                     └─cli:::clii__xtext(...)
   42. │                                       └─cli::ansi_strwrap(text, exdent = exdent, width = app$get_width(extra = padding))
   43. │                                         └─base::lapply(pars, ansi_trimws)
   44. │                                           └─cli (local) FUN(X[[i]], ...)
   45. └─base::.handleSimpleError(...)
   46.   └─dplyr (local) h(simpleError(msg, call))
   47.     └─rlang::cnd_signal(cnd)
  
  [ FAIL 7 | WARN 0 | SKIP 32 | PASS 21 ]
  Error: Test failures
  Execution halted