uv icon indicating copy to clipboard operation
uv copied to clipboard

Provide `uv sync --all-dev` for workspace projects

Open tonnico opened this issue 1 year ago • 1 comments

I would like to install all dev dependencies in the workspaces.

Maybe you have the following structure:

.
├── pyproject.toml
├── uv.lock
├── cdk
│  ├── pyproject.toml
│  ├── src
│  │  └── cdk
│  │     └── __init__.py
└── sources
   ├── pyproject.toml
   ├── README.md
   └── src
      ├── service_a
      │  └── __init__.py
      └── service_b
         └── __init__.py

In each pyproject.toml are different dev-dependencies.

Currently I can install only the dev-dependencies once each project. E.g.

uv sync  # installs dev from root only
uv sync --project cdk  # installs dev from cdk only
uv sync --project sources  # installs dev from sources only

I can work around this issue with

uv sync && uv sync --project cdk --inexact && uv sync --project sources --inexact

But a more handy version would be very nice. Something like

uv sync --all-dev

tonnico avatar Oct 08 '24 11:10 tonnico

I think this may be best handled via an --all-packages flag to sync an entire workspace, as in: https://github.com/astral-sh/uv/issues/6935.

charliermarsh avatar Oct 08 '24 22:10 charliermarsh

Let's track this in the linked issue.

zanieb avatar Oct 21 '24 22:10 zanieb

uv sync --all-packages exists in the next release.

charliermarsh avatar Nov 02 '24 02:11 charliermarsh