-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
Two test cases in test-norm_matrix_range fail on PowerPC: identical s not TRUE #27
Comments
the current version of OpenImageR (1.2.8) passes all tests on CRAN for all three operating systems (Linux, Mac OSX, Windows). Which version of OpenImageR you use and for which operating system? |
CRAN tests are pretty useless to test anything but a few mainstream OS versions. This is 1.2.8 on 10.6.8 Rosetta (so ppc32); R 4.3.0, gcc 12.2.0. |
I took a look because I'm not familiar with Power PC's (if this is meant by 'ppc32')
It's not easy to check besides the various operating systems also specific versions of hardware and most of the times besides testing and checking locally I use also R-hub |
It may be hard to emulate 10.5 or 10.6 ppc (unless you use a VM, then Rosetta allows building and running ppc binaries, or otherwise have an 2010–2012 Mac to install 10.6.8), but Linux on ppc 32-bit should be possible via GH actions or similar setups. (Theoretically, Qemu should emulate the arch, but I have no experience here and dunno how well that works. Rosetta in VM works fine for the most development tasks, exceptions are there, but irrelevant to our case.) But I realise this may be a pain to deal with. I can do testing on my end, if you could suggest to try something. |
the 2 test cases that fail seem to be related to rounding differences between the operating systems testthat::test_that("the 'norm_matrix_range' returns the correct output ( range = c(-1,1) )", {
# rounded to 8 digits as in np$interp()
res = round(norm_matrix_range(mt, min_value = MIN, max_value = MAX), 8)
testthat::expect_true(identical(res, np_res))
})
testthat::test_that("the 'norm_matrix_range' returns the correct output ( range = c(0,255) )", {
# rounded to 8 digits as in np$interp()
res = round(norm_matrix_range(mt, min_value = MIN_, max_value = MAX_), 8)
testthat::expect_true(identical(res, np_res_255))
})
I can add an exception for these 2 test cases for your OS and arch. Can you show me what you receive when you run the following in R or Rstudio (exclude any personal info if printed in the console)? str(.Platform)
Sys.info()[c("sysname", "release", "version", "machine")]
str(version) Normally, these exceptions are discouraged on CRAN but I think it's acceptable for cases as yours |
@mlampros Here is the output on 10.6.8:
There are four relevant PPC cases on macOS: 10.4.11, 10.5.8, 10.6 ppc (10A190) and 10.6.8 Rosetta.
|
I added an exception in the test-file for the case of a Mac OSx Power-pc remotes::install_github('mlampros/OpenImageR', dependencies = TRUE)
and confirm that it works for you as well |
@mlampros Thank you, yes:
|
Thank you too for making me aware of this issue. In the next days I'll submit the updated version to CRAN. |
The text was updated successfully, but these errors were encountered: