bencher.plugins.plugin
Classes
Stable public contract for plot plugins. |
|
Concrete plugin synthesised by the @plot_plugin decorator. Class form is canonical |
Functions
|
Wrap a function as a plot plugin and (by default) register it with the global |
Module Contents
- class bencher.plugins.plugin.PlotPlugin
Bases:
ProtocolStable public contract for plot plugins.
A plugin renders a BenchData handle into a Panel-embeddable view. The plugin owns internal composition (linked hv.Layout, plotly.subplots, full Rerun blueprints, …); bencher only does outer Panel-level composition over plugin outputs.
- name: str
- backend: str
- priority: int
- requires: frozenset[str]
- render(data: bencher.plugins.bench_data.BenchData) panel.viewable.Viewable
- class bencher.plugins.plugin._FunctionPlugin
Concrete plugin synthesised by the @plot_plugin decorator. Class form is canonical for distributed plugins; this exists so a one-shot in-script plugin can be a single decorated function.
- name: str
- backend: str
- priority: int
- requires: frozenset[str]
- _fn: Callable[[bencher.plugins.bench_data.BenchData], panel.viewable.Viewable]
- render(data: bencher.plugins.bench_data.BenchData) panel.viewable.Viewable
- bencher.plugins.plugin.plot_plugin(*, name: str, backend: str = 'user', match: bencher.plotting.plot_filter.PlotFilter | None = None, priority: int = 0, requires: frozenset[str] | set[str] | tuple[str, Ellipsis] | None = None, register: bool = True) Callable[[Callable[[bencher.plugins.bench_data.BenchData], panel.viewable.Viewable]], _FunctionPlugin]
Wrap a function as a plot plugin and (by default) register it with the global registry. Returns the plugin object so callers can also register manually with register=False.