zoonproject / zoon

The zoon R package
Other
61 stars 13 forks source link

Cran issues - Raster error on OSX, vignette build issues #240

Closed AugustT closed 8 years ago

AugustT commented 8 years ago

https://cran.rstudio.com/web/checks/check_results_zoon.html

CRAN error due to version issue with raster? This only seems to be an issue on OSX, I'll see what I can work out

The vignette issues was solved I thought but seems not. This could be a result of changes we have made on the module repo.

This is a priority to fix.

goldingn commented 8 years ago

Ahhh, shitsacks.

I can replicate those warning builds on my El Capitan machine (using the current master branch):

nick:build$ R CMD build zoon
* checking for file ‘zoon/DESCRIPTION’ ... OK
* preparing ‘zoon’:
* checking DESCRIPTION meta-information ... OK
* installing the package to build vignettes
* creating vignettes ... ERROR
Quitting from lines 108-113 (Building_a_module.Rmd)
Quitting from lines 175-178 (Building_a_module.Rmd)
Error: processing vignette 'Building_a_module.Rmd' failed with diagnostics:
cannot open the connection
Execution halted

This may help with that one: http://stackoverflow.com/questions/24867153/vignette-cant-find-data-files-during-devtoolscheck

That is stopping my build unless I omit the vignettes. If I build without vignettes, then check, I get:

nick:build$ R CMD build --no-build-vignettes zoon && R CMD check --as-cran zoon_0.4.21.tar.gz
* checking for file ‘zoon/DESCRIPTION’ ... OK
* preparing ‘zoon’:
* checking DESCRIPTION meta-information ... OK
* checking for LF line-endings in source and make files
* checking for empty or unneeded directories
* looking to see if a ‘data/datalist’ file should be added
* building ‘zoon_0.4.21.tar.gz’

* using log directory ‘/Users/nick/Dropbox/temp/build/zoon.Rcheck’
* using R version 3.2.3 (2015-12-10)
* using platform: x86_64-apple-darwin15.2.0 (64-bit)
* using session charset: UTF-8
* using option ‘--as-cran’
* checking for file ‘zoon/DESCRIPTION’ ... OK
* checking extension type ... Package
* this is package ‘zoon’ version ‘0.4.21’
* checking CRAN incoming feasibility ... WARNING
Maintainer: ‘Tom August <tomaug@ceh.ac.uk>’

Insufficient package version (submitted: 0.4.21, existing: 0.4.21)

License components with restrictions and base license permitting such:
  BSD_3_clause + file LICENSE
File 'LICENSE':
  YEAR: 2014
  COPYRIGHT HOLDER: Greg McInerny
  ORGANIZATION: Zoön project

Package has a VignetteBuilder field but no prebuilt vignette index.
Found the following (possibly) invalid URLs:
  URL: http://www.2020science.net/research/species-distribution-modelling
    From: README.md
    Status: 404
    Message: Not Found
  URL: https://rawgit.com/zoonproject/zoon/master/inst/doc/Module_IO_for_devs.html
    From: README.md
    Status: 404
    Message: Not Found
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for executable files ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking for sufficient/correct file permissions ... OK
* checking whether package ‘zoon’ can be installed ... OK
* checking installed package size ... OK
* checking package directory ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* checking whether the package can be loaded ... OK
* checking whether the package can be loaded with stated dependencies ... OK
* checking whether the package can be unloaded cleanly ... OK
* checking whether the namespace can be loaded with stated dependencies ... OK
* checking whether the namespace can be unloaded cleanly ... OK
* checking loading without being on the library search path ... OK
* checking use of S3 registration ... OK
* checking dependencies in R code ... OK
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... OK
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd line widths ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... OK
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... OK
* checking contents of ‘data’ directory ... OK
* checking data for non-ASCII characters ... OK
* checking data for ASCII and uncompressed saves ... OK
 WARNING
‘qpdf’ is needed for checks on size reduction of PDFs
* checking installed files from ‘inst/doc’ ... OK
* checking files in ‘vignettes’ ... OK
* checking examples ... OK
* checking for unstated dependencies in ‘tests’ ... OK
* checking tests ...
  Running ‘test-all.R’ [3s/18s]
 OK
* checking for unstated dependencies in vignettes ... OK
* checking package vignettes in ‘inst/doc’ ... OK
* checking running R code from vignettes ...
   ‘Building_a_module.Rmd’ using ‘UTF-8’ ... OK
   ‘basic-zoon-usage.Rmd’ using ‘UTF-8’ ... OK
   ‘interactive_zoon_usage.Rmd’ using ‘UTF-8’ ... OK
 OK
* checking re-building of vignette outputs ... NOTE
Error in re-building vignettes:
  ...
Quitting from lines 108-113 (Building_a_module.Rmd)
Quitting from lines 175-178 (Building_a_module.Rmd)
Error: processing vignette 'Building_a_module.Rmd' failed with diagnostics:
cannot open the connection
Execution halted

* checking PDF version of manual ... WARNING
LaTeX errors when creating PDF version.
This typically indicates Rd problems.
* checking PDF version of manual without hyperrefs or index ... OK
* DONE

Status: 3 WARNINGs, 1 NOTE

(note also the dead links, one of which is covered in #238)

Before I ran that, I got this intriguing one which has an error on gam, similar to the failing one (installing gam fixed it):

...
* checking package dependencies ... ERROR
Package suggested but not available: ‘gam’

The suggested packages are required for a complete check.
Checking can be attempted without them by setting the environment
variable _R_CHECK_FORCE_SUGGESTS_ to a false value.

See section ‘The DESCRIPTION file’ in the ‘Writing R Extensions’
manual.
* DONE

Status: 1 ERROR, 1 WARNING

I am happy to do test-runs before resubmission to CRAN. Though given the time difference, it may be worth exploring Travis' OSX builds, to see if you can replicate this there.

AugustT commented 8 years ago

I think I am on the case with the vignette build issues. It looks like figshare have made some changes to their URLs which are effecting how files in the vignettes are being downloaded (or not). I'm putting together a fix and will push shortly.

AugustT commented 8 years ago

Okay @goldingn @timcdlucas according to my machine and Travis we no longer have any errors with the vignette (however Travis was not flagging the vignette build failures as errors?! I have to go through the log file). Can you both check teh new version locally and make sure there are no issues with the vignettes building?

Additionally I have no evidence for the other 2 errors in the CRAN logs (because I am on windows) namely:

On OSX

Package required and available but unsuitable version: ‘raster’

See section ‘The DESCRIPTION file’ in the ‘Writing R Extensions’
manual. 

Can one of you investigate this if you have OSX?

On Solaris

    Error in re-building vignettes:
     ...
    PATH and PKG_CONFIG_PATH contains a libv8.pc file. If pkg-config
    is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:
    R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
    --------------------------------------------------------------------
    ERROR: configuration failed for package ‘V8’
    * removing ‘/home/ripley/R/Lib32/V8’
    Warning in install.packages(package, repos = "http://cran.rstudio.com") :
     installation of package 'V8' had non-zero exit status
    ERROR: dependency ‘V8’ is not available for package ‘rgbif’
    * removing ‘/home/ripley/R/Lib32/rgbif’
    Warning in install.packages(package, repos = "http://cran.rstudio.com") :
     installation of package 'rgbif' had non-zero exit status
    ERROR: dependencies ‘rgbif’, ‘V8’ are not available for package ‘spocc’
    * removing ‘/home/ripley/R/Lib32/spocc’
    Warning in install.packages(package, repos = "http://cran.rstudio.com") :
     installation of package 'spocc' had non-zero exit status
    Quitting from lines 151-175 (basic-zoon-usage.Rmd) 
    Warning in min(x) : no non-missing arguments to min; returning Inf
    Warning in max(x) : no non-missing arguments to max; returning -Inf
    Warning in min(x) : no non-missing arguments to min; returning Inf
    Warning in max(x) : no non-missing arguments to max; returning -Inf
    Quitting from lines 151-175 (basic-zoon-usage.Rmd) 
    Error: processing vignette 'basic-zoon-usage.Rmd' failed with diagnostics:
    need finite 'xlim' values
    Execution halted 

I thought this might be an error with gbif or spocc but neither of them are reporting this issue. I don't have access to Solaris, do either of you? This error occurs when using the spocc module in one of the examples. It might be that these errors have been fixed while I have been tinkering with the vignettes...

timcdlucas commented 8 years ago

I was getting

zoon $ R CMD build zoon
* checking for file ‘zoon/DESCRIPTION’ ... OK
* preparing ‘zoon’:
* checking DESCRIPTION meta-information ... OK
* installing the package to build vignettes
* creating vignettes ... ERROR
Warning in engine$weave(file, quiet = quiet, encoding = enc) :
  Pandoc (>= 1.12.3) and/or pandoc-citeproc is not available. Please install both.
Error: processing vignette 'Building_a_module.Rmd' failed with diagnostics:
It seems you should call rmarkdown::render() instead of knitr::knit2html() because Building_a_module.Rmd appears to be an R Markdown v2 document.

Changed DESCRIPTION to

Suggests:
    knitr,
    rmarkdown,
    testthat,
    gam,
    spocc
VignetteBuilder: rmarkdown

and then build was ok. Got a few notes with R CMD check --as-cran

* checking CRAN incoming feasibility ... NOTE
Maintainer: ‘Tom August <tomaug@ceh.ac.uk>’

License components with restrictions and base license permitting such:
  BSD_3_clause + file LICENSE
File 'LICENSE':
  YEAR: 2014
  COPYRIGHT HOLDER: Greg McInerny
  ORGANIZATION: Zoön project

Package has a VignetteBuilder field but no prebuilt vignette index.

and

* checking package dependencies ... NOTE
  No repository set, so cyclic dependency check skipped
* checking top-level files ... NOTE
Non-standard file/directory found at top level:
  ‘cache’

The notes don't look like a big deal. But did you not have to change the vignette builder as well?

goldingn commented 8 years ago

@timcdlucas the first of your two notes is because you don't have a default CRAN mirror set in your R profile; that doesn't show up when CRAN/Travis checks things.

The second might have occurred because you ran check on the directory, rather than a tarball. If you build the tarball first, then check that (as CRAN/our Travis does) it'll ignore those directories.

@augustt will give this a go today and get back to you.

I'm not surprised V8 doesn't run on Solaris! Not sure whether this is a new/temporary state of affairs. Scott may have insight if it's a major problem

goldingn commented 8 years ago

The CRAN page for raster says that the binaries for OSX Mavericks are out of date: 2.4-18, whilst the current version is 2.5-2 and we require 2.4-20. There is an archived tarball of 2.4-20 so I'm not sure why this is an issue.

It might be worth pushing back to CRAN and asking them if they'll be updating the Mavericks binaries soon.

Failing that we could roll back to raster 2.4-18, but its icky.

AugustT commented 8 years ago

Thanks guys, I'll add in that vignette builder line. As Nick said I don't think the others are biggies. @goldingn did you run checks on your machine? Anything to report?

goldingn commented 8 years ago

Will try today!

AugustT commented 8 years ago

Once I get an OK from @goldingn i will send an update to CRAN

goldingn commented 8 years ago

Yup, all checks out fine on my machine!

AugustT commented 8 years ago

I have submitted a new version

AugustT commented 8 years ago

Has come back with

VignetteBuilder field but no prebuilt vignette index

Which is something @timcdlucas saw above.

AugustT commented 8 years ago

I think this originates from the change to the Vignette builder. I am working on a fix.

AugustT commented 8 years ago

Not helped by the fact http://biogeo.ucdavis.edu is unresponsive. Can we just remove all web calls from tests and vignettes and modules. Would make life a lot easier!

AugustT commented 8 years ago

@timcdlucas so I think the change to rmarkdown as the vignette builder was causeing problems. I have moved it back to knitr but changed the top part of the vignettes to specify rmarkdown::html_vignette:

Once I get it pulled in to the main repo can you try it out and see if you still get the error you reported earlier?

AugustT commented 8 years ago

On Cran

timcdlucas commented 8 years ago

Oh that's me! Right. Yes I'll do this now.

timcdlucas commented 8 years ago

Looks fine. One note of note:

* checking package dependencies ... NOTE
  No repository set, so cyclic dependency check skipped

I had to update my pandoc. It might have been that in the first place. Very sorry if I led you on a goose chase. The ubuntu repo version of pandoc is quite old.