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 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

This comment has been minimized.

Copy link
Collaborator Author

schloerke commented Aug 10, 2018

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

@jjallaire

This comment has been minimized.

Copy link
Member

jjallaire commented Aug 10, 2018

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

This comment has been minimized.

Copy link
Collaborator Author

schloerke commented Aug 10, 2018

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

This comment has been minimized.

Copy link
Member

jjallaire commented Aug 12, 2018

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

@schloerke schloerke requested a review from wch Aug 13, 2018
NEWS.md Outdated
@@ -1,8 +1,11 @@
learnr 0.9.3
learnr 0.9.3 (unreleased)

This comment has been minimized.

Copy link
@wch

wch Aug 13, 2018

Collaborator

0.9.2.9000

@wch
wch approved these changes Aug 13, 2018
@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 schloerke:prerender branch Oct 8, 2018
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
Projects
None yet
3 participants
You can’t perform that action at this time.