Publishing
A plugin is an ordinary Python distribution, so it goes to PyPI like any other:
uv build
uv publishFill in the metadata first, or the PyPI page is empty.
Names and dependencies
Name the distribution laplacekit-<name> and the import package laplacekit_<name>, where <name> is usually the library the plugin wraps. For example, laplacekit-transformers wraps transformers. The dependency on laplacekit should match the record’s supports, so that pip refuses an install the plugin can’t handle:
[project]
name = "laplacekit-mylib"
dependencies = ["laplacekit>=1.0,<2", "mylib>=2.1"]
[tool.pyright]
typeCheckingMode = "standard"The [tool.pyright] table turns on type checking in VS Code (Pylance). Then a class that misses a protocol method is marked in red for everyone who opens the project. Protocols in one page shows what it catches.
Pin the wrapped library as tightly as the plugin needs. laplacekit itself pins curvlinops-for-pytorch==3.0.1, since its KFAC adapter reads private attributes of that version.
The metadata
There is no readme or license-files in the template’s pyproject.toml, and its authors and LICENSE name the template’s author. Built as it is, the package gets an empty PyPI page, and there is no license file in the wheel. Add your own:
[project]
name = "laplacekit-mylib"
description = "What it adds, in one sentence"
readme = "README.md"
authors = [{ name = "Your Name", email = "[email protected]" }]
license = "MIT"
license-files = ["LICENSE"]readme becomes the PyPI page, so write the README.md for users: what the plugin adds and the smallest code that uses it. license is an SPDX expression, and license-files puts the license text into the wheel. Put your name and the year in LICENSE, or replace it with the text of the license you chose.
Getting listed
The plugin list shows the plugins we know of. To add yours, open a pull request on the repository that adds one entry to docs/plugins/list.yml:
- title: laplacekit-mylib
description: What it adds, in one sentence.
categories: [Curvature]
kind: third-party
use: |
import laplacekit as lk
from laplacekit_mylib import MyCurvature
post = lk.laplace(model, train_loader, likelihood=lk.Categorical(), hessian_approx=MyCurvature())
guide: https://mylib.readthedocs.io/laplace
source: https://github.com/me/laplacekit-mylib
paper:
text: Me et al., 2026
url: https://arxiv.org/abs/...categories takes one kind from the table in the Overview. use is the smallest code that uses the plugin. paper is optional. The list builds the install commands from title.