Commit graph

23 commits

Author SHA1 Message Date
stevenae
991715c6b4
Update environments.md 2025-06-03 17:10:17 -04:00
stevenae
0c90605bd4
Update environments.md 2025-06-03 11:21:17 -04:00
stevenae
beae144073
Update environments.md 2025-05-27 11:21:17 -04:00
stevenae
ce6d2379aa
Update environments.md
Per 13624 and 1472. Built and checked docs locally.
2025-05-27 11:09:26 -04:00
Reza Gharibi
d4e8df9b94
Fix PowerShell code blocks (#13511)
Some checks are pending
CI / check cache | macos aarch64 (push) Blocked by required conditions
CI / check system | graalpy on ubuntu (push) Blocked by required conditions
CI / check system | pypy on ubuntu (push) Blocked by required conditions
CI / check system | python on debian (push) Blocked by required conditions
CI / check system | python on fedora (push) Blocked by required conditions
CI / check system | python on ubuntu (push) Blocked by required conditions
CI / check system | python on opensuse (push) Blocked by required conditions
CI / check system | python on rocky linux 8 (push) Blocked by required conditions
CI / check system | python on rocky linux 9 (push) Blocked by required conditions
CI / check system | pyston (push) Blocked by required conditions
CI / check system | python on macos aarch64 (push) Blocked by required conditions
CI / check system | homebrew python on macos aarch64 (push) Blocked by required conditions
CI / check system | python on macos x86-64 (push) Blocked by required conditions
CI / check system | python3.10 on windows x86-64 (push) Blocked by required conditions
CI / check system | python3.10 on windows x86 (push) Blocked by required conditions
CI / check system | python3.13 on windows x86-64 (push) Blocked by required conditions
CI / check system | x86-64 python3.13 on windows aarch64 (push) Blocked by required conditions
CI / check system | windows registry (push) Blocked by required conditions
CI / check system | python3.12 via chocolatey (push) Blocked by required conditions
CI / check system | python3.9 via pyenv (push) Blocked by required conditions
CI / check system | python3.13 (push) Blocked by required conditions
CI / check system | conda3.11 on macos aarch64 (push) Blocked by required conditions
CI / check system | conda3.8 on macos aarch64 (push) Blocked by required conditions
CI / check system | conda3.11 on linux x86-64 (push) Blocked by required conditions
CI / check system | conda3.8 on linux x86-64 (push) Blocked by required conditions
CI / check system | conda3.11 on windows x86-64 (push) Blocked by required conditions
CI / check system | conda3.8 on windows x86-64 (push) Blocked by required conditions
CI / check system | amazonlinux (push) Blocked by required conditions
CI / check system | embedded python3.10 on windows x86-64 (push) Blocked by required conditions
CI / benchmarks (push) Blocked by required conditions
<!--
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

The PowerShell prompt is not `$`, so it is not detected as a
`Generic.Prompt` token by Pygments lexers. Therefore, the JavaScript
code does not strip the prompt when copying from PowerShell code blocks,
such as
[here](https://docs.astral.sh/uv/getting-started/installation/#__tabbed_5_2).

Other places in the docs have removed the prompt completely to address
this issue:
* https://docs.astral.sh/uv/guides/projects/#__tabbed_1_2
* https://docs.astral.sh/uv/guides/integration/jupyter/#__tabbed_1_2

This PR updates the PowerShell prompt to `PS>` and changes the code
fence language to `pwsh-session` to match the lexer name from
[Pygments](https://pygments.org/docs/lexers/#pygments.lexers.shell.PowerShellSessionLexer).
This allows the prompt to be correctly detected as a `Generic.Prompt`
token and is stripped during copy.

Related: https://github.com/astral-sh/uv/pull/12520
2025-05-17 21:06:48 -05:00
Zanie Blue
a38250d470
Fix mismatched pip interface header / nav titles (#12640) 2025-04-08 17:44:44 -05:00
Gregory Power
f54979f2bc
add instructions for deactivating an environment (#11200)
## Summary

Add instructions for deactivating a virtual environment.

---------

Co-authored-by: Zanie Blue <contact@zanie.dev>
2025-02-03 22:16:41 +00:00
Cédric
315fc1792a
Update documentation for activating virtual environments in different shell (#11000)
## Add activation commands for fish shell and other alternative shells

While trying to use uv with fish shell, I encountered an issue as
`source .venv/bin/activate` didn't work. The documentation didn't
specify that fish shell requires using `source .venv/bin/activate.fish`
instead. I created issue #10986 to address this.

This PR improves the documentation by:
- Adding the correct activation command for fish shell: `source
.venv/bin/activate.fish`
- Adding the correct activation command for Nushell: `use
.venv\Scripts\activate.nu`
- Adding the correct activation command for Tcsh: `use
.venv/bin/activate.csh`

This will help users of alternative shells to properly activate their
virtual environments without encountering the same confusion I
experienced.

Fixes #10986

---------

Co-authored-by: Zanie Blue <contact@zanie.dev>
2025-01-27 19:24:47 +00:00
Dheepak Krishnamurthy
346147db23
chore: Fix typo in docs (#7122)
Remove duplicate `the`.

---------

Co-authored-by: Zanie Blue <contact@zanie.dev>
2024-09-06 12:40:26 +00:00
Mathieu Kniewallner
fd17f6d902
docs: use python to highlight requirements and use more content tabs (#6549)
## Summary

It appears that using `python` for code blocks containing requirements
works quite well.

![Screenshot from 2024-08-23
23-23-05](https://github.com/user-attachments/assets/38c92ef7-1f5e-40eb-8ea4-7024c8180bc4)

![Screenshot from 2024-08-23
23-23-31](https://github.com/user-attachments/assets/940dc7d5-22a8-4cd8-b54a-d56542d4345c)

Also using more content tabs for cases where we need to differentiate
macOS/Linux from Windows.

## Test Plan

Local run of the documentation.
2024-08-27 06:05:14 -05:00
Alexandre B A Villares
582e5a316f
docs: correcting typo "available" -> "unavailable" (#6424) 2024-08-22 12:53:07 +00:00
Mathieu Kniewallner
85be33d719
docs: use stricter validation options (#6096)
## Summary

`mkdocs` supports [validation rules for
links](https://www.mkdocs.org/user-guide/configuration/#validation),
which can be tightened to report more issues than the default
configuration. I used the recommended "maximal strictness" configuration
from the documentation.

Adding the `anchors` rule helped spot 4 errors:
```console
WARNING -  Doc file 'guides/install-python.md' contains a link '../concepts/python-versions.md#python-distributions', but the doc 'concepts/python-versions.md' does not contain an anchor '#python-distributions'.
WARNING -  Doc file 'guides/install-python.md' contains a link '../concepts/python-versions.md#discovery-order', but the doc 'concepts/python-versions.md' does not contain an anchor '#discovery-order'.
WARNING -  Doc file 'guides/projects.md' contains a link '../concepts/projects.md#lock-file', but the doc 'concepts/projects.md' does not contain an anchor '#lock-file'.
WARNING -  Doc file 'pip/environments.md' contains a link '../concepts/python-versions.md#discovery-order', but the doc 'concepts/python-versions.md' does not contain an anchor '#discovery-order'.
```

## Test Plan

Local run of the documentation + `mkdocs build --strict`.
2024-08-14 19:27:22 -05:00
Zanie Blue
e8876ada6d
Fix some outdated documentation discussing Python environments (#6058)
Starting on https://github.com/astral-sh/uv/issues/5966 noticed various
problems
2024-08-13 11:47:39 -05:00
Zanie Blue
8cada6cbc9
Fix some console blocks in the environment doc (#5826) 2024-08-06 13:47:49 -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
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
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
Zanie Blue
dac696e950
Bundle of documentation changes (#5307)
Following #5239
2024-07-23 13:29:59 -05:00
Charlie Marsh
e61a221fef
Migrate from MdBook to MkDocs (#5062)
## Summary

We want to have consistency between the Ruff and uv documentation for
the upcoming release. We don't love the Ruff docs, but we'd rather have
consistency and then work towards improving them both, rather than have
two very-different documentation sites that both have weaknesses.

The setup here is simpler than in Ruff as: (1) we don't yet generate any
docs from Rust and (2) we don't try to reuse the README in the uv
documentation (which adds a lot of complexity in Ruff). So the change
here is mostly a 1-to-1 port to MkDocs.

## Test Plan

![Screenshot 2024-07-14 at 9 49
15 PM](https://github.com/user-attachments/assets/8bfb5b06-08ff-4329-b368-d9087b78996e)
2024-07-15 22:22:07 +00:00
Zanie Blue
12e12d066d
Restructure documentation sections to focus on new user experience (#4586)
Moving the preview features to top-level concepts and pushing the
pip-compatible interface down.

e.g.

<img width="291" alt="Screenshot 2024-06-27 at 7 03 48 AM"
src="500ad97d-899d-4051-b59d-e74786b3a45f">
2024-07-02 11:44:45 -05:00
Zanie Blue
1ee201da5a
Add structured documentation (#4426)
A ton of work remaining here, pushing so I can preview things rendered.

Here's the [latest rendered
documentation](https://astral-sh.github.io/uv/).
2024-06-26 11:28:42 -05:00