Skip to content

Test cases for configuration parsing#2498

Merged
bentsherman merged 7 commits intonextflow-io:masterfrom
Lehmann-Fabian:parseTests
Nov 22, 2025
Merged

Test cases for configuration parsing#2498
bentsherman merged 7 commits intonextflow-io:masterfrom
Lehmann-Fabian:parseTests

Conversation

@Lehmann-Fabian
Copy link
Contributor

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.

Signed-off-by: Lehmann-Fabian <fabian.lehmann@informatik.hu-berlin.de>
Signed-off-by: Lehmann-Fabian <fabian.lehmann@informatik.hu-berlin.de>
Signed-off-by: Lehmann-Fabian <fabian.lehmann@informatik.hu-berlin.de>
Signed-off-by: Lehmann-Fabian <fabian.lehmann@informatik.hu-berlin.de>
@Lehmann-Fabian Lehmann-Fabian changed the title Parse tests Test cases for configuration parsing Dec 17, 2021
@pditommaso pditommaso force-pushed the master branch 2 times, most recently from 2c461f8 to 23432f3 Compare November 24, 2022 19:15
@pditommaso pditommaso force-pushed the master branch 2 times, most recently from e2b4a93 to f32ea0b Compare December 8, 2022 15:16
@pditommaso pditommaso force-pushed the master branch 2 times, most recently from cefb067 to e523afd Compare December 22, 2022 20:43
@pditommaso pditommaso force-pushed the master branch 2 times, most recently from 0d59b4c to b93634e Compare March 11, 2023 11:20
@pditommaso pditommaso force-pushed the master branch 2 times, most recently from 81f7cb7 to 8a43489 Compare August 20, 2023 20:13
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
@bentsherman bentsherman marked this pull request as ready for review November 22, 2025 17:01
@netlify
Copy link

netlify bot commented Nov 22, 2025

Deploy Preview for nextflow-docs-staging ready!

Name Link
🔨 Latest commit 5b68624
🔍 Latest deploy log https://app.netlify.com/projects/nextflow-docs-staging/deploys/6921f52320a9220008914d7b
😎 Deploy Preview https://deploy-preview-2498--nextflow-docs-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@bentsherman bentsherman merged commit 0876d55 into nextflow-io:master Nov 22, 2025
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants