Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

format name/value with YAML syntax #3442

Merged
merged 3 commits into from
Feb 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
- output passed to write_params_file as Path object ([#3435](https://github.com/nf-core/tools/pull/3435))
- chore(deps): update python:3.12-slim docker digest to 69ce3ae ([#3433](https://github.com/nf-core/tools/pull/3433))
- chore(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.9.4 ([#3438](https://github.com/nf-core/tools/pull/3438))
- format name/value with YAML syntax ([#3442](https://github.com/nf-core/tools/pull/3442))

## [v3.2.0 - Pewter Pangolin](https://github.com/nf-core/tools/releases/tag/3.2.0) - [2025-01-27]

Expand Down
2 changes: 1 addition & 1 deletion nf_core/pipelines/params_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def format_param(
out += _print_wrapped("Required", mode="none", indent=4)

out += _print_wrapped("\n", mode="end")
out += f"# {name} = {json.dumps(default)}\n"
out += f"# {name}: {json.dumps(default)}\n"
matbonfanti marked this conversation as resolved.
Show resolved Hide resolved

return out

Expand Down
2 changes: 1 addition & 1 deletion tests/pipelines/test_params_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ def test_build_template_content(self):
out = fh.read()

assert "nf-core/testpipeline" in out
assert "# input = null" in out
assert "# input: null" in out
matbonfanti marked this conversation as resolved.
Show resolved Hide resolved
Loading