Skip to content

Commit

Permalink
makeReadme debug
Browse files Browse the repository at this point in the history
  • Loading branch information
drernie committed Oct 23, 2024
1 parent 06eaf21 commit eab05c6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 deletions plugins/nf-quilt/src/main/nextflow/quilt/QuiltProduct.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down Expand Up @@ -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")
Expand All @@ -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
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit eab05c6

Please sign in to comment.