-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
dev-dependencies
defined in uv.toml
are not handled
#7007
Comments
I agree that we need to correct this is in the documentation... It's also true of |
(I'm marking as |
Trying something out in #7053, with the idea of separating the "project metadata" and "configuration" options into 2 distinct sections. WIP for now, as it needs a bit of polishing. We would probably also need to:
|
<!-- Thank you for contributing to uv! To help us out with reviewing, please consider the following: - Does this pull request include a summary of the change? (See below.) - Does this pull request include a descriptive title? - Does this pull request include references to any relevant issues? --> ## Summary Part of #7007. Settings documentation reference currently doesn't separate "project metadata" and "configuration" options, implying that it's possible to set things like `dev-dependencies` in `uv.toml` while it's not. This is an attempt at better separating those options, by having 2 different sections: - `Project metadata`, that holds configuration that can only be set in `pyproject.toml` - `Configuration`, that holds configuration that can be set both in `pyproject.toml` and `uv.toml` Here are some screenshots to show what this looks like (note that I don't have code highlighting in the right navigation, which makes them clunky, as first item is always bigger because of the missing "span" -- I think that's because it's an `mkdocs-material` insider feature, since I have the same thing on `main` branch): - Right side navigation: <img width="241" alt="Screenshot 2024-09-05 at 01 19 50" src="https://github.com/user-attachments/assets/012f64a4-8d34-4e34-a506-8d02dc1fbf98"> <img width="223" alt="Screenshot 2024-09-05 at 01 20 01" src="https://github.com/user-attachments/assets/0b0fb71d-c9c3-4ee3-8f6e-cf35180b1a99"> - An option from "Project metadata" section that only applies to `pyproject.toml`: <img width="788" alt="Screenshot 2024-09-05 at 01 20 11" src="https://github.com/user-attachments/assets/64349fbb-8623-4b81-a475-d6ff38c658f1"> - An option from "Configuration" section that applies both to `pyproject.toml` and `uv.toml`: <img width="787" alt="Screenshot 2024-09-05 at 01 20 33" src="https://github.com/user-attachments/assets/732e43d3-cc64-4f5a-8929-23a5555d4c53"> ## Test Plan Local run of the documentation. Co-authored-by: Charlie Marsh <charlie.r.marsh@gmail.com>
Do you think we should close this @mkniewallner? |
I've noted 2 follow-up items that could further help clarify things in #7007 (comment), but they are probably lower priority than the documentation. If those are items you think are worth doing, maybe we could either rename this issue to make things more clear on what this is about, or create separate issue(s) for the remaining items? I'm personally fine with both, I just think it would be nice to keep a trace of the remaining issues, as I think fixing them at some point could improve user experience. |
We now error if |
Yeah I believe we can close this issue, the most important item to me was the misleading documentation. I don't know exactly the cost of maintaining two schemas, but it's probably enough that it justifies not doing it. |
In theory, everything that lives under
[tool.uv]
section inpyproject.toml
can also be defined inuv.toml
. This includes dev-dependencies.But given:
When using
uv lock
, we end up with the following lock file:so it doesn't seem that uv reads
dev-dependencies
fromuv.toml
.But
uv.toml
itself is correctly read, as can be seen with:I realise that this is most likely on purpose, since it would be hard to handle dev dependencies in
uv.toml
(for instanceuv add --dev httpx
would currently add the dependency inpyproject.toml
, even if we already havedev-dependencies
inuv.toml
. In that case, this most likely comes from the fact that the documentation is auto-generated based on the settings, and there's no way to mark some options as "only available inpyproject.toml
when generating the documentation.Note also than if also adding
dev-dependencies
inpyproject.toml
, despite the warning, dev dependencies will still be handled properly frompyproject.toml
when locking:Just in case, including the full logs from the very first
uv lock
command on the initial setup (without[tool.uv]
), even if there's nothing really interesting:The text was updated successfully, but these errors were encountered: