diff --git a/doc/README.md b/doc/README.md index 296b6dee0ee..94292b674ac 100644 --- a/doc/README.md +++ b/doc/README.md @@ -24,7 +24,8 @@ and instead set `LC_ALL=en_US.UTF-8`. ### How to update dependencies The list of transitive dependencies (`requirements.txt`) is generated from the -list of direct dependencies in `pyproject.toml`. Find outdated dependencies with: +list of direct dependencies in `pyproject.toml`. Find outdated dependencies using UV +(see also "UV setup details" section at the bottom) with: ```console > cd doc @@ -179,3 +180,21 @@ So, you cannot have `#123 `__ See `conf.py` for list of currently defined link shorteners. + +### UV setup details + +The documentation build process uses [UV](https://github.com/astral-sh/uv) to manage Python dependencies. +UV is a fast Python package installer and resolver, written in Rust. +To get started with UV, you can install it following the [official instructions]([url](https://docs.astral.sh/uv/getting-started/installation/#installation-methods)). + +The following UV commands are used in the Makefile and documentation: + +- `uv sync`: Installs the dependencies listed in `uv.lock` (or resolves them from `pyproject.toml` if the lock file is missing). +- `uv export --frozen --format requirements.txt`: Exports the resolved dependencies to a `requirements.txt` file (used for skjold checks). +- `uv pip list --outdated`: Lists outdated dependencies (for updating). +- `uv sync --upgrade`: Upgrades the dependencies to the latest versions allowed by `pyproject.toml` and updates the lock file. +- `uvx skjold`: Runs the skjold tool (for security vulnerability checks) in an isolated environment. + + +Note: The `uv.lock` file in the `doc/` directory is committed to the repository to ensure reproducible builds. +When updating dependencies, remember to commit the updated `uv.lock` and `pyproject.toml` (if bounds are changed).