Skip to content
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

Aggressive Prerender checks within rmarkdown #179

Merged
merged 9 commits into from
Oct 8, 2018

Conversation

schloerke
Copy link
Collaborator

@schloerke schloerke commented Aug 10, 2018

Fixes #169

Uses rstudio/rmarkdown#1420 to rerender tutorials if any html dependency package version is different and if any package used to build the document is different at run time.

Because this is so aggressive and the checks should be done every time a user runs the document, setting the environment variable RMARKDOWN_RUN_PRERENDER=0 should not be done.

@schloerke
Copy link
Collaborator Author

Will require a followup PR to remove the reference in the DESCRIPTION file once rmarkdown is released to CRAN

@jjallaire
Copy link
Member

One scenario we should be sure to encompass is to be able to run tutorials in an environment where they are never rendered (we need this e.g. for Shiny Server when they are deployed in a readonly directory). Is that still possible?

@schloerke
Copy link
Collaborator Author

rmarkdown still has the hooks for skipping the pre-render.

Can still execute this to never prerender:

withr::with_envvar(c(RMARKDOWN_RUN_PRERENDER = "0"), {	    
  learnr::run_tutorial(FILE, package = PKG)
})

Would it be better to have a run_tutorial_local function that implements the always possibly render functionality? (Keeping run_tutorial as is)

learnr::run_tutorial_local(FILE, package = PKG)

@jjallaire
Copy link
Member

No, I think it's fine as long as rmarkdown has that hook.

@schloerke schloerke requested a review from wch August 13, 2018 13:38
@schloerke schloerke added the priority: high Must be fixed before next release label Aug 13, 2018
NEWS.md Outdated
@@ -1,8 +1,11 @@
learnr 0.9.3
learnr 0.9.3 (unreleased)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0.9.2.9000

@schloerke schloerke changed the title [WIP] Aggressive Prerender checks within rmarkdown Aggressive Prerender checks within rmarkdown Oct 8, 2018
@schloerke schloerke merged commit 209cd53 into rstudio:master Oct 8, 2018
@schloerke schloerke deleted the prerender branch October 8, 2018 20:16
schloerke added a commit to schloerke/learnr that referenced this pull request Oct 8, 2018
* master:
  Aggressive Prerender checks within rmarkdown (rstudio#179)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: high Must be fixed before next release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants