Skip to content

Commit

Permalink
Merge pull request #3442 from matbonfanti/fix-params-yaml-format
Browse files Browse the repository at this point in the history
format name/value with YAML syntax
  • Loading branch information
matbonfanti authored Feb 6, 2025
2 parents 639e419 + 02dcbb7 commit 1f84814
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
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"

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

0 comments on commit 1f84814

Please sign in to comment.