Closed nikosbosse closed 3 weeks ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 95.62%. Comparing base (
948f251
) to head (72ebb06
). Report is 10 commits behind head on main.:exclamation: Current head 72ebb06 differs from pull request most recent head 7f9e516. Consider uploading reports for the commit 7f9e516 to get more accurate results
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
~Oh well this fails on CI and I don't know why... It works locally on my machine... Maybe something to do with pdfpages...~
EDIT: the failure comes from the fact that all other vignettes are compiled to HTML and github actions don't install tinytex by default. I updated the github actions yaml.
Next issue:
checking sizes of PDF files under ‘inst/doc’ ... WARNING
‘gs+qpdf’ made some significant size reductions:
compacted ‘scoringutils-paper.pdf’ from 1002Kb to 505Kb
consider running tools::compactPDF(gs_quality = "ebook") on these files
The vignette file is too big. Folloing the suggestions on SO, I added an additional argument to run compression to the build args. It doesn't really work I'm afraid.
Description
This PR closes #784.
The PR
Including the paper as a vignette is a lot harder than I imagined and as a result of that this is a bit of a terrible PR.
TLDR:
The broader context is that Vignettes are rendered in the package, as well as on the website via
pkgdown
. - The package Vignettes can be a pdf and using the existing manuscript works fine. However,pkgdown
mostly only accepts HTML files. Rendering the current vignette as an HTML doesn't work well because it uses a lot of LaTeX.asis
option (see here). However, I was not able to make it work - it simply wouldn't compile my PDF, throwing obscure errors.inst
-ignored because it is too large (although the file size could likely be reduced a bit by shrinking the images in the PDF)inst
directory viasystem.file()
means that the large PDF will exist twice in the package: once copied frominst
and once as a vignette.This is where my terrible approach comes from: download the pdf file from the internet when building the vignette. I assume (hope?) this will work on CRAN because I upload the source file. Not sure about github CI and whether that has access to the internet. In any case, the file will have the link to GitHub so people can access everything.
Potential alternative What we could do (inspired by the
forecast
package (site, _pkgdown.yml)) is the following:navbar
entry to_pgkdown.yml
with a link to the paper.This is basically what the
forecast
package did. They also managed to include the paper as a PDF package vignette. My theory is this:articles
section and replacing it by a simple link in theirnavbar
.[Describe the changes that you made in this pull request.]
Checklist
lintr::lint_package()
to check for style issues introduced by my changes.