Skip to content

create-params-file: include top-level schema parameters - #4619

Merged
mashehu merged 6 commits into
nf-core:devfrom
rpinho:fix-params-file-ungrouped
Nov 24, 2026
Merged

mashehu merged 6 commits into
nf-core:devfrom
rpinho:fix-params-file-ungrouped

Conversation

@rpinho

@rpinho rpinho commented Nov 16, 2026

Copy link
Copy Markdown

PR checklist

  • 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

There's a bug in generate_params_file: it writes the parameters from the schema's grouped definitions but skips properties defined at the top level of the schema.

For a schema with {"properties": {"input": {"type": "string", "default": "reads.csv"}}}, nf-core pipelines create-params-file writes the header and no input entry. The commented template should have input: reads.csv.

This writes the top-level properties after the groups, under "Other parameters", so flat and mixed schemas get all their parameters.

Test: tests/pipelines/test_params_file_ungrouped.py (both schema drafts, grouped and hidden combinations) fails on dev, 8 of 8, and passes here; with tests/pipelines/test_params_file.py that is 12 passed. The pre-commit hooks pass.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LKxc9GKLwnyeV2jaZBxH9N

rpinho added a commit to rpinho/tools that referenced this pull request Nov 16, 2026
@mashehu

mashehu commented Nov 16, 2026

Copy link
Copy Markdown
Member

Please join the github org via the slack channel so the CI runs for you.

@rpinho

rpinho commented Nov 16, 2026

Copy link
Copy Markdown
Author

I'm in, thanks!

@codecov

codecov Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.04%. Comparing base (8d7aa93) to head (a9e8f28).
⚠️ Report is 1 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.

@mashehu mashehu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

thanks for the contribution. we don't really recommend ungrouped parameters in nf-core, that's why this might have slipped through

Comment thread nf_core/pipelines/params_file.py Resolved
@rpinho
rpinho requested a review from mashehu November 16, 2026 21:34

@mashehu mashehu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I made the tests a bit more like others in this repo.

Thanks for this contribution!

@rpinho

rpinho commented Nov 18, 2026

Copy link
Copy Markdown
Author

Thanks!

@mashehu

mashehu commented Nov 18, 2026

Copy link
Copy Markdown
Member

actually found another place where we use this and combined the logic now.

mashehu pushed a commit to rpinho/tools that referenced this pull request Nov 18, 2026
@mashehu
mashehu force-pushed the fix-params-file-ungrouped branch from ef5d418 to 5c40725 Compare November 18, 2026 14:19
@nf-core nf-core deleted a comment from codspeed Bot Nov 18, 2026
@nf-core nf-core deleted a comment from codspeed Bot Nov 18, 2026
@mashehu

mashehu commented Nov 18, 2026

Copy link
Copy Markdown
Member

feel free to merge, whenever you are happy 🙂

@codspeed

codspeed Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

1 warning

⚠️ Walltime results may be unreliable

Some benchmarks used the Walltime instrument outside CodSpeed Macro Runners, which can make the results inconsistent.

Learn more about Macro Runners

See affected benchmarks

✅ 12 untouched benchmarks
⏩ 4 skipped benchmarks1


Comparing rpinho:fix-params-file-ungrouped (a9e8f28) with dev (fbb403c)2

Open in CodSpeed

Footnotes

  1. 4 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

  2. No successful run was found on dev (8d7aa93) during the generation of this report, so fbb403c was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

@mashehu
mashehu force-pushed the fix-params-file-ungrouped branch from 46ac156 to a9e8f28 Compare November 24, 2026 10:32
@mashehu
mashehu requested a review from a team as a code owner November 24, 2026 10:32
@mashehu
mashehu merged commit 181dff1 into nf-core:dev Nov 24, 2026
125 checks passed
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.

2 participants