From 08e44f3dc1d0452b12829a8af0cd3693a2d4bdc6 Mon Sep 17 00:00:00 2001 From: mashehu Date: Fri, 2 Feb 2024 10:03:22 +0100 Subject: [PATCH 1/3] update ruff in template and add it to pre-commit step --- nf_core/pipeline-template/.pre-commit-config.yaml | 6 ++++++ nf_core/pipeline-template/pyproject.toml | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/nf_core/pipeline-template/.pre-commit-config.yaml b/nf_core/pipeline-template/.pre-commit-config.yaml index af57081f60..36058eeb1b 100644 --- a/nf_core/pipeline-template/.pre-commit-config.yaml +++ b/nf_core/pipeline-template/.pre-commit-config.yaml @@ -1,4 +1,10 @@ repos: + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.2.0 + hooks: + - id: ruff # linter + args: [--fix, --exit-non-zero-on-fix] # sort imports and fix + - id: ruff-format # formatter - repo: https://github.com/pre-commit/mirrors-prettier rev: "v3.1.0" hooks: diff --git a/nf_core/pipeline-template/pyproject.toml b/nf_core/pipeline-template/pyproject.toml index 7d08e1c8ef..84c16f27cd 100644 --- a/nf_core/pipeline-template/pyproject.toml +++ b/nf_core/pipeline-template/pyproject.toml @@ -6,8 +6,8 @@ target-version = "py38" select = ["I", "E1", "E4", "E7", "E9", "F", "UP", "N"] cache-dir = "~/.cache/ruff" -[tool.ruff.isort] +[tool.ruff.lint.isort] known-first-party = ["nf_core"] -[tool.ruff.per-file-ignores] +[tool.ruff.lint.per-file-ignores] "__init__.py" = ["E402", "F401"] From c75959f5408afa9e4f72a8bf7da8a4c12e8e9711 Mon Sep 17 00:00:00 2001 From: nf-core-bot Date: Fri, 2 Feb 2024 09:05:01 +0000 Subject: [PATCH 2/3] [automated] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index aae1fecb69..5dc4d17f78 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ ### General +- update ruff to 0.2.0 and add it to pre-commit step ([#2725](https://github.com/nf-core/tools/pull/2725)) + ## [v2.12.1 - Aluminium Wolf - Patch](https://github.com/nf-core/tools/releases/tag/2.12.1) - [2024-02-01] ### Linting From f18983532b6d9d51e4aa7aa467c44d4ba90b0a1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20H=C3=B6rtenhuber?= Date: Fri, 2 Feb 2024 13:04:21 +0100 Subject: [PATCH 3/3] Update nf_core/pipeline-template/.pre-commit-config.yaml --- nf_core/pipeline-template/.pre-commit-config.yaml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/nf_core/pipeline-template/.pre-commit-config.yaml b/nf_core/pipeline-template/.pre-commit-config.yaml index 36058eeb1b..af57081f60 100644 --- a/nf_core/pipeline-template/.pre-commit-config.yaml +++ b/nf_core/pipeline-template/.pre-commit-config.yaml @@ -1,10 +1,4 @@ repos: - - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.2.0 - hooks: - - id: ruff # linter - args: [--fix, --exit-non-zero-on-fix] # sort imports and fix - - id: ruff-format # formatter - repo: https://github.com/pre-commit/mirrors-prettier rev: "v3.1.0" hooks: