From dab4e3e6d9852735f1801f5f11891e63e0df25d3 Mon Sep 17 00:00:00 2001 From: Anders <6058745+ddabble@users.noreply.github.com> Date: Mon, 23 Mar 2026 19:28:40 +0100 Subject: [PATCH] Made the dev depencency group default for uv The original decision to not have any default groups, was for optimizing toward making it easy to specify which group should be installed for prod (i.e. only the main `dependencies`, so none of the dependency groups). However, since we very often install and update dependencies locally, we think it's better to facilitate that, by having fewer characters to write. In summary, running `uv sync` is now in practice an alias for `uv sync --group dev`; the CI jobs and the Docker image should remain unchanged by this. --- .github/workflows/ci.yml | 4 ++-- README.md | 2 +- pyproject.toml | 6 ++---- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 55663fb43..86e0535f8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: - name: Install dependencies uses: ./.github/actions/install-dependencies with: - uv-sync-extra-args: "--group linting" + uv-sync-extra-args: "--group linting --no-default-groups" # Code based on https://pre-commit.com/#github-actions-example - name: Set `PY` envvar @@ -40,7 +40,7 @@ jobs: - name: Install dependencies uses: ./.github/actions/install-dependencies with: - uv-sync-extra-args: "--group ci" + uv-sync-extra-args: "--group ci --no-default-groups" - name: Create `.env` shell: bash diff --git a/README.md b/README.md index 13db4051c..ec962fae1 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ 1. Install dev dependencies: (this will create a `.venv` folder inside your repository folder, by default) ```shell - uv sync --group dev + uv sync ``` 1. Create an empty `.env` file directly inside the repository folder, and fill it by copying the contents of [`.env.example`](.env.example) diff --git a/pyproject.toml b/pyproject.toml index 9d56c4218..bf52ca246 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -116,10 +116,8 @@ lint.isort.combine-as-imports = true lint.pycodestyle.ignore-overlong-task-comments = true [tool.uv] -# Don't install `dev` by default (see -# https://docs.astral.sh/uv/concepts/projects/dependencies/#default-groups), to make it -# easier to *not* install those dependencies in prod -default-groups = [ ] +# https://docs.astral.sh/uv/concepts/projects/dependencies/#default-groups +default-groups = [ "dev" ] [tool.uv.sources] python-ldap = [