diff --git a/plugins/nf-quilt/src/main/nextflow/quilt/QuiltProduct.groovy b/plugins/nf-quilt/src/main/nextflow/quilt/QuiltProduct.groovy index f43983af..1bacd9e9 100644 --- a/plugins/nf-quilt/src/main/nextflow/quilt/QuiltProduct.groovy +++ b/plugins/nf-quilt/src/main/nextflow/quilt/QuiltProduct.groovy @@ -78,7 +78,7 @@ ${nextflow} ### Processes -`${meta['workflow']['stats']['processes']}` +`${meta['workflow']?.get('stats')?.get('processes')}` ''' private final static String DEFAULT_SUMMARIZE = '*.md,*.html,*.?sv,*.pdf,igv.json,**/multiqc_report.html' @@ -239,7 +239,7 @@ ${nextflow} text = makeReadme() } catch (Exception e) { - log.error("setupReadme failed: ${e.getMessage()}", pkg.meta) + log.error("setupReadme failed: ${e.getMessage()}\n{$e}", pkg.meta) } if (text != null && text.length() > 0) { //log.debug("setupReadme: ${text.length()} bytes") @@ -261,15 +261,17 @@ ${nextflow} ?.replace('nextflow.NextflowMeta(', ' - **')\ ?.replace(')', '```') ?.replace(':', '**: ```') - String template = engine.createTemplate(raw_readme).make([ + Map params = [ cmd: cmd, meta: meta, msg: msg, nextflow: nextflow, now: now(), pkg: pkg.packageName, - ]) - // log.debug("readme.template: ${template}") + ] + log.debug("makeReadme.params: ${params}") + String template = engine.createTemplate(raw_readme).make(params) + log.debug("makeReadme.template: ${template}") return template } diff --git a/plugins/nf-quilt/src/test/nextflow/quilt/QuiltProductTest.groovy b/plugins/nf-quilt/src/test/nextflow/quilt/QuiltProductTest.groovy index e0954eeb..e6a6f102 100644 --- a/plugins/nf-quilt/src/test/nextflow/quilt/QuiltProductTest.groovy +++ b/plugins/nf-quilt/src/test/nextflow/quilt/QuiltProductTest.groovy @@ -50,7 +50,6 @@ class QuiltProductTest extends QuiltSpecification { getParams() >> [outdir: url] isSuccess() >> success config >> [quilt: [metadata: [cfkey: 'cfval']], runName: 'my-run', publishing: false] - workflow >> [stats: [processes: 1, threads: 1]] } return new QuiltProduct(pathify, session) } @@ -136,6 +135,7 @@ class QuiltProductTest extends QuiltSpecification { def files = defaultREADME.pkg.folder.list().sort() then: + false !defaultREADME.shouldSkip(QuiltProduct.KEY_README) files.size() == 1