-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
[R-package] [ci] switch vignettes from 'rmarkdown' to 'markdown' #6258
Conversation
@@ -9,9 +9,9 @@ dependencies: | |||
- r-data.table=1.14.2 | |||
- r-jsonlite=1.7.2 | |||
- r-knitr=1.37 | |||
- r-markdown |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm planning a follow-up PR updating the version constraints on all the conda
packages we pull in in this project's CI. I'll put an constraint on r-markdown
then.
For now, I think it's fine to let this float and have the conda
solver figure out an appropriate version.
Such change also removes the need for OS dep pandoc (180mb) because markdown package does not use pandoc. |
Thanks! Just pushed f3ac92a removing |
Seems that
|
Yes, it is a build environment that doesn't need pandoc anymore, test environment will still need it for the reason you wrote. |
This reverts commit f3ac92a.
Related to #1944.
Proposes switching from
{rmarkdown}
to{markdown}
for the R package's vignettes.Benefits of this Change
Reduces the set of dependencies that have to build successfully to run
R CMD check --as-cran
against{lightgbm}
, leading to:{rmarkdown}
this change results in 14 fewer packages needing to be installed in CI
R code I used (with R 4.2.3) to calculate that:
But what are we giving up?
My understanding is the main benefits of
{rmarkdown}
over{markdown}
are things that are not relevant to the simple documentation{lightgbm}
produces. Things like:{markdown}
, as stated in its README (https://github.com/rstudio/markdown), aims to be simpler and lighter-weight:How I tested this
Enabled this branch on readthedocs and built the docs there.
The build took 807 seconds (build link), roughly the same as other builds took over the last 7 days (build history).
Confirmed that the rendered vignette looks correct at the documentation site: https://lightgbm.readthedocs.io/en/docs-lighter-weight-vignettes/R/articles/basic_walkthrough.html.
Many of this project's R CI jobs build the vignettes and test them with
R CMD check --as-cran
, so I'm confident this change wouldn't cause issues for CRAN.Confirmed all references to
{rmarkdown}
have been replaced by{markdown}
:Notes for Reviewers
This PR inspired by @jangorecki's post on the
r-pkg-devel
mailing list: https://stat.ethz.ch/pipermail/r-package-devel/2024q1/010280.html.{data.table}
recently made a similar change in pursuit of reducing the weight of their dependencies.Related:
markdown::knit()
function rstudio/markdown#109