bencher.plugins.plugin ====================== .. py:module:: bencher.plugins.plugin Classes ------- .. autoapisummary:: bencher.plugins.plugin.PlotPlugin bencher.plugins.plugin._FunctionPlugin Functions --------- .. autoapisummary:: bencher.plugins.plugin.plot_plugin Module Contents --------------- .. py:class:: PlotPlugin Bases: :py:obj:`Protocol` Stable 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. .. py:attribute:: name :type: str .. py:attribute:: backend :type: str .. py:attribute:: match :type: bencher.plotting.plot_filter.PlotFilter .. py:attribute:: priority :type: int .. py:attribute:: requires :type: frozenset[str] .. py:method:: render(data: bencher.plugins.bench_data.BenchData) -> panel.viewable.Viewable .. py:class:: _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. .. py:attribute:: name :type: str .. py:attribute:: backend :type: str .. py:attribute:: match :type: bencher.plotting.plot_filter.PlotFilter .. py:attribute:: priority :type: int .. py:attribute:: requires :type: frozenset[str] .. py:attribute:: _fn :type: Callable[[bencher.plugins.bench_data.BenchData], panel.viewable.Viewable] .. py:method:: render(data: bencher.plugins.bench_data.BenchData) -> panel.viewable.Viewable .. py:function:: plot_plugin(*, name: str, backend: str = 'user', match: Optional[bencher.plotting.plot_filter.PlotFilter] = None, priority: int = 0, requires: Optional[frozenset[str] | set[str] | tuple[str, Ellipsis]] = 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.