From a6b669031012c0558b8af45dd3aa692ded13375a Mon Sep 17 00:00:00 2001 From: Matt Fisher Date: Tue, 2 Jun 2026 13:00:30 -0600 Subject: [PATCH 1/3] Add dev dependency group for easier local testing --- pyproject.toml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index f5cb284..435c085 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -92,3 +92,12 @@ select = [ [tool.ruff.mccabe] max-complexity = 11 + +[dependency-groups] +dev = [ + "mypy>=1.19.1", + "pytest>=8.4.2", + "pytest-cov>=7.1.0", + "pytest-qt>=4.5.0", + "pytest-xvfb>=3.1.1", +] From b515ee343f87eb104dbc38067d1639e2a105ee08 Mon Sep 17 00:00:00 2001 From: Matt Fisher Date: Tue, 2 Jun 2026 13:04:52 -0600 Subject: [PATCH 2/3] Use dependency group in CI --- .github/workflows/test.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2244163..86e82de 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -28,12 +28,10 @@ jobs: - name: "Install test and project dependencies" run: | - # Project dependencies from pyproject.toml + # Project dependencies + test dependencies from pyproject.toml # NOTE: Also builds viscm. How do we avoid this? - pip install . + pip install --group dev . ${{ matrix.pyqt-dependency }} - # Test dependencies - pip install pytest pytest-cov pytest-qt pytest-xvfb ${{ matrix.pyqt-dependency }} # pytest-qt CI dependencies: https://pytest-qt.readthedocs.io/en/latest/troubleshooting.html#github-actions sudo apt update sudo apt install -y \ @@ -48,8 +46,5 @@ jobs: # variable`, unless this variable is set: MPLBACKEND: "Agg" - - name: "Install mypy" - run: "pip install mypy>=1.3" - - name: "Run typechecker" run: "make typecheck" From 0ad4da7cfc5d2b9aa647d7b208de5db76955c425 Mon Sep 17 00:00:00 2001 From: Matt Fisher Date: Tue, 2 Jun 2026 13:05:36 -0600 Subject: [PATCH 3/3] Move dependency groups to a more reasonable spot in project config --- pyproject.toml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 435c085..b2ebbb7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,6 +28,15 @@ dependencies = [ PySide = ["PySide6"] PyQt = ["PyQt6"] +[dependency-groups] +dev = [ + "mypy>=1.19.1", + "pytest>=8.4.2", + "pytest-cov>=7.1.0", + "pytest-qt>=4.5.0", + "pytest-xvfb>=3.1.1", +] + [project.urls] repository = "https://github.com/matplotlib/viscm" # documentation = "https://viscm.readthedocs.io" @@ -92,12 +101,3 @@ select = [ [tool.ruff.mccabe] max-complexity = 11 - -[dependency-groups] -dev = [ - "mypy>=1.19.1", - "pytest>=8.4.2", - "pytest-cov>=7.1.0", - "pytest-qt>=4.5.0", - "pytest-xvfb>=3.1.1", -]