Commit Graph

27 Commits

Author SHA1 Message Date
Aria Desires 9138b35c66 Create `main.py` instead of `hello.py` in `uv init` (#10369)
Initially it seemed like `app.py` might be slightly more desirable but
people seem to overwhelmingly favour `main.py` as a good "generic" name.

Fixes #7782
2025-02-13 16:17:49 -06:00
Zanie Blue c64965273f
Misc. improvements to the documentation (#11255) 2025-02-05 17:22:09 -06:00
FishAlchemist 9736868908
Add meta titles to documents in guides, excluding integration documents. (#10539)
## Summary
Add meta titles to documents in guides, excluding integration documents.
<!-- What's the purpose of the change? What does it do, and why? -->

## Test Plan
``uvx --with-requirements docs/requirements.txt -- mkdocs build --strict
-f mkdocs.public.yml``
<details>
 <summary>Build Result</summary>

* ``guides/install-python``
```html
...
<meta name="description" content="Guide to install specific Python versions, manage existing installations, and automate downloads with uv.">
...
<title>Install and Manage Python | uv</title>
...
```
* ``guides/projects``
```html
...
<meta name="description" content="Guide to create, manage, and build Python projects with uv, including dependencies and distributions.">
...
<title>Working on projects | uv</title>
...
```
* ``guides/publish``
```html
...
<meta name="description" content="Guide to build and publish Python packages using uv">
...
<title>Publishing a package | uv</title>
...
```
* ``guides/scripts``
```html
...
<meta name="description" content="Run Python scripts quickly and manage dependencies efficiently using uv. Learn about inline metadata and more.">
...
<title>Run Scripts | uv</title>
...
```
* ``guides/tools``
```html
...
<meta name="description" content="Guide to run, install, and upgrade Python tools using uv.">
...
<title>Using tools | uv</title>
...
```
</details>

---------

Co-authored-by: Charles Tapley Hoyt <cthoyt@gmail.com>
Co-authored-by: Zanie Blue <contact@zanie.dev>
2025-01-15 14:12:55 -06:00
Charlie Marsh d77598a08c
Use Windows-specific instructions in Jupyter guide (#10446)
## Summary

Closes https://github.com/astral-sh/uv/issues/10407.
2025-01-09 16:43:09 -05:00
Zanie Blue ca9aaf1c48
Reorganize the project concept documentation (#9121)
- Adds a collapsible section for the project concept
- Splits the project concept document into several child documents.
- Moves the workspace and dependencies documents to under the project
section
- Adds a mkdocs plugin for redirects, so links to the moved documents
still work

I attempted to make the minimum required changes to the contents of the
documents here. There is a lot of room for improvement on the content of
each new child document. For review purposes, I want to do that work
separately. I'd prefer if the review focused on this structure and idea
rather than the content of the files.

I expect to do this to other documentation pages that would otherwise be
very nested.

The project concept landing page and nav (collapsed by default) looks
like this now:

<img width="1507" alt="Screenshot 2024-11-14 at 11 28 45 AM"
src="https://github.com/user-attachments/assets/88288b09-8463-49d4-84ba-ee27144b62a5">
2024-11-19 13:52:12 -06:00
Volker Hilsenstein ca62f8855b
Fix documentation (projects guide) regarding adding a git dependency (#7916)
## Summary

This is a trivial, one line documentation change that fixes the
following documentation bug.

The current documentation suggests this for adding a git dependency

```
# Add a git dependency

uv add requests --git https://github.com/psf/requests
```

Executing what is suggested with `uv` version `0.4.18` results in this
error message

```
uv add requests --git https://github.com/psf/requests
error: unexpected argument '--git' found
```

The working approach is to add the git depency like this:

```
uv add git+https://github.com/psf/requests
```

## Test Plan

I manually tested the command suggested currently in the guide against
my change.
2024-10-04 11:42:18 +01:00
Charlie Marsh a3abd89ab0
Note that `uv lock --upgrade-package` retains locked versions (#7694)
Closes https://github.com/astral-sh/uv/issues/7672.
2024-09-25 22:17:55 +00:00
my1e5 86c8906d10
Update docs on `.python-version` file (#7051)
## Summary

Closes https://github.com/astral-sh/uv/issues/7027

* When displaying the file structure of a uv-managed project show the
`.python-version` file which is now created by default.
* Mention the purpose of the `.python-version` file in `Guides/Working
on projects/Project structure`
* In `Concepts/Python versions/Project python versions`, changed
sentence about `.python-version` file to reflect the fact it is included
by default so is likely to be present.
2024-09-04 19:22:34 -04:00
Charlie Marsh 724a93bfdb
Add documentation for `uv build` (#6991) 2024-09-04 15:53:14 +00:00
Zanie Blue d5d8375c7e
Update project documentation for the application / library concepts (#6718)
Follows https://github.com/astral-sh/uv/pull/6689 and
https://github.com/astral-sh/uv/pull/6585
2024-08-27 16:22:31 -05:00
Zanie Blue c56102bde3
Fix some broken links (#6705) 2024-08-27 17:24:49 +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 f08cd2b9dc
Add a guide for publishing packages (#5794)
Closes https://github.com/astral-sh/uv/issues/5793
2024-08-05 16:12:37 -05: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
Zanie Blue 44a6dbfa53
Improvements to the documentation (#5718) 2024-08-03 08:41:33 -05:00
Jelle Zijlstra 4096bcef3e
docs: fix typo (#5732)
Co-authored-by: konstin <konstin@mailbox.org>
2024-08-02 18:23:53 +00: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
Zanie Blue cbb13e6584
Improve the project guide (#5626) 2024-07-30 18:26:23 -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
Mark Ture 12e92b7718
Fix typo in projects.md (#5523) 2024-07-28 21:05:26 +01: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 3581e27cdf
Bundle of docs changes (#5426) 2024-07-24 17:10:33 -05:00
Zanie Blue dac696e950
Bundle of documentation changes (#5307)
Following #5239
2024-07-23 13:29:59 -05:00
Zanie Blue 6492f1a897
A bundle of documentation changes (#5239)
I just need to iterate on everything and we're not doing a lot of
reviews anyway.

Closes #5234 
Closes #5191
2024-07-22 17:15:11 +00:00
Ibraheem Ahmed 360079fd05
Write project guide (#5195)
## Summary

Write the project guide that was added in
https://github.com/astral-sh/uv/pull/5135.

I tried to expand on details as much as I felt was necessary for someone
new to python package managers (which was myself a couple months ago).
2024-07-18 19:45:25 -05:00
Zanie Blue 177bbaa8c0
Add stubs for the project documentation (#5135)
@ibraheemdev is going to do some work on these, I just sketched out some
parts to try to understand how things will fit together.
2024-07-16 17:02:54 -05: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="https://github.com/astral-sh/uv/assets/2586601/500ad97d-899d-4051-b59d-e74786b3a45f">
2024-07-02 11:44:45 -05:00