Skip to content

Commit f337a87

Browse files
author
Vito Zanotelli
committed
Remove the conda r-dependency example
As discussed in the PR this does not need to be explicitly shown. Instead I have added this more expliiclty to the documentation.
1 parent 8d33eff commit f337a87

File tree

6 files changed

+28
-182
lines changed

6 files changed

+28
-182
lines changed

test.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6745,19 +6745,6 @@ def test_quarto_simple_noreport():
67456745
)
67466746

67476747

6748-
@skip_if_not_modified
6749-
def test_quarto_simple_extra_conda_deps():
6750-
run(
6751-
"utils/quarto",
6752-
[
6753-
"snakemake",
6754-
"--cores",
6755-
"1",
6756-
"output/extra_datatable_conda.html",
6757-
"--use-conda",
6758-
],
6759-
)
6760-
67616748

67626749
@skip_if_not_modified
67636750
def test_quarto_simple_extra_renv_deps():

utils/quarto/meta.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@ params:
4646
```
4747
will be passed to quarto render as `-P project=project -P threads=threads -P mem=mem`
4848
notes: |
49-
This wrapper runs quarto to render markdown .qmd notebooks. It supports r-package management via conda and renv, as illustrated
50-
in the examples.
51-
PDF rendering is currently not working.
49+
This wrapper runs quarto to render markdown .qmd notebooks.
50+
It supports r-package management via `conda` and `renv`:
51+
- For `conda` overwrite the conda environment from the `conda:` directive of the rule with an environement with
52+
the r dependencies as well as `r-quarto` installed.
53+
- For `renv` restore an environment before and point the `input.renv`
54+
to the environment folder or a file within (eg `.Rprofile`). The r-version needs used to build the `renv` needs to match
55+
the one of the wrapper or the environment of the wrapper needs to be overwritten with via `conda:` with a matching `r-base`
56+
installation.
57+
PDF rendering is currently not working as tinytex is not properly supported in `conda`.

utils/quarto/test/.gitignore

Lines changed: 0 additions & 9 deletions
This file was deleted.

utils/quarto/test/Snakefile

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ rule all: # [hide]
77
"output/simple.docx", # [hide]
88
"output/example_proj_full.html", # [hide]
99
"output/example_proj_noreport.txt", # [hide]
10-
"output/extra_datatable_conda.html", # [hide]
1110
"output/extra_datatable_renv.html", # [hide]
1211

1312

@@ -65,17 +64,21 @@ rule render_quarto_noreport:
6564
"master/utils/quarto"
6665

6766

68-
rule render_quarto_extra_conda:
69-
conda:
70-
"env/extra.yaml"
71-
input:
72-
script="extra_datatable.qmd",
73-
output:
74-
report="output/extra_datatable_conda.html",
75-
log:
76-
"logs/conda.log",
77-
wrapper:
78-
"master/utils/quarto"
67+
# To add additional r-dependencies used to render
68+
# the report also the conda: directive can be
69+
# overwritten. The only required dependency
70+
# is r-quarto
71+
# rule render_quarto_extra_conda:
72+
# conda:
73+
# "env/extra.yaml"
74+
# input:
75+
# script="extra_datatable.qmd",
76+
# output:
77+
# report="output/extra_datatable_conda.html",
78+
# log:
79+
# "logs/conda.log",
80+
# wrapper:
81+
# "master/utils/quarto"
7982

8083

8184
# Rules for a example using renv
@@ -130,6 +133,10 @@ rule restore_renv:
130133

131134

132135
rule render_quarto_renv:
136+
# If the renv is build using a different r version
137+
# than the wrapper, the "conda:" directive may can be overwritten
138+
# using an environment with the correct "r-base" & "r-conda"
139+
# installed
133140
input:
134141
script="extra_datatable.qmd",
135142
renv="env/renv_test/restored.Rprofile",

utils/quarto/test/env/extra.linux-64.pin.txt

Lines changed: 0 additions & 139 deletions
This file was deleted.

utils/quarto/test/env/extra.yaml

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)