Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion doc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -179,3 +180,21 @@ So, you cannot have
`#123 <https://github.com/haskell/cabal/issues/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).
Loading