-
Notifications
You must be signed in to change notification settings - Fork 66
use_tidy_style() #374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use_tidy_style() #374
Conversation
(requested changes and approval were me just dealing with misclicking the review button instead of comment, please ignore) |
This doesn't create any additional errors or anything, but I do get the following tests, can you replicate, @goldingn ? > devtools::test()
Loading greta
Testing greta
✓ | OK F W S | Context
x | 51 1 | as_data [1.1 s]
───────────────────────────────────────────────────────────────────────────────────
Failure (test_as_data.R:160:3): as_data errors informatively
`as_data(cha_df2)` threw an error with unexpected message.
Expected match: "cannot coerce a dataframe to a greta_array unless all columns are numeric, integer or logical. This dataframe had columns of type: factor"
Actual message: "cannot coerce a dataframe to a greta_array unless all columns are numeric, integer or logical. This dataframe had columns of type: character"
Backtrace:
1. testthat::expect_error(...) test_as_data.R:160:2
7. greta::as_data.default(cha_df2) /Users/njtierney/github/njtierney/greta-dev/greta/R/as_data.R:39:2
9. greta::as.greta_array.data.frame(x) /Users/njtierney/github/njtierney/greta-dev/greta/R/greta_array_class.R:8:2
───────────────────────────────────────────────────────────────────────────────────
✓ | 80 | calculate [28.9 s]
✓ | 208 | distributions [119.9 s]
x | 235 1 | extract/replace/combine [40.8 s]
───────────────────────────────────────────────────────────────────────────────────
Error (test_extract_replace_combine.R:554:3): head and tail work
Error: non-conformable arrays
Backtrace:
1. global::check_op(head, c) test_extract_replace_combine.R:554:2
2. global::compare_op(r_out, greta_out, tolerance) helpers.R:193:4
3. base::as.vector(abs(r_out - greta_out)) helpers.R:198:2
───────────────────────────────────────────────────────────────────────────────────
x | 448 6 1 | functions [56.2 s]
───────────────────────────────────────────────────────────────────────────────────
Failure (test_functions.R:51:3): primitive functions work as expected
all(difference < tolerance) is not TRUE
`actual`: FALSE
`expected`: TRUE
Backtrace:
1. global::check_op(log10, pos) test_functions.R:51:2
2. global::compare_op(r_out, greta_out, tolerance) helpers.R:193:4
3. testthat::expect_true(all(difference < tolerance)) helpers.R:199:2
Failure (test_functions.R:51:3): primitive functions work as expected
all(difference < tolerance) is not TRUE
`actual`: FALSE
`expected`: TRUE
Backtrace:
1. global::check_op(log10, pos) test_functions.R:51:2
2. global::compare_op(r_out, greta_out, tolerance) helpers.R:193:4
3. testthat::expect_true(all(difference < tolerance)) helpers.R:199:2
Failure (test_functions.R:51:3): primitive functions work as expected
all(difference < tolerance) is not TRUE
`actual`: FALSE
`expected`: TRUE
Backtrace:
1. global::check_op(log10, pos) test_functions.R:51:2
2. global::compare_op(r_out, greta_out, tolerance) helpers.R:193:4
3. testthat::expect_true(all(difference < tolerance)) helpers.R:199:2
Failure (test_functions.R:52:3): primitive functions work as expected
all(difference < tolerance) is not TRUE
`actual`: FALSE
`expected`: TRUE
Backtrace:
1. global::check_op(log2, pos) test_functions.R:52:2
2. global::compare_op(r_out, greta_out, tolerance) helpers.R:193:4
3. testthat::expect_true(all(difference < tolerance)) helpers.R:199:2
Failure (test_functions.R:52:3): primitive functions work as expected
all(difference < tolerance) is not TRUE
`actual`: FALSE
`expected`: TRUE
Backtrace:
1. global::check_op(log2, pos) test_functions.R:52:2
2. global::compare_op(r_out, greta_out, tolerance) helpers.R:193:4
3. testthat::expect_true(all(difference < tolerance)) helpers.R:199:2
Failure (test_functions.R:52:3): primitive functions work as expected
all(difference < tolerance) is not TRUE
`actual`: FALSE
`expected`: TRUE
Backtrace:
1. global::check_op(log2, pos) test_functions.R:52:2
2. global::compare_op(r_out, greta_out, tolerance) helpers.R:193:4
3. testthat::expect_true(all(difference < tolerance)) helpers.R:199:2
Warning (test_functions.R:108:3): matrix functions work as expected
the LINPACK argument has been defunct since R 3.1.0
Backtrace:
1. global::check_op(chol2inv, c) test_functions.R:108:2
2. global::run_r_op(op, a, b, other_args) helpers.R:188:2
5. greta::chol2inv.default(...) /Users/njtierney/github/njtierney/greta-dev/greta/R/functions.R:441:2
6. base::chol2inv(x = x, size = size, LINPACK = LINPACK) /Users/njtierney/github/njtierney/greta-dev/greta/R/functions.R:446:2
───────────────────────────────────────────────────────────────────────────────────
✖ | 3 2 | greta_array class [0.1 s]
───────────────────────────────────────────────────────────────────────────────────
Failure (test_greta_array_class.R:42:3): print and summary work
result$output not identical to `expected_output`.
1/1 mismatches
x[1]: "greta array (variable following a normal distribution)\n\n [,1]\n[1,] ?
x[1]: \nattr(,\"class\")\n[1] matrix array "
y[1]: "greta array (variable following a normal distribution)\n\n [,1]\n[1,] ?
y[1]: "
Failure (test_greta_array_class.R:61:3): print and summary work
result$output not identical to `expected_output`.
1/1 mismatches
x[1]: "greta array (operation)\n\n [,1] [,2] [,3]\n[1,] ? ? ? \n[2,] ?
x[1]: ? ? \n[3,] ? ? ? \nattr(,\"class\")\n[1] matrix array "
y[1]: "greta array (operation)\n\n [,1] [,2] [,3]\n[1,] ? ? ? \n[2,] ?
y[1]: ? ? \n[3,] ? ? ? "
───────────────────────────────────────────────────────────────────────────────────
Maximum number of failures exceeded; quitting early.
You can increase this number by setting `options(testthat.progress.max_fails)`
══ Results ════════════════════════════════════════════════════════════════════════
Duration: 247.2 s
[ FAIL 10 | WARN 1 | SKIP 0 | PASS 1025 ]
══ Terminated early ═══════════════════════════════════════════════════════════════ PS once we implement GH actions there should be a nice PR notification about GH's test results. |
Won't have time to try today - but it looks like some of the text outputs have been affected, so some of those very specific tests on the formatting of messages etc. are failing. It's possible that isn't related to styler but is a different change (e.g. R version), because it looks like attribute information is now being printed in the last test. |
OK I'll fix those up before I merge! |
errors have been cross referenced to master and no further errors were introduced |
Cool guys. {styler} also modified roxygen code examples, so I think to complete the styling, we need to re-generate docs with |
closes #372