Commit graph

226 commits

Author SHA1 Message Date
Zanie Blue
4df0fe9a01
Update the interface for declaring Python download preferences (#5936)
The loose consensus is that "fetch" doesn't have much meaning and that a
boolean flag makes more sense from the command line.

1. Adds `--allow-python-downloads` (hidden, default) and
`--no-python-downloads` to the CLI to quickly enable or disable
downloads
2. Deprecates `--python-fetch` in favor of the options from (1)
3. Removes  `python-fetch` in favor of a `python-downloads` setting
5. Adds a `never` variant to the enum, allowing even explicit installs
to be disabled via the configuration file

## Test plan

I tested this with various `pyproject.toml`-level settings and `uv venv
--preview --python 3.12.2` and `uv python install 3.12.2` with and
without the new CLI flags.
2024-08-09 13:10:19 -05:00
Charlie Marsh
7a0b610c19
Document the tool upgrade command (#5947) 2024-08-09 08:19:38 -05:00
Zanie Blue
345c167774
Fix GitHub cache integration link (#5847)
Unclear why mkdocs does not error on this 404
2024-08-07 02:08:45 +00:00
Zanie Blue
91792674da
Link to the GitHub integration guide from the cache concept (#5828) 2024-08-06 15:48:19 -05:00
Zanie Blue
6a31c80c7e
Update the override section with some content from the README (#5820) 2024-08-06 20:23:58 +00:00
Zanie Blue
aad39febe5
Address some feedback in the tools documentation (#5827) 2024-08-06 15:21:18 -05:00
Zanie Blue
1f7961d6fb
Add "next steps" to some early documentation pages (#5825) 2024-08-06 13:48:04 -05:00
Zanie Blue
12059340de
Update resolver reference documentation (#5823) 2024-08-06 13:18:23 -05:00
Zanie Blue
83d6f59e2e
Update the resolution concept documentation (#5813) 2024-08-06 12:06:06 -05:00
Charlie Marsh
089f50a845
Add --no-sources to avoid reading from tool.uv.sources (#5801)
## Summary

Closes https://github.com/astral-sh/uv/issues/5791.
2024-08-06 14:14:19 +00:00
Charlie Marsh
ce30bffaab
Make some minor tweaks to the docs (#5786)
## Summary

Small stuff from a first scan.

---------

Co-authored-by: Zanie Blue <contact@zanie.dev>
2024-08-05 13:54:06 +00:00
Charlie Marsh
6a80f176a3
Remove some trailing backticks from the docs (#5781) 2024-08-05 00:56:03 +00:00
Delgan
260d1f546f
Fix broken anchor links in docs about dependencies (#5769) 2024-08-05 00:42:48 +00:00
konsti
ba924d298f
Better workspace documentation (#5728)
Add more context around using workspaces.

Closes #5604.

Preview (ignore the glitchy navbar):


![image](https://github.com/user-attachments/assets/61b08a9c-958a-4529-8781-509597704350)
2024-08-03 08:49:09 -05:00
konsti
6e310f2702
Rewrite resolver docs (#5723)
This PR rewrites the resolver concept and adds a resolver internals page
targeted at power users.

The new resolution concept documentation has three parts:
* An introduction for people how never heard of "resolution" before, and
a motivating example what it does. I've also shoved the part about
equally valid resolutions in there.
* Features you commonly use: Non-universal vs. universal resolution,
lowest resolution amd pre-releases.
* Expert features, we don't advertise them, you'll only need them in
complex cases when you already know and i kept them to the reference
points you need in this case: Constraints, overrides and exclude-newer.

I intentionally didn't lay out any detail of the resolution itself, the
idea is that users get a vague sense of "uv has to select fitting
versions", but then they learn the options they have to use and some
common failure points without ever coming near SAT or even graphs.

The resolution internals reference page is targeted at power users who
need to understand what is going on behind the scenes. It assumes ample
prior knowledge and exists to explain the uv-specific behaviors for
someone who already understands dependency resolution conceptually and
has interacted with their dependency tree before. I had a section on the
lockfile but removed it because it found the lockfile to be too
self-documenting.

I haven't touched the readme.

Closes #5603
Closes #5238
Closes #5237

---------

Co-authored-by: Zanie Blue <contact@zanie.dev>
2024-08-03 08:47:11 -05:00
Zanie Blue
44a6dbfa53
Improvements to the documentation (#5718) 2024-08-03 08:41:33 -05:00
konsti
db371560bc
Use prettier to format the documentation (#5708)
To enforce the 100 character line limit in markdown files introduced in
https://github.com/astral-sh/uv/pull/5635, and to automate the
formatting of markdown files, i've added prettier and formatted our
markdown files with it.

I've excluded the changelog and the generated references documentation
from this for having too many changes, but we can also include them.

I'm not particular on which style we use. My main motivations are
(major) not having to reflow markdown files myself anymore and (minor)
consistence between all markdown files. I've chosen prettier for similar
reason as we chose black, it's a single good style that's automated and
shared in the community. I do prefer prettier's style of not breaking
inside of a link name though.

This PR is in two parts, the first adds prettier to CI and documents
using it, while the second actually formats the docs. When merge
conflicts arise, we can drop the last commit and regenerate it with `npx
prettier --prose-wrap always --write BENCHMARKS.md CONTRIBUTING.md
README.md STYLE.md docs/*.md docs/concepts/**/*.md docs/guides/**/*.md
docs/pip/**/*.md`.

---------

Co-authored-by: Zanie Blue <contact@zanie.dev>
2024-08-02 08:58:31 -05:00
konsti
78d4045729
Don't use equals signs for cli args with value (#5704)
Use a consistent style for cli arguments with a value, e.g.
`--resolution lowest`, not `--resolution=lowest`.
2024-08-01 14:17:30 -05:00
Zanie Blue
22d152192d
Improvements to the dependency concept doc (#5658) 2024-07-31 15:44:25 +00:00
Zanie Blue
fbff1baf33
Improvements to the Python version concepts documentation (#5638)
Depends on https://github.com/astral-sh/uv/pull/5637
2024-07-31 08:40:50 -05:00
Charlie Marsh
5d727cb0af
Deprecate the --isolated flag (#5466)
## Summary

This PR deprecates the `--isolated` flag. The treatment varies across
the APIs:

- For non-preview APIs, we warn but treat it as equivalent to
`--no-config`.
- For preview APIs, we warn and ignore it, with two exceptions...
- For `tool run` and `run` specifically, we don't even warn, because we
can't differentiate the command-specific `--isolated` from the global
`--isolated`.
2024-07-30 22:40:38 +00:00
Zanie Blue
f971631adf
Wrap documentation at 100 characters (#5635)
Basically sick of dealing with mixed formatting here. Going with the
number at
7c08e61b73/.editorconfig (L20)
2024-07-30 22:17:58 +00:00
Zanie Blue
b081425a77
Improvements to the project concept docs (#5634) 2024-07-30 22:11:52 +00:00
Zanie Blue
8545ae2312
Rename more use of "lock file" to "lockfile" (#5629) 2024-07-30 19:09:43 +00:00
Charlie Marsh
3e7b9fb2ee
Add documentation for cache clearing (#5517)
See: https://github.com/astral-sh/uv/pull/5391#issuecomment-2248757705
2024-07-30 09:38:04 -05:00
Zanie Blue
6eb8f85668
Update documentation sections (#5452)
Reframes "the low-level interface" as "the pip interface"
Adds indexes to all sections
Renames "commercial indexes" to "alternative indexes"
2024-07-25 12:37:22 -05:00