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>
This commit is contained in:
@@ -5,8 +5,8 @@ from __future__ import annotations
|
||||
from pathlib import Path
|
||||
from typing import Mapping, Sequence, Union
|
||||
|
||||
import numpy as np
|
||||
import matplotlib.pyplot as plt
|
||||
import numpy as np
|
||||
from matplotlib.axes import Axes
|
||||
from matplotlib.colorbar import Colorbar
|
||||
from matplotlib.figure import Figure
|
||||
@@ -53,8 +53,8 @@ def _set_figure_title(fig: Figure, title: Union[str, None], params: Union[Mappin
|
||||
def new_figure(
|
||||
preset: Union[str, tuple] = "thesis-single",
|
||||
*,
|
||||
title: str = None,
|
||||
params: Mapping = None,
|
||||
title: Union[str, None] = None,
|
||||
params: Union[Mapping, None] = None,
|
||||
**subplots_kwargs,
|
||||
):
|
||||
"""Create a figure/axes pair sized for a named preset or an explicit (w, h) tuple.
|
||||
@@ -113,7 +113,9 @@ def colorbar(mappable, ax: Axes, size: str = "5%", pad: float = 0.05, **kwargs)
|
||||
"""
|
||||
divider = make_axes_locatable(ax)
|
||||
cax = divider.append_axes("right", size=size, pad=pad)
|
||||
cb = ax.get_figure().colorbar(mappable, cax=cax, **kwargs)
|
||||
fig = ax.get_figure()
|
||||
assert fig is not None, "ax must be attached to a figure"
|
||||
cb = fig.colorbar(mappable, cax=cax, **kwargs)
|
||||
# Colorbar draws its own border (a dedicated "outline" spine) that isn't
|
||||
# covered by axes.spines.{left,right,top} — without this it'd pick up
|
||||
# the bold black bottom-spine color/width from the main theme as a box
|
||||
|
||||
Reference in New Issue
Block a user