Rewrite gallery as an installable package, add plotstyle, migrate build/CI to uv #1
Reference in New Issue
Block a user
Delete Branch "dev"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
This brings
mainup to the current state ofdev: a full package rewriteof the gallery generator, a new companion plotting toolkit (
plotstyle),a production deployment setup, and a build/CI system migrated fully to
uv.Gallery: features and UI
inheritance from parent folders, per-plot overrides, and an expandable
metadata grid in the UI (long-line wrapping, inline LaTeX rendering via
MathJax, copyable file paths).
the same folder, breadcrumb navigation, search.
when the target is already up to date (30s mtime buffer), so repeat runs
only touch changed plots.
scattered
prints), and various UI fixes (spacing, long filenamehandling, subdirectory navigation reload).
gallerypackage (CLI, TUI,config manager, Jinja2 template, modular CSS/JS) with a proper pytest
suite.
New:
plotstyleA standalone matplotlib styling toolkit for producing the plots a gallery
source directory displays (no code dependency on
gallery— the two onlymeet on disk via PDFs +
metadata.yaml). KIT corporate-design colorpalette (categorical/sequential/diverging/status), a theme applied via
use(),new_figure()with size presets and title/params subtitles, asame-size
colorbar(),style_legend(),panel_label(),no_spines()for pixel/bin-indexed plots, and
savefig(). Ships with a full test suiteand a rendered example notebook (
examples/plotstyle_showcase.ipynb).Deployment
Dockerfile,docker-compose.yml(generator + nginx services sharing avolume),
deploy/nginx.conf,deploy/entrypoint.sh.systemd --usertimer path for HPC login nodeswithout a Docker daemon (
deploy/systemd/), for environments wherepublic_htmlis already served by existing infrastructure.CI/CD and build system
lint/format/typecheck/audit/test pipeline (ruff, ty, pip-audit, pytest)
decoupled from the Docker image build — Docker is now deploy-only.
pyproject.tomlfiles(
galleryandplotstyle) now build with uv's ownuv_buildbackend,and the repo is a proper uv workspace (
plotstyleis a workspacemember with its own src-layout package, matplotlib as its own direct
dependency rather than a
galleryextra; dev tooling lives in adependency-group).Dockerfilenow useuvend-to-end (astral-sh/setup-uv,uv sync,uv run,uv build,uv publish) instead ofpip/build/twine. Lint/format/typecheck run as separate per-package steps(
gallery,plotstyle,tests) so a failure points at exactly whichpackage broke.
.gitea/workflows/publish-plotstyle.yml: pushing aplotstyle-v*tag builds and publishes
plotstyleto this repo's Gitea packageregistry.
Cleanup
Removed code superseded by the package restructuring: the old top-level
generate_gallery.py/orchestration//roottemplates/assets, thenever-wired
backup_folderfeature, the unfinished export-to-LaTeXJS/CSS, obsolete Docker-container smoke tests, and stale docs describing
workflows that no longer exist.