Skip to content
Permalink
Browse files
fix: display wrapper or external script code in report #1393 (#1404)
* Remove the decode attributes of source files fix #1393

* Adding a test with report generation without md5sum check

* Formatting with black

* feat: Adding --cluster-cancel and --cluster-cancel-nargs (#1395)

* Adding support for --cluster-[m]cancel

* Adding support for --cluster-[m]cancel.

* Adressing points from code review

* [ci skip] fix typos

Co-authored-by: Johannes Köster <johannes.koester@uni-due.de>

Co-authored-by: Johannes Köster <johannes.koester@tu-dortmund.de>
Co-authored-by: Manuel Holtgrewe <manuel.holtgrewe@bihealth.de>
Co-authored-by: Johannes Köster <johannes.koester@uni-due.de>
  • Loading branch information
4 people committed Feb 18, 2022
1 parent e1cbde5 commit a007bd11fb49a5765a643ec78e19f30b3a10dfab
Show file tree
Hide file tree
Showing 5 changed files with 1,585 additions and 2 deletions.
@@ -263,7 +263,7 @@ def code(self):
_, source, language, _ = script.get_source(
self._rule.script, self._rule.workflow.sourcecache, self._rule.basedir
)
sources = [source.decode()]
sources = [source]
elif self._rule.wrapper is not None and not contains_wildcard(
self._rule.wrapper
):
@@ -276,7 +276,7 @@ def code(self):
),
self._rule.workflow.sourcecache,
)
sources = [source.decode()]
sources = [source]
elif self._rule.notebook is not None and not contains_wildcard(
self._rule.notebook
):
@@ -0,0 +1,30 @@
rule all:
input:
"test.vcf.gz",


rule a:
output:
"{prefix}.txt",
shell:
"touch {output}"


rule b:
input:
"{prefix}.txt",
output:
"{prefix}.vcf",
script:
"test.py"


rule bgzip:
input:
"{prefix}.vcf",
output:
"{prefix}.vcf.gz",
log:
"logs/bgzip/{prefix}.log",
wrapper:
"v1.1.0/bio/bgzip"

Large diffs are not rendered by default.

@@ -0,0 +1,2 @@
with open(snakemake.output[0], "w") as f:
f.write("bar")
@@ -229,6 +229,14 @@ def test_report_dir():
run(dpath("test_report_dir"), report="report.zip", check_md5=False)


def test_report_display_code():
run(
dpath("test_report_display_code"),
report="report.html",
check_md5=False,
)


def test_dynamic():
run(dpath("test_dynamic"))

0 comments on commit a007bd1

Please sign in to comment.