-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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: refactor/enhance dependency groups section #11690
base: main
Are you sure you want to change the base?
Conversation
899e965
to
0f84e8c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like a reasonable tweak but I'm gonna get a second opinion.
@@ -613,19 +613,47 @@ instead. Additionally, the `dev` group is [synced by default](#default-groups). | |||
|
|||
### Dependency groups | |||
|
|||
uv supports | |||
[PyPA spec Dependency Groups](https://packaging.python.org/en/latest/specifications/dependency-groups/): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uncertain this is the "right" thing to cite? (genuine question, need to check with someone else...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The docs already reference PEP 735. I was going to reference it again but noticed that the pep itself points to the dependency groups spec as the canonical version. So I linked to it.
However, upon reviewing the docs, I realized there was further room for improvement so pushed up another commit with some additional refactoring which removes this sentence.
However, it's up for debate on whether or not the existing PEP 735 reference should be kept or replaced with the link to the spec. I'd be +0 towards the latter since the PEP points there.
!!! note | ||
|
||
If you have dependency groups that conflict with one another, resolution will fail | ||
unless you explicitly [declare them as conflicting](./config.md#conflicting-dependencies). | ||
`include-group` is not supported from the CLI ([#9054](https://github.com/astral-sh/uv/issues/9054)). | ||
Those edits must be made manually. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like a distracting/strange thing to include in the documentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since there was an issue open about it, I thought it might save someone from creating another issue. :)
I moved the notice to a comment in the example but wouldn't mind at all if your preference is to remove that too.
a27d817
to
51b4c6d
Compare
Forced pushed a new commit (would you prefer separate commits when addressing PR comments?) addressing a couple of the above issues as well as some additional refactoring. |
You can put the commits up in any form you prefer, we always squash-merge so don't worry about it too much. |
- Add example of dependency group includes - Refactor section to to show pyproject.toml config & explanation of dependency resolution first and move CLI implementation and options into it's own section
51b4c6d
to
44403b2
Compare
Summary
It took me a decent amount of searching through the issues and multiple attempts to resist just posting a "question" issue to ask how to do group includes before I finally stumbled upon the answer pointing to pep 735. Since I had been over the docs in that section multiple times, I thought it would help to just add the answer front and center.
Also refactored the section to separate config from cli. The part about resolution all being done together was something I had to search for a couple days ago and it seems like that's an important bit that should be closer to the top of the section instead of mixed in after the CLI option discussion.
Feel free to ask for adjustments if desired.
Test Plan
I started the docs server and reviewed manually.