8000 Add `${params.XXX}` and `${projectDir}` interpolation when comparing schema and config default params values. by LouisLeNezet · Pull Request #4505 · nf-core/tools · GitHub
[go: up one dir, main page]

Skip to content

Add ${params.XXX} and ${projectDir} interpolation when comparing schema and config default params values. - #4505

Open
LouisLeNezet wants to merge 5 commits into
nf-core:devfrom
LouisLeNezet:add_interpolate_params
Open

LouisLeNezet wants to merge 5 commits into
nf-core:devfrom
LouisLeNezet:add_interpolate_params

Conversation

@LouisLeNezet
Copy link
Copy Markdown
Contributor

PR checklist

Closes #4504

  • This comment contains a description of changes (with reason)
  • CHANGELOG.md is updated
  • If you've fixed a bug or added code that should be tested, add tests!
  • Documentation in docs is updated

@LouisLeNezet
LouisLeNezet changed the base branch from main to dev October 8, 2026 13:42
@codecov
codecov Bot commented Oct 8, 2026 •
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.44%. Comparing base (17621c8) to head (8bb0cc9).
⚠️ Report is 41 commits behind head on dev.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@LouisLeNezet LouisLeNezet changed the title Add "${params.XXX}" interpolation when comparing schema and config default params values. Add ${params.XXX} and ${projectDir} interpolation when comparing schema and config default params values. Oct 9, 2026
@mashehu mashehu added this to the 4.3.0 milestone Oct 12, 2026
@mashehu
mashehu commented Oct 12, 2026
Copy link
Copy Markdown
Member

preparing a release atm and this feels like something I want to have tested a bit in the wild, so will have to wait for the next release

@awgymer awgymer left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The regex is too constrained for my liking. I also think actual interpolation isn't yet supported in nf-schema.

return value

new_values = re.sub(
r"\$\{?params\.([A-Za-z0-9_]+)\}?",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This regex is pretty flaky in reality. AFAIK it's perfectly valid nextflow to have e.g.:

"${ params.myvalue}"
"${params.myvalue }"
"${    params.myvalue       }"

All of which would fail this check. In general this sort of thing is why I dislike a lot of the manual handling of nextflow code we do in tools.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also think actual interpolation isn't yet supported in nf-schema.

This PR doesn't touch the assets schema, it's only for the pipeline nextflow config default parameters values.

This regex is pretty flaky in reality.

Indeed, I could relax the regex expression.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Default config interpolation error in pipeline lint

3 participants

0