Skip to content

Commit a4db965

Browse files
committed
Don't run render_docs() in R-CMD-check workflow
1 parent 979dfee commit a4db965

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

vignettes/simChef.Rmd

+6-4
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ for (fname in list.files(file.path("results", "Linear Regression Experiment"),
3131
pattern = ".rds", recursive = T, full.names = T)) {
3232
file.remove(fname)
3333
}
34+
35+
eval_render_docs <- Sys.getenv("GITHUB_JOB") != "R-CMD-check"
3436
```
3537

3638
# Overview
@@ -322,11 +324,11 @@ The experiment can also be run in parallel. For a more detailed walkthrough on h
322324

323325
Finally, we can easily visualize all results from the simulation experiment in an html file (generated using R Markdown) or browser.
324326

325-
```{r render_docs1, eval = FALSE}
327+
```{r render_docs1, eval = eval_render_docs, warning = FALSE}
326328
render_docs(experiment, open = FALSE)
327329
```
328330

329-
```{r cp_html1, echo = FALSE, warning = FALSE, message = FALSE, results = "hide"}
331+
```{r cp_html1, eval = eval_render_docs, echo = FALSE, warning = FALSE, message = FALSE, results = "hide"}
330332
# create pkgdown/assets directory, which will be copied to the gh-pages branch
331333
# during the pkgdown workflow (see .github/workflows/pkgdown.yaml)
332334
assets_dir <- here::here("pkgdown/assets")
@@ -485,11 +487,11 @@ vary_cor_results <- experiment %>%
485487
```
486488
Now when generating the R Markdown report summary for an `Experiment`, the R Markdown will compile results (both evaluation and visualization results) from all saved `Experiments` under the root results directory `experiment$get_save_dir()`. Since the results from the many `vary_across` runs above are all saved under the original `experiment`'s results directory, then the following will include all of the above results in a single document.
487489

488-
```{r render_docs2, warning = FALSE}
490+
```{r render_docs2, eval = eval_render_docs, warning = FALSE}
489491
render_docs(experiment, open = FALSE)
490492
```
491493

492-
```{r cp_html2, echo = FALSE, warning = FALSE, message = FALSE, results = "hide"}
494+
```{r cp_html2, eval = eval_render_docs, echo = FALSE, warning = FALSE, message = FALSE, results = "hide"}
493495
# copy html output to pkgdown/assets directory for website
494496
file.copy(from = file.path(experiment$get_save_dir(),
495497
paste0(experiment$name, ".html")),

0 commit comments

Comments
 (0)