nextflow icon indicating copy to clipboard operation
nextflow copied to clipboard

Test cases for configuration parsing

Open Lehmann-Fabian opened this issue 2 years ago • 0 comments

This PR adds two tests for yet not working cases. However, I was unable to fix them.

The first issue occurs if you define a method in a configuration file. The method is forgotten in the output.

Input: nextflow.config

process {
  cpus = { getCpuValue() }
}

def getCpuValue() {
  4
}

$ nextflow config nextflow.config Output:

process {
  cpus = { getCpuValue() }
}

The second issue is more complex. I broke down the configuration of nf-core/eager. If you have a three-level configuration structure, the third level ignores the renderClosureAsString. Inputs: nextflow.config

profiles {
  test { includeConfig 'nextflow2.config'}
}

nextflow2.config

includeConfig 'nextflow3.config'

nextflow3.config

params {
  x = { 1 + 2 }
}

$ nextflow config nextflow.config -profile test Output:

params {
   x = Script45F3112A5F44215D3409D59317499615$_run_closure1$_closure2@f29353f
}

Both issues cause problems with the execution of some nf-core workflows.

Lehmann-Fabian avatar Dec 17 '21 10:12 Lehmann-Fabian