mirror of
https://github.com/astral-sh/uv
synced 2026-01-09 15:43:24 -05:00
Add --group and --only-group to uv sync and includes all groups in uv lock (#8110)
Part of #8090 Adds the ability to include a group (`--group`) in the sync or _only_ sync a group (`--only-group`). Includes all groups in the resolution, which will have the same limitations as extras as described in #6981. There's a great deal of refactoring of the "development" concept into "groups" behind the scenes that I am continuing to defer here to minimize the diff. Additionally, this does not yet resolve interactions with the existing `dev` group — we'll tackle that separately as well. I probably won't merge the stack until that design is resolved. The current proposal is that we'll just "combine' the `dev-dependencies` contents into the `dev` group.
This commit is contained in:
@@ -1416,6 +1416,10 @@ uv sync [OPTIONS]
|
||||
<p>Instead of checking if the lockfile is up-to-date, uses the versions in the lockfile as the source of truth. If the lockfile is missing, uv will exit with an error. If the <code>pyproject.toml</code> includes changes to dependencies that have not been included in the lockfile yet, they will not be present in the environment.</p>
|
||||
|
||||
<p>May also be set with the <code>UV_FROZEN</code> environment variable.</p>
|
||||
</dd><dt><code>--group</code> <i>group</i></dt><dd><p>Include dependencies from the specified local dependency group.</p>
|
||||
|
||||
<p>May be provided multiple times.</p>
|
||||
|
||||
</dd><dt><code>--help</code>, <code>-h</code></dt><dd><p>Display the concise help for this command</p>
|
||||
|
||||
</dd><dt><code>--index</code> <i>index</i></dt><dd><p>The URLs to use when resolving dependencies, in addition to the default index.</p>
|
||||
@@ -1555,6 +1559,12 @@ uv sync [OPTIONS]
|
||||
|
||||
<p>The project itself will also be omitted.</p>
|
||||
|
||||
</dd><dt><code>--only-group</code> <i>only-group</i></dt><dd><p>Only include dependencies from the specified local dependency group.</p>
|
||||
|
||||
<p>May be provided multiple times.</p>
|
||||
|
||||
<p>The project itself will also be omitted.</p>
|
||||
|
||||
</dd><dt><code>--package</code> <i>package</i></dt><dd><p>Sync for a specific package in the workspace.</p>
|
||||
|
||||
<p>The workspace’s environment (<code>.venv</code>) is updated to reflect the subset of dependencies declared by the specified workspace member package.</p>
|
||||
|
||||
Reference in New Issue
Block a user