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
Make scoringutils paper a package Vignette #796
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #796 +/- ##
==========================================
+ Coverage 95.60% 95.62% +0.02%
==========================================
Files 21 21
Lines 1569 1577 +8
==========================================
+ Hits 1500 1508 +8
Misses 69 69 ☔ View full report in Codecov by Sentry. |
Merge branch 'main' into paper-vignette2 # Conflicts: # inst/manuscript/manuscript.pdf
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:
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.