Add vignette precompute function and shift parallel vignette to precomputed - #83
Conversation
|
Out of interest, the failing CI check is just that oldrel-1 uses a version of R prior to 4.5.1, which is a requirement of ggrepl as of 0.9.7 (which was released about a week ago). It should go away once oldrel-1 is updated (I guess by github?) Most importantly the Windows CI check succeeded! |
|
Hi @fwimp. This all looks great. Highly unlikely, but if two code chunks from different files have the same name, will plots get overwritten? Is it possible to render figures in a subfolder of vignettes/figure, with the folder names by the vignette name. I know right now it is not an issue but might be in the future (theoretically). |
|
Hey @padpadpadpad, Frustratingly that is precisely what will happen and there's basically no easy way around it, at least without developing a good chunk of extra code. Bear in mind though this only happens with pre-baked vignettes. This is because Technically you could do a pre-pass on the Rmd to patch in I think if I were to be doing things like that, this would quickly spiral out into being its own package ( The only mitigation I could plausibly do (though even this would be pretty brutal) would be to prepend the vignette name to every chunk name in an Rmd, but honestly that is too much work unless we actively need to fix it. |
|
Agree with you @fwimp. Will try get onto CRAN checks this week and submit a new version there. |
This pull request shifts the long-problematic
quickfit_parallelvignette over to a precomputed pipeline.It stops the weirdness of
miraipackage propagation from causing issues with vignette compilation on CI.To copy from #81:
prerender_vignettesfolder at the root of the package.R/rTPC-internal-devtools.Rnow contains a couple of developer-focused functions to make dev work easier (most importantly the.precompute_vignettes()function). These are not built into the final package.fig.cap=set to a reasonable value in the chunk options (otherwise you just get forced to have a caption of "plot of chunk chunk_name")vignettes/figurefolder under their chunk names.prerender_vignettesfolderprerender_vignettes, load rTPC and run.precompute_vignettes("prerender_vignettes", cores = 1). (Remember to do this whenever you have made changes to a source vignette)R CMD CHECK now passes with no errors.
This approach does, however, trigger a note which is bloody hard to suppress. As such I currently have
vignettes/figureignored in.Rbuildignore.This seems to suppress the note, but the figure may be missing from installed versions of rTPC (though from my experimentation it all seemed fine).