Skip to content

Commit

Permalink
Remove the conda r-dependency example
Browse files Browse the repository at this point in the history
As discussed in the PR this does not need to be
explicitly shown. Instead I have added this more expliiclty to the
documentation.
  • Loading branch information
Vito Zanotelli committed Jun 22, 2024
1 parent 8d33eff commit f337a87
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 182 deletions.
13 changes: 0 additions & 13 deletions test.py
Original file line number Diff line number Diff line change
Expand Up @@ -6745,19 +6745,6 @@ def test_quarto_simple_noreport():
)


@skip_if_not_modified
def test_quarto_simple_extra_conda_deps():
run(
"utils/quarto",
[
"snakemake",
"--cores",
"1",
"output/extra_datatable_conda.html",
"--use-conda",
],
)


@skip_if_not_modified
def test_quarto_simple_extra_renv_deps():
Expand Down
12 changes: 9 additions & 3 deletions utils/quarto/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ params:
```
will be passed to quarto render as `-P project=project -P threads=threads -P mem=mem`
notes: |
This wrapper runs quarto to render markdown .qmd notebooks. It supports r-package management via conda and renv, as illustrated
in the examples.
PDF rendering is currently not working.
This wrapper runs quarto to render markdown .qmd notebooks.
It supports r-package management via `conda` and `renv`:
- For `conda` overwrite the conda environment from the `conda:` directive of the rule with an environement with
the r dependencies as well as `r-quarto` installed.
- For `renv` restore an environment before and point the `input.renv`
to the environment folder or a file within (eg `.Rprofile`). The r-version needs used to build the `renv` needs to match
the one of the wrapper or the environment of the wrapper needs to be overwritten with via `conda:` with a matching `r-base`
installation.
PDF rendering is currently not working as tinytex is not properly supported in `conda`.
9 changes: 0 additions & 9 deletions utils/quarto/test/.gitignore

This file was deleted.

31 changes: 19 additions & 12 deletions utils/quarto/test/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ rule all: # [hide]
"output/simple.docx", # [hide]
"output/example_proj_full.html", # [hide]
"output/example_proj_noreport.txt", # [hide]
"output/extra_datatable_conda.html", # [hide]
"output/extra_datatable_renv.html", # [hide]


Expand Down Expand Up @@ -65,17 +64,21 @@ rule render_quarto_noreport:
"master/utils/quarto"


rule render_quarto_extra_conda:
conda:
"env/extra.yaml"
input:
script="extra_datatable.qmd",
output:
report="output/extra_datatable_conda.html",
log:
"logs/conda.log",
wrapper:
"master/utils/quarto"
# To add additional r-dependencies used to render
# the report also the conda: directive can be
# overwritten. The only required dependency
# is r-quarto
# rule render_quarto_extra_conda:
# conda:
# "env/extra.yaml"
# input:
# script="extra_datatable.qmd",
# output:
# report="output/extra_datatable_conda.html",
# log:
# "logs/conda.log",
# wrapper:
# "master/utils/quarto"


# Rules for a example using renv
Expand Down Expand Up @@ -130,6 +133,10 @@ rule restore_renv:


rule render_quarto_renv:
# If the renv is build using a different r version
# than the wrapper, the "conda:" directive may can be overwritten
# using an environment with the correct "r-base" & "r-conda"
# installed
input:
script="extra_datatable.qmd",
renv="env/renv_test/restored.Rprofile",
Expand Down
139 changes: 0 additions & 139 deletions utils/quarto/test/env/extra.linux-64.pin.txt

This file was deleted.

6 changes: 0 additions & 6 deletions utils/quarto/test/env/extra.yaml

This file was deleted.

0 comments on commit f337a87

Please sign in to comment.