From 23f0dae42a05cf77cbb8a4aceda7eb51a4fd4287 Mon Sep 17 00:00:00 2001 From: mirpedrol Date: Mon, 29 Jan 2024 18:44:23 +0100 Subject: [PATCH 1/4] handle default read as float when type is number --- nf_core/lint/nextflow_config.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/nf_core/lint/nextflow_config.py b/nf_core/lint/nextflow_config.py index 1e0a6c4995..15794ef677 100644 --- a/nf_core/lint/nextflow_config.py +++ b/nf_core/lint/nextflow_config.py @@ -390,9 +390,13 @@ def nextflow_config(self): if str(self.nf_config[param]) == schema_default: passed.append(f"Config default value correct: {param}") else: - failed.append( - f"Config default value incorrect: `{param}` is set as {self._wrap_quotes(schema_default)} in `nextflow_schema.json` but is {self._wrap_quotes(self.nf_config[param])} in `nextflow.config`." - ) + # Handle "number" type + if schema_default.endswith(".0") and str(self.nf_config[param]) == schema_default[:-2]: + passed.append(f"Config default value correct: {param}") + else: + failed.append( + f"Config default value incorrect: `{param}` is set as {self._wrap_quotes(schema_default)} in `nextflow_schema.json` but is {self._wrap_quotes(self.nf_config[param])} in `nextflow.config`." + ) else: failed.append( f"Default value from the Nextflow schema '{param} = {self._wrap_quotes(schema_default)}' not found in `nextflow.config`." From 32863daf3804e2faec2332b72be246f3a3d05c2d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 29 Jan 2024 23:38:05 +0000 Subject: [PATCH 2/4] Update pre-commit hook astral-sh/ruff-pre-commit to v0.1.15 --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d4eb6a721d..1fdda4978a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.1.14 + rev: v0.1.15 hooks: - id: ruff # linter args: [--fix, --exit-non-zero-on-fix] # sort imports and fix From 0f00b4c48d3a782232a9771d701b1e91b2201d37 Mon Sep 17 00:00:00 2001 From: nf-core-bot Date: Mon, 29 Jan 2024 23:38:49 +0000 Subject: [PATCH 3/4] [automated] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d73fa34920..1bd9da103f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,8 @@ ### General +- Update pre-commit hook astral-sh/ruff-pre-commit to v0.1.15 ([#2705](https://github.com/nf-core/tools/pull/2705)) + # [v2.12 - Aluminium Wolf](https://github.com/nf-core/tools/releases/tag/2.11) - [2024-01-29] ### Template From 57e69a596a24d5113d5991ed1d17e51d2221c44c Mon Sep 17 00:00:00 2001 From: nf-core-bot Date: Tue, 30 Jan 2024 08:17:17 +0000 Subject: [PATCH 4/4] [automated] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1bd9da103f..ae1f898184 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ ### Linting +- Handle default values of type number from nextflow schema ([#2703](https://github.com/nf-core/tools/pull/2703)) + ### Modules ### Subworkflows