Repository navigation
schema build: keep 0 and 0.0 defaults from the config - #4620
Merged
Merged
Conversation
rpinho
added a commit
to rpinho/tools
that referenced
this pull request
Nov 16, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
mashehu
reviewed
Nov 18, 2026
Comment on lines
+3
to
+5
| When schema build adds a missing default to an existing parameter, numeric zero | ||
| (`0` or `0.0`) is retained. False, null and empty-string config values do not add a schema default. | ||
|
|
Member
There was a problem hiding this comment.
Suggested change
| When schema build adds a missing default to an existing parameter, numeric zero | |
| (`0` or `0.0`) is retained. False, null and empty-string config values do not add a schema default. |
these sections are just for autogenerated docs
mashehu
approved these changes
Nov 18, 2026
mashehu
left a comment
Member
There was a problem hiding this comment.
thanks for the fix. I moved the tests to the rest of them and added one to make sure some false-y defaults stay out of the schema
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LKxc9GKLwnyeV2jaZBxH9N
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LKxc9GKLwnyeV2jaZBxH9N
…ay out of the schema
mashehu
force-pushed
the
fix-schema-zero-defaults
branch
from
November 18, 2026 15:12
f025e14 to
3d264f1
Compare
Member
|
feel free to merge whenever you are happy with the changes |
Author
|
Thanks! We would be glad to help in any way we can. What would be helpful for you? What's a hard problem? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR checklist
CHANGELOG.mdis updateddocsis updatedThere's a bug in
add_schema_found_configs: it checks the config value's truthiness before adding a missing default, so0and0.0are dropped.With
params.threshold = 0and a schema property{"type": "integer"},nf-core pipelines schema buildleaves the default out. It should write{"type": "integer", "default": 0}.This checks for
Noneinstead.0and0.0are kept;false,nulland empty strings are still left out, as before.Test:
tests/pipelines/test_schema_zero_defaults.pyfails on dev for0and0.0and passes here; withtests/pipelines/test_schema.pythat is 63 passed (Nextflow 25.10.4). The pre-commit hooks pass.🤖 Generated with Claude Code
https://claude.ai/code/session_01LKxc9GKLwnyeV2jaZBxH9N