Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add that uv sync and install include dev dependencies by default #10357

Conversation

clintonsteiner
Copy link
Contributor

Summary

Test Plan

* Previously had uv python install, then uv sync --all-extras --dev
* If we are going to use sync for dev dependencies, then the install
  step is unneccessary
@konstin konstin requested a review from zanieb January 7, 2025 12:19
@AlexWaygood AlexWaygood changed the title docs: add that uv sync and install include dev dependencies by defaulta docs: add that uv sync and install include dev dependencies by default Jan 7, 2025
Comment on lines 594 to 595
inclusion or exclusion of its dependencies. Additionally, the `dev` group is
[synced by default](#default-groups).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already say the dev group is synced by default here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I read this - I wasn't aware that "sync" meant the same thing as install, happy to close though if others didn't have this misunderstanding

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't have a top level uv install command. Perhaps we could clarify what sync does, but I think it's mentioned elsewhere?

@@ -591,6 +594,14 @@ The `dev` group is special-cased; there are `--dev`, `--only-dev`, and `--no-dev
inclusion or exclusion of its dependencies. Additionally, the `dev` group is
[synced by default](#default-groups).

To install dependencies you can use install or sync
```console
$ uv pip install
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This command wouldn't work as-written.

I'm not sure the others make sense here either, as this section is specifically about the dev group and the rest are covered elsewhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was attempting to add a couple mentinons explaining how the dependency groups work, revising the command

@zanieb
Copy link
Member

zanieb commented Jan 7, 2025

Yeah sorry, but I'm not sure this is an improvement. Feel free to open an issue for discussion on the point of confusion if you want.

@zanieb zanieb closed this Jan 7, 2025
To install dependencies you can use install or sync

```console
$ uv python install
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using uv python install won't include any groups — it just installs a Python version.


```console
$ uv python install
$ uv sync --all-extras # installs all optional dependencies
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extras are distinct from groups and have a separate section in these docs

Comment on lines +602 to +603
$ uv sync --group lint # installs dependency group lint
$ uv sync --only-group lint # installs ONLY dependency group lint
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These two would make more sense in the following "Dependency groups" section, e.g., after

Once groups are defined, the --group, --only-group, and --no-group options can be used to
include or exclude their dependencies.

@clintonsteiner clintonsteiner deleted the mentionWhichDependenciesAreInstalledByDefault branch January 7, 2025 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants