Skip to content

Commit

Permalink
update snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilHvitfeldt committed Nov 14, 2023
1 parent 28cc3c8 commit e32f079
Show file tree
Hide file tree
Showing 16 changed files with 62 additions and 56 deletions.
18 changes: 9 additions & 9 deletions man/selections.Rd

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

4 changes: 2 additions & 2 deletions tests/testthat/_snaps/basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@
Condition
Error in `bake()`:
x `bake()` methods should always return tibbles.
i `bake.step_testthat_helper()` returned a a data frame.
i `bake.step_testthat_helper()` returned a data frame.

---

Expand All @@ -171,7 +171,7 @@
Condition
Error in `prep()`:
x `bake()` methods should always return tibbles.
i `bake.step_testthat_helper()` returned a a data frame.
i `bake.step_testthat_helper()` returned a data frame.

# recipe() errors if `data` is missing

Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/_snaps/discretize.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Condition
Error in `discretize()`:
x Only numeric `x` is accepted.
i A a character vector was passed.
i a character vector was passed.

# printing of discretize()

Expand Down
21 changes: 13 additions & 8 deletions tests/testthat/_snaps/harmonic.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
frequency = 1, cycle_size = NA)
Condition
Error in `step_harmonic()`:
! cycle_size must have at least one non-NA numeric value.
x `cycle_size` must have at least one non-NA numeric value.
i It was `NA`.
i Only missing values were present.

---

Expand All @@ -14,7 +16,9 @@
frequency = 1, starting_val = 0, cycle_size = NA)
Condition
Error in `step_harmonic()`:
! cycle_size must have at least one non-NA numeric value.
x `cycle_size` must have at least one non-NA numeric value.
i It was `NA`.
i Only missing values were present.

---

Expand All @@ -23,7 +27,8 @@
frequency = 1, starting_val = 0, cycle_size = "a")
Condition
Error in `step_harmonic()`:
! cycle_size must have at least one non-NA numeric value.
x `cycle_size` must have at least one non-NA numeric value.
i It was a string.

---

Expand All @@ -32,7 +37,7 @@
frequency = 1, starting_val = "a", cycle_size = 86400)
Condition
Error in `step_harmonic()`:
! starting_val must be NA, numeric, Date or POSIXt
! starting_val must be NA, numeric, Date or POSIXt. Not a string.

---

Expand All @@ -41,7 +46,7 @@
frequency = 1, starting_val = factor("a"), cycle_size = 86400)
Condition
Error in `step_harmonic()`:
! starting_val must be NA, numeric, Date or POSIXt
! starting_val must be NA, numeric, Date or POSIXt. Not a <factor> object.

# harmonic NA in term

Expand All @@ -51,7 +56,7 @@
Condition
Error in `step_harmonic()`:
Caused by error in `bake()`:
! variable must have at least one non-NA value
! Variable must have at least one non-NA value.

# harmonic character in term

Expand All @@ -73,7 +78,7 @@
Condition
Error in `step_harmonic()`:
Caused by error in `prep()`:
! `cycle_size` must be length 1 or the same length as the input columns
! `cycle_sizes` must be length 1 or the same length as the input columns.

# harmonic starting_val length

Expand All @@ -84,7 +89,7 @@
Condition
Error in `step_harmonic()`:
Caused by error in `prep()`:
! `starting_val` must be length 1 or the same length as the input columns
! `starting_val` must be length 1 or the same length as the input columns.

# check_name() is used

Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/_snaps/impute_linear.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
Condition
Error in `step_impute_linear()`:
Caused by error in `prep()`:
! Variable 'supp' chosen for linear regression imputation must be of type numeric.
! Variable `supp` chosen for linear regression imputation must be of type numeric. Not a string.

---

Expand All @@ -16,7 +16,7 @@
Condition
Error in `step_impute_linear()`:
Caused by error in `prep()`:
! Variable 'supp' chosen for linear regression imputation must be of type numeric.
! Variable `supp` chosen for linear regression imputation must be of type numeric. Not a string.

# case weights

Expand Down
3 changes: 2 additions & 1 deletion tests/testthat/_snaps/impute_lower.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
Condition
Error in `step_impute_lower()`:
Caused by error in `prep()`:
! Some columns have negative values. Lower bound imputation is intended for data bounded at zero.
x The following columns negative values. Lower bound imputation is intended for data bounded at zero.
* has_neg.

# Deprecation warning

Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/_snaps/impute_mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Condition
Error in `step_impute_mode()`:
Caused by error in `prep()`:
! The data should be character or factor to compute the mode.
! The data should be character or factor to compute the mode. Not an integer vector.

# can bake recipes with no ptype

Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/_snaps/impute_roll.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
step_impute_roll(all_predictors(), window = 4) %>% prep(training = example_data)
Condition
Error in `step_impute_roll()`:
! `window` should be an odd integer >= 3
! `window` should be an odd integer >= 3.

---

Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/_snaps/intercept.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
recipe(~., data = ex_dat) %>% step_intercept(value = "Pie") %>% prep()
Condition
Error in `step_intercept()`:
! Intercept value must be numeric.
! `value` must be a number, not the string "Pie".

---

Code
recipe(~., data = ex_dat) %>% step_intercept(name = 4) %>% prep()
Condition
Error in `step_intercept()`:
! Intercept/constant column name must be a character value.
! `name` must be a single string, not the number 4.

---

Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/_snaps/isomap.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
Condition
Error in `step_isomap()`:
Caused by error in `prep()`:
! `step_isomap` failed with error:
Error : TridiagEigen: eigen decomposition failed
x Failed with error:
i Error : TridiagEigen: eigen decomposition failed

# check_name() is used

Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/_snaps/lag.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Condition
Error in `step_lag()`:
Caused by error in `prep()`:
! step_lag() requires 'lag' argument to be integer-valued.
! `lag` argument must be integer-valued, not a function.

# empty printing

Expand Down
14 changes: 7 additions & 7 deletions tests/testthat/_snaps/missing.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Condition
Error in `check_missing()`:
Caused by error in `bake()`:
! The following columns contain missing values: `a`.
! The following columns contains missing values: a.

---

Expand All @@ -14,7 +14,7 @@
Condition
Error in `check_missing()`:
Caused by error in `bake()`:
! The following columns contain missing values: `b`.
! The following columns contains missing values: b.

---

Expand All @@ -23,7 +23,7 @@
Condition
Error in `check_missing()`:
Caused by error in `bake()`:
! The following columns contain missing values: `d`.
! The following columns contains missing values: d.

---

Expand All @@ -32,7 +32,7 @@
Condition
Error in `check_missing()`:
Caused by error in `bake()`:
! The following columns contain missing values: `e`.
! The following columns contains missing values: e.

# check_missing works on multiple columns simultaneously

Expand All @@ -41,7 +41,7 @@
Condition
Error in `check_missing()`:
Caused by error in `bake()`:
! The following columns contain missing values: `a`, `e`.
! The following columns contains missing values: a and e.

---

Expand All @@ -50,15 +50,15 @@
Condition
Error in `check_missing()`:
Caused by error in `bake()`:
! The following columns contain missing values: `a`, `b`, `d`, `e`.
! The following columns contains missing values: a, b, d, and e.

# check_missing on a new set

Code
bake(rp, na)
Condition
Error in `bake()`:
! The following columns contain missing values: `a`.
! The following columns contains missing values: a.

# empty printing

Expand Down
Loading

0 comments on commit e32f079

Please sign in to comment.