From c03dba85caa3bfc2291bd687ff66b0a8b3d883ec Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Tue, 25 Mar 2025 21:41:34 -0500 Subject: [PATCH] Use dev dep group for ruff install, avoid broken ruff --- .github/workflows/ci.yml | 4 ++-- .gitlab-ci.yml | 4 ++-- pyproject.toml | 22 ++++++++++++++++------ 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 31c9edd4d..3f0796010 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,10 +13,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - uses: astral-sh/setup-uv@v5 - name: "Main Script" run: | - pipx install ruff - ruff check + uv run --only-group lint ruff check typos: name: Typos diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4bfe43c72..5a03e0a93 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -121,8 +121,8 @@ Documentation: Ruff: stage: test script: - - pipx install ruff - - ruff check + - pipx install uv + - uv run --only-group lint ruff check tags: - docker-runner except: diff --git a/pyproject.toml b/pyproject.toml index f7a332fd8..406c06310 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,12 +40,27 @@ dependencies = [ "sympy>=0.7.2", ] -[project.optional-dependencies] +[dependency-groups] +dev = [ + {include-group = "doc"}, + {include-group = "test"}, + {include-group = "lint"}, +] +lint = [ + "pylint", + # https://github.com/astral-sh/ruff/issues/16943 + "ruff!=0.11.1,!=0.11.2", +] doc = [ "furo", "sphinx-copybutton", "sphinx>=4", ] +test = [ + "pytest", +] + +[project.optional-dependencies] fmmlib = [ "pyfmmlib>=2023.1", ] @@ -55,11 +70,6 @@ symengine = [ pyvkfft = [ "pyvkfft>=2024.1", ] -test = [ - "pylint", - "pytest", - "ruff", -] [project.urls] Documentation = "https://documen.tician.de/sumpy"