Move build system from setuptools to uv, wire uv into CI/CD
CI / lint:ruff (push) Successful in 25s
CI / format:ruff (push) Successful in 14s
CI / typecheck:ty (push) Successful in 15s
CI / vulnerabilities:pip-audit (push) Successful in 17s
CI / test:pytest (push) Successful in 24s

Convert both pyproject.toml files to the uv_build backend and turn the
repo into a proper uv workspace (plotstyle moved to src layout, since
uv_build requires the module in its own subdirectory). Dev tooling
moves from an optional-dependencies extra to a dependency-group, and
plotstyle's matplotlib dependency is now its own rather than a
gallery "plotting" extra.

Gitea Actions workflows and the Dockerfile now use astral-sh/setup-uv,
uv sync, uv run, uv build, and uv publish throughout instead of pip,
build, and twine. Also fixes .dockerignore, which was excluding
uv.lock, deploy/, and README.md and would have broken even the
previous Dockerfile's COPY of deploy/entrypoint.sh.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-24 10:30:20 +02:00
co-authored by Claude Sonnet 5
parent 2020ac4883
commit 5109b6505c
17 changed files with 1081 additions and 757 deletions
+9 -6
View File
@@ -21,15 +21,18 @@ produces. Everything below is the reference; the notebook is the demo.
## Install
`plotstyle` is its own project (`plotstyle/pyproject.toml`, `uv_build`
backend, code under `plotstyle/src/plotstyle/`) and a member of this repo's
uv workspace (`[tool.uv.workspace]` in the root `pyproject.toml`) — not a
`gallery` extra.
```bash
uv sync --extra plotting # this repo's uv workflow
# or
pip install -e ".[plotting]"
uv sync --all-packages # this repo's uv workflow — installs gallery + plotstyle together
```
`plotstyle` is an optional extra (`matplotlib>=3.7`) so core `gallery`
installs stay lightweight — don't add matplotlib to `gallery`'s own
unconditional dependencies to support this package.
`matplotlib>=3.7` is `plotstyle`'s own direct dependency — don't add it to
`gallery`'s dependencies to support this package; `gallery` should stay
installable without ever pulling in matplotlib.
**Hard requirement: a working local LaTeX toolchain (`latex` + `dvipng`).**
`plotstyle.use()` sets `text.usetex = True` unconditionally — there is no