miyamot0 / fxl

FXL is an R package designed to accommodate the unique features and conventions commonly used when visualizing single case data. At present, these conventions are only accommodated in spreadsheet software (thus, faux XL).
http://www.smallnstats.com
GNU General Public License v3.0
8 stars 0 forks source link

Many tests fail on 10.6.8 Rosetta [ FAIL 32 | WARN 0 | SKIP 0 | PASS 78 ] #57

Open barracuda156 opened 1 year ago

barracuda156 commented 1 year ago

UPD. Native PowerPC build and tests appear good (see below).

R version 4.3.0 (2023-04-21) -- "Already Tomorrow"
Copyright (C) 2023 The R Foundation for Statistical Computing
Platform: powerpc-apple-darwin10.8.0 (32-bit)

> library(testthat)
> library(fxl)
Loading required package: rlang

Attaching package: 'rlang'

The following objects are masked from 'package:testthat':

    is_false, is_null, is_true

Loading required package: grImport
Loading required package: grid
Loading required package: XML
> 
> test_check("fxl")
[ FAIL 32 | WARN 0 | SKIP 0 | PASS 78 ]

══ Failed tests ════════════════════════════════════════════════════════════════
── Failure ('test-demo-concurrentplot.R:13:5'): Concurrent Plot Style: Should render as normal ──
Expected `print(...)` to run without any errors.
i Actually got a <simpleError>:
  Error in `plot.new()`:
  ! figure margins too large
── Failure ('test-demo-concurrentplot.R:13:5'): Concurrent Plot Style: Should render as normal ──
Expected `print(...)` to run without any errors.
i Actually got a <simpleError>:
  Error in `par()`:
  ! invalid value specified for graphical parameter "mai"
── Failure ('test-demo-cumulativeplot.R:3:5'): Cumulative Plot Style: Should render as normal ──
Expected `print(...)` to run without any errors.
i Actually got a <simpleError>:
  Error in `plot.new()`:
  ! figure margins too large
── Failure ('test-demo-cumulativeplot.R:3:5'): Cumulative Plot Style: Should render as normal ──
Expected `print(...)` to run without any errors.
i Actually got a <simpleError>:
  Error in `par()`:
  ! invalid value specified for graphical parameter "fig"
── Error ('test-demo-cumulativeplot_single.R:6:5'): Cumulative Plot Style: Should render as normal ──
Error in `plot.new()`: figure margins too large
Backtrace:
     ▆
  1. ├─testthat::expect_error(...) at test-demo-cumulativeplot_single.R:6:4
  2. │ └─testthat:::expect_condition_matching(...)
  3. │   └─testthat:::quasi_capture(...)
  4. │     ├─testthat (local) .capture(...)
  5. │     │ └─base::withCallingHandlers(...)
  6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
  7. ├─base::print(...)
  8. └─fxl::print.fxl(...)
  9.   ├─base::plot(...)
 10.   └─graphics::plot.default(...)
 11.     └─graphics::plot.new()
── Error ('test-demo-cumulativeplot_single.R:6:5'): Cumulative Plot Style: Should render as normal ──
Error in `par(opar)`: invalid value specified for graphical parameter "mar"
Backtrace:
    ▆
 1. ├─testthat::expect_error(...) at test-demo-cumulativeplot_single.R:6:4
 2. │ └─testthat:::expect_condition_matching(...)
 3. │   └─testthat:::quasi_capture(...)
 4. │     ├─testthat (local) .capture(...)
 5. │     │ └─base::withCallingHandlers(...)
 6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
 7. ├─base::print(...)
 8. └─fxl::print.fxl(...)
 9.   └─graphics::par(opar)
── Failure ('test-demo-faplot.R:5:5'): FA Plot Style: Should render as normal ──
Expected ``%>%`(...)` to run without any errors.
i Actually got a <simpleError>:
  Error in `plot.new()`:
  ! figure margins too large
── Failure ('test-demo-faplot.R:5:5'): FA Plot Style: Should render as normal ──
Expected ``%>%`(...)` to run without any errors.
i Actually got a <simpleError>:
  Error in `par()`:
  ! invalid value specified for graphical parameter "fig"
── Failure ('test-demo-faplotintegrity.R:13:5'): FA Plot with Integrity: Should render as normal ──
Expected `print(...)` to run without any errors.
i Actually got a <simpleError>:
  Error in `plot.new()`:
  ! figure margins too large
── Failure ('test-demo-faplotintegrity.R:13:5'): FA Plot with Integrity: Should render as normal ──
Expected `print(...)` to run without any errors.
i Actually got a <simpleError>:
  Error in `par()`:
  ! invalid value specified for graphical parameter "mar"
── Failure ('test-demo-faplotintegrity_extra.R:83:5'): FA Plot with Integrity: Should render as normal ──
Expected `print(...)` to run without any errors.
i Actually got a <simpleError>:
  Error in `plot.new()`:
  ! figure margins too large
── Failure ('test-demo-faplotintegrity_extra.R:83:5'): FA Plot with Integrity: Should render as normal ──
Expected `print(...)` to run without any errors.
i Actually got a <simpleError>:
  Error in `par()`:
  ! invalid value specified for graphical parameter "fig"
── Failure ('test-demo-image-draws.R:34:5'): Image Draw Layer: Should render as normal ──
Expected `print(...)` to run without any errors.
i Actually got a <simpleError>:
  Error in `plot.new()`:
  ! figure margins too large
── Failure ('test-demo-image-draws.R:34:5'): Image Draw Layer: Should render as normal ──
Expected `print(...)` to run without any errors.
i Actually got a <simpleError>:
  Error in `par()`:
  ! invalid value specified for graphical parameter "mar"
── Failure ('test-demo-image-draws.R:127:5'): Image Draw Layer: Should render as normal without phases ──
Expected `print(...)` to run without any errors.
i Actually got a <simpleError>:
  Error in `plot.new()`:
  ! figure margins too large
── Failure ('test-demo-image-draws.R:127:5'): Image Draw Layer: Should render as normal without phases ──
Expected `print(...)` to run without any errors.
i Actually got a <simpleError>:
  Error in `par()`:
  ! invalid value specified for graphical parameter "fig"
── Failure ('test-demo-image-draws.R:219:5'): Image Draw Layer: Should render as normal without facets ──
Expected `print(...)` to run without any errors.
i Actually got a <simpleError>:
  Error in `plot.new()`:
  ! figure margins too large
── Failure ('test-demo-image-draws.R:219:5'): Image Draw Layer: Should render as normal without facets ──
Expected `print(...)` to run without any errors.
i Actually got a <simpleError>:
  Error in `par()`:
  ! invalid value specified for graphical parameter "mar"
── Failure ('test-demo-multiplebaseline_greyed.R:98:5'): MBL Greyed out Plot Style: Should render as normal ──
Expected `print(...)` to run without any errors.
i Actually got a <simpleError>:
  Error in `plot.new()`:
  ! figure margins too large
── Failure ('test-demo-multiplebaseline_greyed.R:98:5'): MBL Greyed out Plot Style: Should render as normal ──
Expected `print(...)` to run without any errors.
i Actually got a <simpleError>:
  Error in `par()`:
  ! invalid value specified for graphical parameter "fig"
── Failure ('test-demo-multiplebaseline_greyed.R:303:5'): MBL Greyed out Plot Style: Should specific to facet ──
Expected `print(...)` to run without any errors.
i Actually got a <simpleError>:
  Error in `plot.new()`:
  ! figure margins too large
── Failure ('test-demo-multiplebaseline_greyed.R:303:5'): MBL Greyed out Plot Style: Should specific to facet ──
Expected `print(...)` to run without any errors.
i Actually got a <simpleError>:
  Error in `par()`:
  ! invalid value specified for graphical parameter "mar"
── Failure ('test-demo-multiplebaselineplot.R:5:5'): MBL Plot Style: Should render as normal ──
Expected `print(...)` to run without any errors.
i Actually got a <simpleError>:
  Error in `plot.new()`:
  ! figure margins too large
── Failure ('test-demo-multiplebaselineplot.R:5:5'): MBL Plot Style: Should render as normal ──
Expected `print(...)` to run without any errors.
i Actually got a <simpleError>:
  Error in `par()`:
  ! invalid value specified for graphical parameter "fig"
── Failure ('test-demo-semilogplot.R:28:5'): Semi Log Plot Style: Should render as normal ──
Expected `print(...)` to run without any errors.
i Actually got a <simpleError>:
  Error in `plot.new()`:
  ! figure margins too large
── Failure ('test-demo-semilogplot.R:28:5'): Semi Log Plot Style: Should render as normal ──
Expected `print(...)` to run without any errors.
i Actually got a <simpleError>:
  Error in `par()`:
  ! invalid value specified for graphical parameter "mar"
── Failure ('test-demo-semilogplot_multi.R:131:5'): Semi Log Plot Style-Multiplanel: Should render as normal ──
Expected `print(...)` to run without any errors.
i Actually got a <simpleError>:
  Error in `plot.new()`:
  ! figure margins too large
── Failure ('test-demo-semilogplot_multi.R:131:5'): Semi Log Plot Style-Multiplanel: Should render as normal ──
Expected `print(...)` to run without any errors.
i Actually got a <simpleError>:
  Error in `par()`:
  ! invalid value specified for graphical parameter "fig"
── Failure ('test-demo-silvermanplot.R:12:5'): Silverman Plot Style: Should render as normal ──
Expected `print(...)` to run without any errors.
i Actually got a <simpleError>:
  Error in `plot.new()`:
  ! figure margins too large
── Failure ('test-demo-silvermanplot.R:12:5'): Silverman Plot Style: Should render as normal ──
Expected `print(...)` to run without any errors.
i Actually got a <simpleError>:
  Error in `par()`:
  ! invalid value specified for graphical parameter "mar"
── Error ('test-element-scr_xoverride.R:3:5'): scr_xoverride: Should render as normal ──
Error in `par(opar)`: invalid value specified for graphical parameter "fig"
Backtrace:
    ▆
 1. ├─testthat::expect_error(...) at test-element-scr_xoverride.R:3:4
 2. │ └─testthat:::expect_condition_matching(...)
 3. │   └─testthat:::quasi_capture(...)
 4. │     ├─testthat (local) .capture(...)
 5. │     │ └─base::withCallingHandlers(...)
 6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
 7. ├─base::print(...)
 8. └─fxl::print.fxl(...)
 9.   └─graphics::par(opar)
── Error ('test-element-scr_yoverride.R:3:5'): scr_yoverride: Should render as normal ──
Error in `par(opar)`: invalid value specified for graphical parameter "mar"
Backtrace:
    ▆
 1. ├─testthat::expect_error(...) at test-element-scr_yoverride.R:3:4
 2. │ └─testthat:::expect_condition_matching(...)
 3. │   └─testthat:::quasi_capture(...)
 4. │     ├─testthat (local) .capture(...)
 5. │     │ └─base::withCallingHandlers(...)
 6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
 7. ├─base::print(...)
 8. └─fxl::print.fxl(...)
 9.   └─graphics::par(opar)

[ FAIL 32 | WARN 0 | SKIP 0 | PASS 78 ]
Error: Test failures
Execution halted

P. S. figure margins too large is a known error (though its cause is unknown to me), so not specific to the package.

miyamot0 commented 1 year ago

Yeah, I think know what this is. Part of the craziness with supporting annotations across subplots is factoring in padding/margins so that the right coordinates can be inferred. IIRC, R will bug out if certain fonts do not fit within those margins and I don't know if I can pre-specify a specific font.

Can you share some details? Was this a straight up stock run?

barracuda156 commented 1 year ago

@miyamot0 I ran a version from CRAN, but I have just tried from the latest commit, and results are identical. (No patches were applied to the source, if that is what you mean.)

(These were in Rosetta; let me try on a native PowerPC machine, but normally they are identical in terms of failures.)

barracuda156 commented 1 year ago

@miyamot0 Ha, no errors on PowerPC system! Rosetta errors are not worth wasting time on, to be honest. But I wonder what goes wrong on it. (PPC machine has a slightly newer GCC, 12.3.0, but this unlikely to matter here.)

barracuda156 commented 1 year ago
R version 4.3.1 (2023-06-16) -- "Beagle Scouts"
Copyright (C) 2023 The R Foundation for Statistical Computing
Platform: powerpc-apple-darwin10.0.0d2 (32-bit)

> library(testthat)
> library(fxl)
Loading required package: rlang

Attaching package: 'rlang'

The following objects are masked from 'package:testthat':

    is_false, is_null, is_true

Loading required package: grImport
Loading required package: grid
Loading required package: XML
> 
> test_check("fxl")
[ FAIL 0 | WARN 0 | SKIP 0 | PASS 81 ]
> #
> 
> proc.time()
   user  system elapsed 
 57.752   7.619  66.346 

UPD. Hmm, why total number of tests differs? 81 pass here (0 everything else), 78 pass + 32 failures on Rosetta.

miyamot0 commented 1 year ago

Hmm, I think I may have written tests poorly (still new to unit testing in R). I'll dig into this if there may be a concurrency issue. In my experience, variability between tests is usually my fault.

Thanks for the follow-up -- much appreciated!

barracuda156 commented 1 year ago

@miyamot0 Thank you very much!