-
Notifications
You must be signed in to change notification settings - Fork 9
Description
Testthat produces a lot of noise which make it hard to parse out problems. could we look at reducing the artifacts being spit out here? @kodesiba, @parmsam-pfizer, @nicholas-masel do you all see the same thing when running logrx tests
=> devtools::test()
ℹ Testing logrx
✔ | F W S OK | Context
⠏ | 0 | axecute [1] "hello logrx"
⠹ | 3 | axecute hello logrx
⠸ | 14 | axecute hello logrx
⠇ | 19 | axecute hello logrx
⠏ | 20 | axecute hello logrx
⠹ | 23 | axecute hello logrx
this is output
Warning: closing unused connection 4 (/tmp/RtmpREIYgA/log_out_nested.Rds)
⠧ | 28 | axecute hello logrx
⠋ | 31 | axecute hello logrx
⠼ | 35 | axecute
processing file: ex1.Rmd
1/7
2/7 [cars]
3/7
4/7 [pressure]
5/7
6/7 [unnamed-chunk-1]
7/7
[1] "print"
output file: ex1.knit.md
/usr/lib/rstudio-server/bin/quarto/bin/tools/x86_64/pandoc +RTS -K512m -RTS ex1.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output ex1.html --lua-filter /cloud/lib/x86_64-pc-linux-gnu-library/4.2/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /cloud/lib/x86_64-pc-linux-gnu-library/4.2/rmarkdown/rmarkdown/lua/latex-div.lua --lua-filter /cloud/lib/x86_64-pc-linux-gnu-library/4.2/rmarkdown/rmarkdown/lua/table-classes.lua --embed-resources --standalone --variable bs3=TRUE --section-divs --template /cloud/lib/x86_64-pc-linux-gnu-library/4.2/rmarkdown/rmd/h/default.html --no-highlight --variable highlightjs=1 --variable theme=bootstrap --mathjax --variable 'mathjax-url=https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --include-in-header /tmp/RtmpREIYgA/rmarkdown-str20fb4679b1ee.html
Output created: ex1.html
processing file: ref/ex1.Rmd
1/7
2/7 [cars]
3/7
4/7 [pressure]
5/7
6/7 [unnamed-chunk-1]
7/7
output file: /tmp/RtmpREIYgA/file20fb63d12062.R
✔ | 46 | axecute [10.8s]
⠇ | 9 | get Rows: 3
Columns: 2
$ cyl 4, 6, 8
$ mean 26.66364, 19.74286, 15.10000
⠋ | 11 | get [1] "hello logrx"
Error: ref/ex4.R:5:0: unexpected end of input
3:
4: print("hello logrx"
^
⠼ | 15 | get [1] 1
⠧ | 18 | get [1] 1
processing file: ref/ex1.Rmd
1/7
2/7 [cars]
3/7
4/7 [pressure]
5/7
6/7 [unnamed-chunk-1]
7/7
output file: /tmp/RtmpREIYgA/file20fb28e71d07.R
[1] "print"
✔ | 21 | get [3.7s]
⠏ | 0 | interact [1] "log print"
[1] "log print 2"
log catlog cat 2log inform
log inform 2
log message
log message 2
⠋ | 3 8 | interact Error: log error
⠦ | 4 13 | interact
Attaching package: 'magrittr'
The following object is masked from 'package:logrx':
set_names
The following objects are masked from 'package:testthat':
equals, is_less_than, not
✔ | 4 18 | interact [2.1s]
─────────────────────────────────────────────────────────────────────────
Warning (test-interact.R:85:3): setting log name works
log_path already assigned, will not be overwritten
Backtrace:
▆
- ├─testthat::expect_warning(set_log_name_path(log_name = "test_log_name2")) at test-interact.R:85:3
- │ └─testthat:::expect_condition_matching(...)
- │ └─testthat:::quasi_capture(...)
- │ ├─testthat (local) .capture(...)
- │ │ └─base::withCallingHandlers(...)
- │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
- └─logrx:::set_log_name_path(log_name = "test_log_name2")
Warning (test-interact.R:113:3): setting path name works
log_path already assigned, will not be overwritten
Backtrace:
▆
- ├─testthat::expect_warning(set_log_name_path(log_path = ".")) at test-interact.R:113:3
- │ └─testthat:::expect_condition_matching(...)
- │ └─testthat:::quasi_capture(...)
- │ ├─testthat (local) .capture(...)
- │ │ └─base::withCallingHandlers(...)
- │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
- └─logrx:::set_log_name_path(log_path = ".")
Warning (test-interact.R:123:3): run_safely_loudly works for warnings, errors, messages, and output
log warning
Backtrace:
▆
- └─logrx:::run_safely_loudly(fp) at test-interact.R:123:3
- ├─logrx:::loudly(run_safely(file)) at project/R/interact.R:152:3
- │ └─base::withCallingHandlers(code, warning = wHandler, message = mHandler) at project/R/utils-execution.R:31:3
- └─purrr (local) run_safely(file) at project/R/utils-execution.R:31:3
-
├─purrr:::capture_error(.f(...), otherwise, quiet) -
│ └─base::tryCatch(...) -
│ └─base (local) tryCatchList(expr, classes, parentenv, handlers) -
│ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) -
│ └─base (local) doTryCatch(return(expr), name, parentenv, handler) -
└─logrx (local) .f(...) -
└─base::source(file, local = exec_env) at project/R/interact.R:136:5 -
├─base::withVisible(eval(ei, envir)) -
└─base::eval(ei, envir) -
└─base::eval(ei, envir)
Warning (test-interact.R:123:3): run_safely_loudly works for warnings, errors, messages, and output
log warning2
Backtrace:
▆
- └─logrx:::run_safely_loudly(fp) at test-interact.R:123:3
- ├─logrx:::loudly(run_safely(file)) at project/R/interact.R:152:3
- │ └─base::withCallingHandlers(code, warning = wHandler, message = mHandler) at project/R/utils-execution.R:31:3
- └─purrr (local) run_safely(file) at project/R/utils-execution.R:31:3
-
├─purrr:::capture_error(.f(...), otherwise, quiet) -
│ └─base::tryCatch(...) -
│ └─base (local) tryCatchList(expr, classes, parentenv, handlers) -
│ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) -
│ └─base (local) doTryCatch(return(expr), name, parentenv, handler) -
└─logrx (local) .f(...) -
└─base::source(file, local = exec_env) at project/R/interact.R:136:5 -
├─base::withVisible(eval(ei, envir)) -
└─base::eval(ei, envir) -
└─base::eval(ei, envir)
─────────────────────────────────────────────────────────────────────────
⠹ | 3 | log Removing existing log.rx environment and proceeding...
A log.rx environment already exists and cannot be used for a new execution.
This typically happens when:
- A previous logrx execution did not complete properly
- The log.rx environment was not cleaned up after a previous run
To resolve this issue, you have the following options:
- Allow logrx to remove the environment and proceed with execution
- Manually remove the environment using log_remove() or restart your R session
⠋ | 11 | log
A log.rx environment already exists and cannot be used for a new execution.
This typically happens when:
- A previous logrx execution did not complete properly
- The log.rx environment was not cleaned up after a previous run
To resolve this issue, you have the following options:
- Allow logrx to remove the environment and proceed with execution
- Manually remove the environment using log_remove() or restart your R session
A log.rx environment already exists and cannot be used for a new execution.
This typically happens when:
- A previous logrx execution did not complete properly
- The log.rx environment was not cleaned up after a previous run
To resolve this issue, you have the following options:
- Allow logrx to remove the environment and proceed with execution
- Manually remove the environment using log_remove() or restart your R session
A log.rx environment already exists and cannot be used for a new execution.
This typically happens when:
- A previous logrx execution did not complete properly
- The log.rx environment was not cleaned up after a previous run
To resolve this issue, you have the following options:
- Allow logrx to remove the environment and proceed with execution
- Manually remove the environment using log_remove() or restart your R session
A log.rx environment already exists and cannot be used for a new execution.
This typically happens when:
- A previous logrx execution did not complete properly
- The log.rx environment was not cleaned up after a previous run
To resolve this issue, you have the following options:
- Allow logrx to remove the environment and proceed with execution
- Manually remove the environment using log_remove() or restart your R session
Removing existing log.rx environment and proceeding...
✔ | 19 | log [1.3s]
⠋ | 1 | parse [1] "hello logrx"
✔ | 1 6 | parse [1.3s]
─────────────────────────────────────────────────────────────────────────
Warning (test-parse.R:15:3): read_log_file will parse a logrx log file and create the necessary object
5 parsing failures.
row col expected actual file
27 -- 7 columns 5 columns literal data
68 -- 7 columns 2 columns literal data
69 -- 7 columns 2 columns literal data
70 -- 7 columns 2 columns literal data
72 -- 7 columns 6 columns literal data
Backtrace:
▆
- ├─logrx::read_log_file(filePath) at test-parse.R:15:3
- │ └─flines %>% reformat_subsections() %>% nest_log() %>% ... at project/R/read_log_file.R:328:3
- ├─logrx:::parse_log(.)
- │ └─... %>% readr::read_table(skip = 1, col_names = FALSE) at project/R/read_log_file.R:194:5
- └─readr::read_table(., skip = 1, col_names = FALSE)
- └─readr:::read_delimited(...)
-
└─readr:::warn_problems(out)
─────────────────────────────────────────────────────────────────────────
⠋ | 1 | sha1 hello logrx
⠙ | 2 | sha1 hello again logrx
⠹ | 3 | sha1 hello logrx
✔ | 4 | sha1 [4.3s]
✔ | 2 | utils
⠸ | 14 | writer [1] "log print"
[1] "log print 2"
log catlog cat 2log inform
log inform 2
log message
log message 2
⠼ | 1 14 | writer Error: log error
⠦ | 2 15 | writer [1] "log print"
[1] "log print 2"
log catlog cat 2log inform
log inform 2
log message
log message 2
⠧ | 3 15 | writer Error: log error
⠋ | 4 17 | writer [1] 1
⠙ | 4 18 | writer [1] 1
✔ | 4 24 | writer [11.0s]
─────────────────────────────────────────────────────────────────────────
Warning (test-writer.R:189:3): write_output will return a formatted log output element
log warning
Backtrace:
▆
- └─logrx:::run_safely_loudly(fp) at test-writer.R:189:3
- ├─logrx:::loudly(run_safely(file)) at project/R/interact.R:152:3
- │ └─base::withCallingHandlers(code, warning = wHandler, message = mHandler) at project/R/utils-execution.R:31:3
- └─purrr (local) run_safely(file) at project/R/utils-execution.R:31:3
-
├─purrr:::capture_error(.f(...), otherwise, quiet) -
│ └─base::tryCatch(...) -
│ └─base (local) tryCatchList(expr, classes, parentenv, handlers) -
│ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) -
│ └─base (local) doTryCatch(return(expr), name, parentenv, handler) -
└─logrx (local) .f(...) -
└─base::source(file, local = exec_env) at project/R/interact.R:136:5 -
├─base::withVisible(eval(ei, envir)) -
└─base::eval(ei, envir) -
└─base::eval(ei, envir)
Warning (test-writer.R:189:3): write_output will return a formatted log output element
log warning2
Backtrace:
▆
- └─logrx:::run_safely_loudly(fp) at test-writer.R:189:3
- ├─logrx:::loudly(run_safely(file)) at project/R/interact.R:152:3
- │ └─base::withCallingHandlers(code, warning = wHandler, message = mHandler) at project/R/utils-execution.R:31:3
- └─purrr (local) run_safely(file) at project/R/utils-execution.R:31:3
-
├─purrr:::capture_error(.f(...), otherwise, quiet) -
│ └─base::tryCatch(...) -
│ └─base (local) tryCatchList(expr, classes, parentenv, handlers) -
│ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) -
│ └─base (local) doTryCatch(return(expr), name, parentenv, handler) -
└─logrx (local) .f(...) -
└─base::source(file, local = exec_env) at project/R/interact.R:136:5 -
├─base::withVisible(eval(ei, envir)) -
└─base::eval(ei, envir) -
└─base::eval(ei, envir)
Warning (test-writer.R:201:3): write_messages will return a formatted log messages element
log warning
Backtrace:
▆
- └─logrx:::run_safely_loudly(fp) at test-writer.R:201:3
- ├─logrx:::loudly(run_safely(file)) at project/R/interact.R:152:3
- │ └─base::withCallingHandlers(code, warning = wHandler, message = mHandler) at project/R/utils-execution.R:31:3
- └─purrr (local) run_safely(file) at project/R/utils-execution.R:31:3
-
├─purrr:::capture_error(.f(...), otherwise, quiet) -
│ └─base::tryCatch(...) -
│ └─base (local) tryCatchList(expr, classes, parentenv, handlers) -
│ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) -
│ └─base (local) doTryCatch(return(expr), name, parentenv, handler) -
└─logrx (local) .f(...) -
└─base::source(file, local = exec_env) at project/R/interact.R:136:5 -
├─base::withVisible(eval(ei, envir)) -
└─base::eval(ei, envir) -
└─base::eval(ei, envir)
Warning (test-writer.R:201:3): write_messages will return a formatted log messages element
log warning2
Backtrace:
▆
- └─logrx:::run_safely_loudly(fp) at test-writer.R:201:3
- ├─logrx:::loudly(run_safely(file)) at project/R/interact.R:152:3
- │ └─base::withCallingHandlers(code, warning = wHandler, message = mHandler) at project/R/utils-execution.R:31:3
- └─purrr (local) run_safely(file) at project/R/utils-execution.R:31:3
-
├─purrr:::capture_error(.f(...), otherwise, quiet) -
│ └─base::tryCatch(...) -
│ └─base (local) tryCatchList(expr, classes, parentenv, handlers) -
│ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) -
│ └─base (local) doTryCatch(return(expr), name, parentenv, handler) -
└─logrx (local) .f(...) -
└─base::source(file, local = exec_env) at project/R/interact.R:136:5 -
├─base::withVisible(eval(ei, envir)) -
└─base::eval(ei, envir) -
└─base::eval(ei, envir)
─────────────────────────────────────────────────────────────────────────
══ Results ══════════════════════════════════════════════════════════════
Duration: 34.9 s
[ FAIL 0 | WARN 9 | SKIP 0 | PASS 140 ]