Commit Graph

81 Commits

Author SHA1 Message Date
lars 7fdb1a200f Bump plotstyle to 1.0.0 and gallery to 0.2.0
Publish plotstyle / build-and-publish (push) Failing after 9s
CI / test:pytest (push) Successful in 20s
CI / lint:ruff (push) Successful in 14s
CI / format:ruff (push) Successful in 17s
CI / typecheck:ty (push) Successful in 15s
CI / vulnerabilities:pip-audit (push) Successful in 18s
v0.2.0
2026-07-24 10:52:41 +02:00
lars f3c03a0d0c Merge pull request 'Rewrite gallery as an installable package, add plotstyle, migrate build/CI to uv' (#1) from dev into main
CI / lint:ruff (push) Successful in 16s
CI / format:ruff (push) Successful in 16s
CI / typecheck:ty (push) Successful in 14s
CI / vulnerabilities:pip-audit (push) Successful in 19s
CI / test:pytest (push) Successful in 24s
Reviewed-on: #1
2026-07-24 10:49:38 +02:00
lars 5064aec831 Split CI lint/format/typecheck steps per package
CI / lint:ruff (push) Successful in 13s
CI / format:ruff (push) Successful in 15s
CI / typecheck:ty (push) Successful in 17s
CI / vulnerabilities:pip-audit (push) Successful in 16s
CI / test:pytest (push) Successful in 22s
CI / lint:ruff (pull_request) Successful in 15s
CI / format:ruff (pull_request) Successful in 16s
CI / typecheck:ty (pull_request) Successful in 14s
CI / vulnerabilities:pip-audit (pull_request) Successful in 17s
CI / test:pytest (pull_request) Successful in 21s
Run ruff check, ruff format --check, and ty check as separate steps
per package (gallery, plotstyle, tests) instead of one combined
command, so a failure points at which package broke.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-24 10:41:30 +02:00
lars 5109b6505c 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>
2026-07-24 10:30:20 +02:00
lars 2020ac4883 Remove pre-package-restructure cruft and dead features
CI / lint:ruff (push) Successful in 9s
CI / format:ruff (push) Successful in 8s
CI / typecheck:ty (push) Successful in 10s
CI / vulnerabilities:pip-audit (push) Successful in 11s
CI / test:pytest (push) Successful in 12s
Delete the top-level implementation superseded by the gallery/ package
conversion (generate_gallery.py, orchestration/, root templates/ and
assets/, python/ scripts), stray scratch files, and docs describing a
container/GitLab-CI coverage workflow that no longer exists. Also drop
two half-wired, never-invoked features: the backup_folder config/TUI
option (create_backup() was never called from the pipeline) and the
unfinished export-to-LaTeX JS/CSS. Update README's install instructions
to the current Gitea remote.
2026-07-23 13:50:32 +02:00
lars 067465503a Pin setuptools>=83.0.0 as a dev dependency
CI / format:ruff (push) Successful in 7s
CI / typecheck:ty (push) Successful in 8s
CI / vulnerabilities:pip-audit (push) Successful in 10s
CI / lint:ruff (push) Successful in 2m25s
CI / test:pytest (push) Successful in 13s
The build-system requirement only pins the isolated build backend, not
the runtime venv setuptools that pip-audit scans, so CI still saw the
vulnerable 79.0.1. Add it to the dev extra so pip actually installs
the patched version.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-23 13:20:11 +02:00
lars 2a7d3d244a Skip editable package in pip-audit; require setuptools>=83.0.0
CI / lint:ruff (push) Successful in 8s
CI / format:ruff (push) Successful in 7s
CI / typecheck:ty (push) Successful in 8s
CI / vulnerabilities:pip-audit (push) Failing after 9s
CI / test:pytest (push) Has been skipped
pip-audit can't look up the local editable "gallery" package on PyPI,
so skip it explicitly. Also bump the setuptools build requirement to
pull in recent security fixes.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-23 13:18:16 +02:00
lars f7294909a2 Fix Gitea Actions: drop custom job container, use setup-python
CI / lint:ruff (push) Successful in 1m49s
CI / format:ruff (push) Successful in 7s
CI / typecheck:ty (push) Successful in 10s
CI / vulnerabilities:pip-audit (push) Failing after 9s
CI / test:pytest (push) Has been skipped
The python:3.11-slim job container lacked a Node.js runtime, so the
runner couldn't exec actions/checkout inside it. Run jobs on the
default runner image instead and pin Python via actions/setup-python.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-23 13:13:17 +02:00
lars ea5ec680c5 Migrate CI from GitLab to Gitea Actions
CI / lint:ruff (push) Failing after 10s
CI / format:ruff (push) Failing after 2s
CI / typecheck:ty (push) Failing after 1s
CI / vulnerabilities:pip-audit (push) Failing after 1s
CI / test:pytest (push) Has been skipped
Replace .gitlab-ci.yml with .gitea/workflows/ci.yml, keeping the same
lint/format/typecheck/pip-audit/pytest jobs against python:3.11-slim,
and update docs that referenced the old GitLab pipeline file.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-23 13:05:25 +02:00
lars 3b9d1ef1a8 Rewrite CI to lint/typecheck/audit/test only; add HPC deployment path
- Replace the Docker build/publish CI stages with ruff (lint + format
  check), ty (type check), pip-audit, and pytest run directly against
  python:3.11-slim; Docker remains for manual/server deployment only.
- Swap black/pylint/mypy for ruff/ty across pyproject.toml, and fix
  every resulting lint, format, and type diagnostic in gallery/ and
  plotstyle/.
- Fix tests broken/stale from before the package restructuring: wrong
  `utils.*` import paths, mock patch targets pointed at the wrong
  module, and PDF-conversion tests still assuming ImageMagick instead
  of the current PyMuPDF-first path. Drop test_container.py (obsolete
  Docker-container smoke tests, fully superseded elsewhere).
- Add a plain-venv + systemd --user timer deployment path
  (deploy/systemd/) for HPC login nodes without a Docker daemon, where
  public_html is already served by existing infrastructure.
- Document both in CLAUDE.md, including running CI's checks locally
  before committing.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-22 15:29:55 +02:00
lars 4ba321b327 Document plotstyle and the Docker deployment switch in CLAUDE.md/README
Root-level docs hadn't caught up with the plotstyle package addition
(KIT styling toolkit, plotting extra, plotstyle/CLAUDE.md pointer) or
the earlier Singularity-to-Docker deployment switch.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-22 14:44:14 +02:00
lars eeb483a4fa Add ps.no_spines() for imshow/pcolormesh/2D-histogram plots
Image- and bin-indexed plots have no meaningful x baseline, so the
themed bottom spine kept by use() doesn't apply to them. Adds an
explicit opt-in to disable all spines on such Axes, documents it in
plotstyle/CLAUDE.md, and updates the showcase notebook's colormap and
multi-panel examples to use it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-22 14:43:41 +02:00
lars 36ae18e880 Add plotstyle: reusable KIT-branded matplotlib styling toolkit
Introduces a new plotstyle package providing consistent, presentation/thesis-ready
matplotlib figures: a KIT corporate-design color palette (categorical, sequential,
diverging, status), a theme applied via use() (KIT-black bottom spine only, left/bottom
ticks, horizontal gridlines, left-aligned titles, LaTeX text in Latin Modern Sans),
new_figure() with size presets and figure-level title/params subtitles, a
same-size colorbar() helper, style_legend() and panel_label() building blocks, and
savefig(). Ships as an optional "plotting" extra so core gallery installs stay
lightweight, with a full test suite and a runnable example notebook.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-22 14:19:30 +02:00
lars 8cae6533d5 Replace Singularity with Docker; add production deployment setup
- Remove Singularity.def; add Dockerfile (python:3.11-slim + ImageMagick,
  non-root user, installs gallery package with dev extras)
- Add .dockerignore to keep image lean
- Rewrite .gitlab-ci.yml: build→test→publish stages using Docker-in-Docker;
  push per-commit SHA tag and promote to :latest on main
- Add docker-compose.yml: gallery-generator + nginx services sharing a
  named volume; configurable GENERATE_INTERVAL env var
- Add deploy/nginx.conf: gzip, security headers, correct caching policy
  (immutable for assets, no-store for HTML)
- Add deploy/entrypoint.sh: runs gallery generate on startup then loops
  on GENERATE_INTERVAL; exits cleanly when interval is 0

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-29 11:48:04 +02:00
lars 8e3b928bb0 Merge main into dev: bring dev up to date with restructured package
Resolves add/add conflicts in .gitignore, config.yaml, pyproject.toml and
content conflict in README.md — taking main's version in all cases, as it
reflects the complete package rewrite (gallery/ package, TUI, CI pipeline).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-29 11:45:45 +02:00
Kylian Schmidt 82bc60e33b Update README.md to make it feel less AI generated (it was) 2026-05-20 11:20:19 +02:00
Kylian Schmidt 31d33f4f41 Update README 2026-05-16 15:08:08 +02:00
Kylian Schmidt 04e5f79efc Fix wrong gitlab link in README.md 2026-05-15 09:09:50 +02:00
Kylian Schmidt 3c399d5733 Add fallback if ImageMagick is not available 2026-05-15 09:07:48 +02:00
Kylian Schmidt 73916268a2 Improve layout for adding sources 2026-05-08 16:32:28 +02:00
Kylian Schmidt ace9646a25 Fix alignment of text 2026-05-08 16:03:52 +02:00
Kylian Schmidt 018398a97b feat: add quit button 2026-05-08 15:53:48 +02:00
Kylian Schmidt 19fc15abb4 feat: add Gallery TUI for interactive configuration and generation
- Implemented a terminal user interface (TUI) for configuring the gallery generator using Textual.
- Included functionality to manage sources with add/remove
- Integrated a log pane to display generation output from subprocess calls.
- Implemented save functionality to persist configuration changes.
2026-05-08 15:47:02 +02:00
Kylian Schmidt 17acd478d3 Add argcomplete support 2026-05-08 14:42:01 +02:00
Kylian Schmidt 63e4af0f9f Refactor: reorganize configuration management and add default config file 2026-05-08 14:05:40 +02:00
Kylian Schmidt 6978a1b768 Remove legacy generate_gallery.py script. Good night, sweet prince 2026-05-08 13:34:05 +02:00
Kylian Schmidt 25b564e085 move stats box to top right 2026-05-08 13:22:14 +02:00
Kylian Schmidt afd04324bc Unlink assets and put everything into the gallery folder 2026-05-08 13:05:39 +02:00
Kylian Schmidt 6738c4ca69 Refactor: Remove obsolete JavaScript managers and utilities
- Deleted NavigationManager, RecentPlotsManager, SearchManager, SortManager, StatsManager, ThemeManager, Utils, and ViewManager classes.
- Updated gallery builder to improve asset copying logic with a more efficient modification time check.
- Cleaned up gallery HTML template by removing subdirectory listing and embedding gallery data as JSON.
- Added CLAUDE.md for project documentation and guidelines.
2026-05-06 08:34:40 +02:00
Kylian Schmidt 6f0cf4521b Add support for incremental updates in gallery generation
- Introduced `source_to_update` parameter to selectively regenerate specific sources.
- Updated documentation to reflect new behavior for `clean_first` and `source_to_update`.
- Modified CLI and legacy CLI to handle source overrides appropriately.
2026-04-23 13:09:26 +02:00
Kylian Schmidt a30149e5da Fix template argument order in build_gallery calls 2026-04-23 12:56:59 +02:00
Kylian Schmidt e044b4ce60 Fix old DEBUG statement 2026-04-22 15:10:26 +02:00
Kylian Schmidt bec86d0f07 Fix tests 2026-04-22 14:42:25 +02:00
Kylian Schmidt 27ea17246c Convert to proper python package 2026-04-22 13:48:23 +02:00
Kylian Schmidt 7e36688d1d Add override for new directory from the CLI 2026-04-22 13:16:08 +02:00
Kylian Schmidt 45214be41e move processing to dedicated file 2026-04-22 13:08:47 +02:00
Kylian Schmidt a8f2166dde Add support for html plots 2025-09-26 12:59:49 +02:00
Kylian Schmidt 041c761df0 Fix missing top-level tree index.html. Clean up duplicates in main script 2025-09-26 08:53:37 +02:00
Kylian Schmidt 425685874a Fix tests 2025-09-09 14:32:52 +02:00
Kylian Schmidt 4352d26a7b Add even more tests 2025-09-09 14:00:37 +02:00
Kylian Schmidt ded4eca0bf Add LICENSE 2025-09-09 13:44:56 +02:00
Kylian Schmidt 947b525490 Add coverage to README 2025-09-09 13:42:21 +02:00
Kylian Schmidt 375fe36902 Fix pipeline attempt (6): Backup 2025-09-08 15:59:43 +02:00
Kylian Schmidt 620db78ee7 Fix pipeline attempt (5): Fix naming in tests 2025-09-08 15:56:37 +02:00
Kylian Schmidt 412f5927fb Fix pipeline attempt (4): Add new apptainer gitlab runner 2025-09-08 15:49:09 +02:00
Kylian Schmidt 30389ccb92 Fix pipeline attempt (3): Fakeroot but with the correct docker image 2025-09-08 15:12:30 +02:00
Kylian Schmidt d9c5629127 Fix pipeline attempt (2): Fakeroot 2025-09-08 15:06:45 +02:00
Kylian Schmidt fe5a7e6815 Fix pipeline attempt (1) 2025-09-08 14:52:21 +02:00
Kylian Schmidt 802fee1337 Add pytest and gitlab-ci for container 2025-09-08 14:47:38 +02:00
Kylian Schmidt 9e59d06796 Clean up unittest attempt. 2025-09-08 12:53:16 +02:00