-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
59 lines (35 loc) · 2.15 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
```
# Reproducible Example of Test for Target Version and Mermaid Rendering Issues
## Problem
A mermaid graph embedded in an Rmarkdown document that is rendered via a `targets` workflow is erroring with the following message:
```R
argument "store" is missing, with no default
```
This document used to render properly without issues at earlier stages of project but after a few months and a few `targets` versions later (started at v1.1.3 and currently at v1.3.2), the error above was encountered.
Hence the suspicion that maybe `targets` version was the culprit more so that there is [discussion online](https://github.com/ropensci/targets/pull/802#issuecomment-1071142712) that the initial version of `targets` that introduces the `tar_mermaid()` functionality has had some major bugs with regard to mermaid graph rendering within Rmarkdown documents.
## Test
We recreated a targets workflow in the repository using example created by Will Landau [here](https://github.com/ropensci/targets/pull/802) which is also an example in the function documentation for `tar_mermaid()`.
We added a target for rendering an Rmarkdown report found inside a specific library called `reports` which mimics the structure of the project in which the issue/problem was occurring.
To be able to control the version of `targets` used, this repository uses `renv`.
We first installed `targets` version 1.3.2:
```R
renv::install("[email protected]")
```
and then ran the workflow with `targets::tar_make()`
This reproduced the same error we were encountering in existing project.
Then, we installed `targets` version 1.4.1:
```R
renv::install("[email protected]")
```
and then ran the workflow.
Workflow completed without errors and HTML output in `reports` directory was produced as expected.
Finally, we tested using `targets` version 1.1.3 which is the version used at the start of the project. After installing this version and running the workflow, we completed the and rendered the document without errors/issues.