Skip to content
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

urgent: CRAN fix for c.POSIXct() #375

Closed
adokter opened this issue Apr 28, 2020 · 17 comments
Closed

urgent: CRAN fix for c.POSIXct() #375

adokter opened this issue Apr 28, 2020 · 17 comments
Labels
Milestone

Comments

@adokter
Copy link
Owner

adokter commented Apr 28, 2020

Dear maintainer,

Pls see
<https://CRAN.R-project.org/web/checks/check_results_bioRad.html>: more
ERRORs for r-devel will follow.

I recently fixed a bug report for c.POSIXct so that this now reasonably
coerces all arguments to POSIXct.  

In your case, a traceback for the failing example shows

11: c.POSIXct(x, y)
10: c(x, y)
9: plot_wind_barbs(barbdata$date, barbdata$height, 180 + barbdata$dd, 
      barbdata$ff, cex = 0.7)
8: plot.vpts(example_vpts)

so the problem is with the c(x, y) in  plot_wind_barbs where x is a
datetime object and y is not.

Can you pls fix as necessary?

Please correct before 2020-05-12 to safely retain your package on CRAN.

Best
-k
@adokter adokter added the bug label Apr 28, 2020
@adokter adokter added this to the 0.6.0 milestone Apr 28, 2020
@adokter
Copy link
Owner Author

adokter commented Apr 28, 2020

@peterdesmet we should fix this one together with the PRs for unit tests that we will publish soon. Deadline is soon, May 12 the package will be archived on CRAN.

@adokter
Copy link
Owner Author

adokter commented Apr 28, 2020

Error seems to thrown here:

bioRad/R/plot.vpts.R

Lines 411 to 412 in 5ee47fe

S1 <- S1 * c(scalex, scaley) + c(x, y)
S2 <- S2 * c(scalex, scaley) + c(x, y)

@adokter
Copy link
Owner Author

adokter commented Apr 28, 2020

Some more info from Kurt Hornik on the change:

The svn log entry is

r78312 | hornik | 2020-04-27 13:56:36 +0200 (Mon, 27 Apr 2020) | 4 lines

Allow combining POSIXct with POSIXlt objects, and other things coercible
to POSIXct (PR#16241).

but what changed is as I wrote:  c.POSIXct now coerces all arguments to
POSIXct.

adokter added a commit that referenced this issue Apr 28, 2020
@adokter
Copy link
Owner Author

adokter commented Apr 28, 2020

@peterdesmet @niconoe I don't fully understand what has changed, but fix 33ef0c2 and 49e7e64 should bypass the call to c.POSIXct() that throws the error, and hopefully fix this problem

Can't really test this as it's only available on the latest R dev version, and I can't easily compile that on OSX

adokter added a commit that referenced this issue Apr 28, 2020
@peterdesmet
Copy link
Collaborator

peterdesmet commented Apr 29, 2020

Regarding:

we should fix this one together with the PRs for unit tests

Ok, I'm churning through the PRs. #361 almost done. Are your #348 and #362 ready for review, or are you working further on those? I think we should wait with including 365.

Will this be a 0.5.1 hotfix or a 0.6?

@niconoe
Copy link
Contributor

niconoe commented Apr 29, 2020

Can I do something to help solving this? I have access to Windows/linux machines if that helps... What should be done? Install/compile R development version and try to install bioRad develop branch?

@peterdesmet
Copy link
Collaborator

@adokter @bart1 Integrating #361 has raised a 4 errors:

test-integrate_to_ppi.R:9: error: integrate_to_ppi() raster argument produces expected output
Can't find quantity `height` in `x`.

Can you adapt the test?

@adokter
Copy link
Owner Author

adokter commented Apr 29, 2020

@niconoe

Can I do something to help solving this? I have access to Windows/linux machines if that helps... What should be done? Install/compile R development version and try to install bioRad develop branch?

Yes, such testing on the latest dev version for Windows/linux would be great.

There are also https://win-builder.r-project.org/ and https://builder.r-hub.io/ which performs tests, but it takes often > half hour to get test results, and hard to debug. But maybe still quickest option?

@adokter
Copy link
Owner Author

adokter commented Apr 29, 2020

@peterdesmet

Are your #348 and #362 ready for review, or are you working further on those? I think we should wait with including 365.

Those are ready for review, and can be merged after that. Agree with waiting with #365

Will this be a 0.5.1 hotfix or a 0.6?

I think it should be 0.6 - Some new functionality, lots of new unit tests and documentation improvements, so more than just a hotfix. Note I started already https://github.com/adokter/bioRad/blob/develop/NEWS.md update

@adokter
Copy link
Owner Author

adokter commented Apr 29, 2020

@adokter @bart1 Integrating #361 has raised a 4 errors:

@peterdesmet fixed in ba3189e, tests were ok, minor fix in get_quantity.vp() to allow selection of height quantity (#352).

@adokter
Copy link
Owner Author

adokter commented Apr 29, 2020

I'll run rhub::check_for_cran overnight to check the package on R-hub

@adokter
Copy link
Owner Author

adokter commented Apr 30, 2020

R-hub test fails on get_quantity unit test. Commenting out the test and will submit R-hub test again.

Build ID: bioRad_0.5.1.9344.tar.gz-e5cdbbd80ca843529840fcc0aa94e850
Platform: Fedora Linux, R-devel, clang, gfortran
Submitted: 44 minutes 9.2 seconds ago
Build time: 44 minutes 8.4 seconds
* checking tests ...
  Running ‘testthat.R’ [26s/26s]
 ERROR
Running the tests in ‘tests/testthat.R’ failed.
Last 13 lines of output:
  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 282 | SKIPPED: 38 | WARNINGS: 4 | FAILED: 17 ]
  1. Failure: get_quantity.vpts() return a matrix for all 16 quantities (@test-get_quantity.R#104) 
  2. Failure: get_quantity.vpts() return a matrix for all 16 quantities (@test-get_quantity.R#105) 
  3. Failure: get_quantity.vpts() return a matrix for all 16 quantities (@test-get_quantity.R#106) 
  4. Failure: get_quantity.vpts() return a matrix for all 16 quantities (@test-get_quantity.R#107) 
  5. Failure: get_quantity.vpts() return a matrix for all 16 quantities (@test-get_quantity.R#108) 
  6. Failure: get_quantity.vpts() return a matrix for all 16 quantities (@test-get_quantity.R#109) 
  7. Failure: get_quantity.vpts() return a matrix for all 16 quantities (@test-get_quantity.R#110) 
  8. Failure: get_quantity.vpts() return a matrix for all 16 quantities (@test-get_quantity.R#111) 
  9. Failure: get_quantity.vpts() return a matrix for all 16 quantities (@test-get_quantity.R#112) 
  1. ...
  
  Error: testthat unit tests failed
  Execution halted

@niconoe
Copy link
Contributor

niconoe commented Apr 30, 2020

I'm trying to install bioRad on Windows (R dev version), but get the following error:

githubinstall("bioRad", ref="develop")
Suggestion:
 - adokter/bioRad  R package for extracting and visualising biological signals from weather radar data
Do you want to install the package (Y/n)?  Y
Downloading GitHub repo adokter/bioRad@develop
Installing 42 packages: fields, ggmap, ggplot2, lubridate, lutz, raster, rgdal, rhdf5, sp, tidyr, viridisLite, viridis, maptools, dotCall64, gtable, isoband, scales, tibble, Rcpp, farver, labeling, munsell, RColorBrewer, vctrs, colorspace, utf8, png, tidyselect, plogr, purrr, stringi, dplyr, generics, spam, maps, RgoogleMaps, plyr, rjson, jpeg, bitops, Rhdf5lib, gridExtra
Installing packages into ‘C:/Users/nicol/Documents/R/win-library/4.1’
(as ‘lib’ is unspecified)
Erreur : Failed to install 'bioRad' from GitHub:
  (converti depuis l'avis) unable to access index for repository https://bioconductor.org/packages/3.12/bioc/bin/windows/contrib/4.1:
  impossible d'ouvrir l'URL 'https://bioconductor.org/packages/3.12/bioc/bin/windows/contrib/4.1/PACKAGES'
De plus : Warning message:
In fread(download_url, sep = "\t", header = FALSE, stringsAsFactors = FALSE,  :
  Found and resolved improper quoting out-of-sample. First healed line 4848: <<Puriney	honfleuR	"Evening, honfleuR" by Seurat>>. If the fields are not quoted (e.g. field separator does not appear within any field), try quote="" to avoid this warning.
> 

It looks more like an install problem than a problem in the package itself, it might be my lack of experience.

@adokter
Copy link
Owner Author

adokter commented Apr 30, 2020

Hi @niconoe, thanks for trying this - I would try enabling bioconductor repo's as well, in addition to CRAN, with:

setRepositories(ind = 1:2)

It needs bioconductor to install the rhdf5 package. You can also try to install it manually, see https://www.bioconductor.org/packages/release/bioc/html/rhdf5.html

@niconoe
Copy link
Contributor

niconoe commented Apr 30, 2020

I'm still struggling:

  • enabling bioconductor doesn"t change the error.
  • while manually installing rhdf5 it has issues linking with rhdf5lib (that I also installed, first via bioconductor then directly from GitHub). After a successful compilation step:
Error in library.dynam(lib, package, package.lib) : 
  La DLL 'Rhdf5lib' est introuvable : elle n'est peut-être pas installée pour cette architecture ?
Calls: :: ... asNamespace -> getNamespace -> loadNamespace -> library.dynam
Exécution arrêtée
Error in library.dynam(lib, package, package.lib) : 
  La DLL 'Rhdf5lib' est introuvable : elle n'est peut-être pas installée pour cette architecture ?
Calls: :: ... asNamespace -> getNamespace -> loadNamespace -> library.dynam
Exécution arrêtée
Error in library.dynam(lib, package, package.lib) : 
  La DLL 'Rhdf5lib' est introuvable : elle n'est peut-être pas installée pour cette architecture ?
Calls: :: ... asNamespace -> getNamespace -> loadNamespace -> library.dynam
Exécution arrêtée
...

@adokter
Copy link
Owner Author

adokter commented Apr 30, 2020

Not sure why your build fails either @niconoe, many packages are having issues since recent R 4.0 release, maybe that is part of it

@adokter
Copy link
Owner Author

adokter commented Apr 30, 2020

R-hub build (rhub::check_with_rdevel(), running Debian Linux, R-devel, GCC) passes when commenting out unit tests #377 and #378, so the original bug report by CRAN (#375 (comment)) seems to be fixed by commits 33ef0c2 and 49e7e64

@adokter adokter closed this as completed May 10, 2020
@peterdesmet peterdesmet modified the milestones: 0.6.0, 0.5.2 May 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants