From 960714d4d6ada36276a44be08543bf56f894b6ce Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Wed, 27 Aug 2025 13:16:52 -0500 Subject: [PATCH] Tweak some documentation headings (#15556) Just some nits I want to make incremental progress on --- docs/concepts/projects/config.md | 2 -- docs/concepts/projects/dependencies.md | 5 ++++- docs/concepts/projects/layout.md | 2 +- docs/concepts/projects/run.md | 2 +- docs/concepts/projects/sync.md | 2 +- docs/concepts/resolution.md | 4 ++-- docs/js/extra.js | 8 ++++++++ mkdocs.template.yml | 2 +- 8 files changed, 18 insertions(+), 9 deletions(-) diff --git a/docs/concepts/projects/config.md b/docs/concepts/projects/config.md index 6731a8adb..bc76eb8b7 100644 --- a/docs/concepts/projects/config.md +++ b/docs/concepts/projects/config.md @@ -120,8 +120,6 @@ with the default build system. or install it with `uv pip`, uv will attempt to build and install it regardless of the presence of a `[build-system]` table. -### Build system options - Build systems are used to power the following features: - Including or excluding files from distributions diff --git a/docs/concepts/projects/dependencies.md b/docs/concepts/projects/dependencies.md index 192a86e71..d518deee7 100644 --- a/docs/concepts/projects/dependencies.md +++ b/docs/concepts/projects/dependencies.md @@ -78,7 +78,7 @@ $ uv add "httpx>9999" we can conclude that your project's requirements are unsatisfiable. ``` -### Importing dependencies +### Importing dependencies from requirements files Dependencies declared in a `requirements.txt` file can be added to the project with the `-r` option: @@ -86,6 +86,9 @@ Dependencies declared in a `requirements.txt` file can be added to the project w uv add -r requirements.txt ``` +See the [pip migration guide](../../guides/migration/pip-to-project.md#importing-requirements-files) +for more details. + ## Removing dependencies To remove a dependency: diff --git a/docs/concepts/projects/layout.md b/docs/concepts/projects/layout.md index fecfd0098..b8d96320f 100644 --- a/docs/concepts/projects/layout.md +++ b/docs/concepts/projects/layout.md @@ -82,7 +82,7 @@ explicitly updated using `uv lock`. `uv.lock` is a human-readable TOML file but is managed by uv and should not be edited manually. The `uv.lock` format is specific to uv and not usable by other tools. -### `pylock.toml` +### Relationship to `pylock.toml` In [PEP 751](https://peps.python.org/pep-0751/), Python standardized a new resolution file format, `pylock.toml`. diff --git a/docs/concepts/projects/run.md b/docs/concepts/projects/run.md index e6e14f3fe..26531721b 100644 --- a/docs/concepts/projects/run.md +++ b/docs/concepts/projects/run.md @@ -64,7 +64,7 @@ print([(k, v["title"]) for k, v in data.items()][:10]) The invocation `uv run example.py` would run _isolated_ from the project with only the given dependencies listed. -## Legacy Windows Scripts +## Legacy scripts on Windows Support is provided for [legacy setuptools scripts](https://packaging.python.org/en/latest/guides/distributing-packages-using-setuptools/#scripts). diff --git a/docs/concepts/projects/sync.md b/docs/concepts/projects/sync.md index 92cb24be8..a5cfcc122 100644 --- a/docs/concepts/projects/sync.md +++ b/docs/concepts/projects/sync.md @@ -32,7 +32,7 @@ option: $ uv run --no-sync ... ``` -## Checking if the lockfile is up-to-date +## Checking the lockfile When considering if the lockfile is up-to-date, uv will check if it matches the project metadata. For example, if you add a dependency to your `pyproject.toml`, the lockfile will be considered diff --git a/docs/concepts/resolution.md b/docs/concepts/resolution.md index 914f1533f..c0a271153 100644 --- a/docs/concepts/resolution.md +++ b/docs/concepts/resolution.md @@ -139,7 +139,7 @@ bounds on `requires-python` often leads to formally correct but practically inco as, e.g., resolvers will backtrack to the first published version that omits the upper bound (see: [`Requires-Python` upper limits](https://discuss.python.org/t/requires-python-upper-limits/12663)). -### Limited resolution environments +## Limited resolution environments By default, the universal resolver attempts to solve for all platforms and Python versions. @@ -172,7 +172,7 @@ Entries in the `environments` setting must be disjoint (i.e., they must not over `sys_platform == 'darwin'` and `python_version >= '3.9'` are not, since both could be true at the same time. -### Required environments +## Required environments In the Python ecosystem, packages can be published as source distributions, built distributions (wheels), or both; but to install a package, a built distribution is required. If a package lacks a diff --git a/docs/js/extra.js b/docs/js/extra.js index 58a71e98d..d059d2875 100644 --- a/docs/js/extra.js +++ b/docs/js/extra.js @@ -80,6 +80,14 @@ document$.subscribe(function () { "concepts/projects/config/#build-isolation", "concepts/projects/dependencies/#dependency-specifiers-pep-508": "concepts/projects/dependencies/#dependency-specifiers", + "concepts/projects/dependencies/#importing-dependencies": + "concepts/projects/dependencies/#importing-dependencies-from-requirements-files", + "concepts/projects/layout/#pylock-toml": + "concepts/projects/layout/#relationship-to-pylock-toml", + "concepts/projects/run/#legacy-windows-scripts": + "concepts/projects/run/#legacy-scripts-on-windows", + "concepts/projects/sync/#checking-if-the-lockfile-is-up-to-date": + "concepts/projects/sync/#checking-the-lockfile", }; // The prefix for the site, see `site_dir` in `mkdocs.yml` diff --git a/mkdocs.template.yml b/mkdocs.template.yml index edeb84645..342909bcf 100644 --- a/mkdocs.template.yml +++ b/mkdocs.template.yml @@ -228,7 +228,7 @@ nav: - Commands: reference/cli.md - Settings: reference/settings.md - Environment variables: reference/environment.md - - Installer: reference/installer.md + - Installer options: reference/installer.md - Troubleshooting: - reference/troubleshooting/index.md - Build failures: reference/troubleshooting/build-failures.md