So I've been trying to set up package checks on my github package but running into issues. Basically the package is erroring during the checks with following error:
Error: --- re-building ‘Cell_Bender_Functions.Rmd’ using rmarkdown
Quitting from lines 48-54 (Cell_Bender_Functions.Rmd)
Error: Error: processing vignette 'Cell_Bender_Functions.Rmd' failed with diagnostics:
there is no package called 'tidyverse'
--- failed re-building ‘Cell_Bender_Functions.Rmd’
Basically failing because can't find tidyverse because to minimize explicit package dependencies I don't list tidyverse but use that example and my vignettes. I have tried setting Project options so that the checks don't build the vignettes (see image)
but even then it still seems to attempt to build the vignettes and errors at the same place. Am I missing something? Apologies if this is simple answer but having trouble finding exact issue in this or other forums.
Yes I actually just figured out the Suggests solution now actually but have run into 1 other kinda related issue. I have some local files which are used to build vignettes and create pkgdown website. The site builds with no issues. But the rcmdcheck is erroring with: Failed to open assets/marsh_2020_micro.qs. Check file path.
Since I have pkgdown site which checks the vignettes when I do the build_site I would simply like to exclude the vignette rebuild during the check. Is there way to specify that which I'm missing? I thought specifying things in Project options (see image in original post) would do it but apparently not?
I think precomputing is best approach because couple of them also rely on local data files or data packages that are installed from other packages so easiest to precompute locally.
I'll give that try and see if it solves the issues.
So I followed idea of renaming .Rmd with .orig at the end and then knitting locally. I did just for a two of the vignettes to start just to make sure everything looks ok. But I'm now getting earlier error during the build step in the check:
Failed to build source package 'scCustomize', stdout + stderr:
OE> * installing *source* package ‘scCustomize’ ...
OE> staged installation is only possible with locking
OE> ** using non-staged installation
OE> ** R
OE> ** data
OE> *** moving datasets to lazyload DB
OE> ** byte-compile and prepare package for lazy loading
OE> Warning in file(con, "r") :
OE> cannot open file 'vignettes/Read_and_Write_Functions.Rmd.orig': No such file or directory
OE> Error in file(con, "r") : cannot open the connection
OE> Error: unable to load R code in package ‘scCustomize’
OE> Execution halted
OE> ERROR: lazy loading failed for package ‘scCustomize’
OE> * removing ‘/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/RtmpjsfMWD/pkg-libd1270365e48/scCustomize’
@samuel_marsh! You have put the .orig files in .Rbuildignore but you have the code to compile them under R/ so R was trying to compile them but they weren't there. That code should be in another folder, and might .Rbuildignore-d.