Skip to content

Commit

Permalink
handle missing meta
Browse files Browse the repository at this point in the history
  • Loading branch information
drernie committed Oct 3, 2023
1 parent 25206b3 commit 31cf832
Showing 1 changed file with 15 additions and 16 deletions.
31 changes: 15 additions & 16 deletions plugins/nf-quilt/src/main/nextflow/quilt/QuiltProduct.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,15 @@ ${cmd}
### Workflow
- workflow run name: ```${meta['workflow']?.get('runName')}```
- scriptFile: ```${meta['workflow']?.get('scriptFile')}```
- sessionId: ```${meta['workflow']?.get('sessionId')}```
- start: ```${meta['time_start']}```
- complete: ```${meta['time_complete']}```
- **workflow run name**: ```${meta['workflow']?.get('runName')}```
- **scriptFile**: ```${meta['workflow']?.get('scriptFile')}```
- **sessionI**: ```${meta['workflow']?.get('sessionId')}```
- **start**: ```${meta['time_start']}```
- **complete**: ```${meta['time_complete']}```
### Nextflow
```bash
${nextflow}
```
### Processes
Expand Down Expand Up @@ -245,20 +243,21 @@ ${nextflow}
GStringTemplateEngine engine = new GStringTemplateEngine()
String raw_readme = pkg.meta_overrides(KEY_README, DEFAULT_README)
String cmd = "${meta['cmd']}".replace(' -', ' \\\n -')
String nf = meta['workflow']['nextflow']
String nextflow = nf.replace(', ', '\\\n -')\
.replace('nextflow.NextflowMeta(', ' \\\n -')\
.replace(')', '')
//log.debug("readme: ${raw_readme}")
Writable template = engine.createTemplate(raw_readme).make([
String nf = meta['workflow']?['nextflow']
String nextflow = nf?.replace(', ', '```\n - **')\
?.replace('nextflow.NextflowMeta(', ' - **')\
?.replace(')', '```')
?.replace(':', '**: ```')
String template = engine.createTemplate(raw_readme).make([
cmd: cmd,
meta: meta,
msg: msg,
nextflow: nextflow,
now: now(),
pkg: pkg.toString(),
])
return template.toString()
pkg: pkg.packageName,
]).toString()
log.debug("readme.template: ${template}")
return template
}

List<Path> match(String glob) throws IOException {
Expand Down

0 comments on commit 31cf832

Please sign in to comment.