Skip to content

Commit

Permalink
Don't run render_docs() in R-CMD-check workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jpdunc23 committed Jan 10, 2023
1 parent 979dfee commit a4db965
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions vignettes/simChef.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ for (fname in list.files(file.path("results", "Linear Regression Experiment"),
pattern = ".rds", recursive = T, full.names = T)) {
file.remove(fname)
}
eval_render_docs <- Sys.getenv("GITHUB_JOB") != "R-CMD-check"
```

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

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

```{r render_docs1, eval = FALSE}
```{r render_docs1, eval = eval_render_docs, warning = FALSE}
render_docs(experiment, open = FALSE)
```

```{r cp_html1, echo = FALSE, warning = FALSE, message = FALSE, results = "hide"}
```{r cp_html1, eval = eval_render_docs, echo = FALSE, warning = FALSE, message = FALSE, results = "hide"}
# create pkgdown/assets directory, which will be copied to the gh-pages branch
# during the pkgdown workflow (see .github/workflows/pkgdown.yaml)
assets_dir <- here::here("pkgdown/assets")
Expand Down Expand Up @@ -485,11 +487,11 @@ vary_cor_results <- experiment %>%
```
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.

```{r render_docs2, warning = FALSE}
```{r render_docs2, eval = eval_render_docs, warning = FALSE}
render_docs(experiment, open = FALSE)
```

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

0 comments on commit a4db965

Please sign in to comment.