From e464ddff882650dda2509914b1df147313d7fa96 Mon Sep 17 00:00:00 2001 From: Todd Leonhardt Date: Sun, 6 Sep 2026 10:27:10 -0400 Subject: [PATCH 1/2] uv run does its own sync of the project env with default groups Tweak all "uv run" commands for GitHub Actions workflows to only install the dependency groups they need. This reduces the time for running these workflows, dramatically so for test jobs on free-threaded variants of Python. --- .github/workflows/docs.yml | 2 +- .github/workflows/quality.yml | 2 +- .github/workflows/tests.yml | 4 +++- .github/workflows/typecheck.yml | 4 ++-- pyproject.toml | 2 +- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 8396a6381..13270b3fe 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -28,4 +28,4 @@ jobs: - name: Install the project run: uv sync --no-default-groups --group docs - name: Check if the Zensical documentation can be built - run: uv run zensical build -s + run: uv run --no-default-groups --group docs zensical build -s diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml index 67bc635fb..82de63f16 100644 --- a/.github/workflows/quality.yml +++ b/.github/workflows/quality.yml @@ -30,4 +30,4 @@ jobs: - name: Install the project run: uv sync --no-default-groups --group quality - name: Run prek - run: uv run prek run -a --show-diff-on-failure + run: uv run --no-default-groups --group quality prek run -a --show-diff-on-failure diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 05d68d5ae..78864307c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -36,7 +36,9 @@ jobs: run: uv sync --no-default-groups --group test - name: Run tests - run: uv run python -Xutf8 -m pytest --cov --cov-config=pyproject.toml --cov-report=xml tests + run: + uv run --no-default-groups --group test python -Xutf8 -m pytest --cov + --cov-config=pyproject.toml --cov-report=xml tests - name: Upload test results to Codecov if: ${{ !cancelled() }} diff --git a/.github/workflows/typecheck.yml b/.github/workflows/typecheck.yml index 2c2d393a5..696863bc9 100644 --- a/.github/workflows/typecheck.yml +++ b/.github/workflows/typecheck.yml @@ -32,7 +32,7 @@ jobs: python-version: ${{ matrix.python-version }} - name: Check typing using ty - run: uv run ty check + run: uv run --no-default-groups --group validate ty check - name: Check typing using mypy - run: uv run mypy . + run: uv run --no-default-groups --group validate mypy . diff --git a/pyproject.toml b/pyproject.toml index e125f0c9e..3752b33a1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -64,7 +64,7 @@ test = [ "pytest-cov>=5", "pytest-mock>=3.14.1", ] -validate = ["mypy>=2.3.1", "ruff>=0.16.0", "ty>=0.0.75", "types-setuptools>=80.8.0"] +validate = ["mypy>=2.3.1", "ty>=0.0.75", "types-setuptools>=80.8.0"] [tool.mypy] disallow_incomplete_defs = true From b33f2afca4a40882fefa6f9a565fe747f857d8f0 Mon Sep 17 00:00:00 2001 From: Todd Leonhardt Date: Sun, 6 Sep 2026 10:37:59 -0400 Subject: [PATCH 2/2] Add ipython to dependencies in validate group. This is needed for type checking because it is cmd2's only optional dependency. --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3752b33a1..be979703c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -64,7 +64,7 @@ test = [ "pytest-cov>=5", "pytest-mock>=3.14.1", ] -validate = ["mypy>=2.3.1", "ty>=0.0.75", "types-setuptools>=80.8.0"] +validate = ["ipython>=8.23", "mypy>=2.3.1", "ty>=0.0.75", "types-setuptools>=80.8.0"] [tool.mypy] disallow_incomplete_defs = true