vuecore.engines.registry module

vuecore.engines.registry module#

vuecore.engines.registry.get_builder(plot_type: PlotType, engine: EngineType) Callable[source]#

Retrieves a plot builder function from the registry.

Looks up the plotting function based on the specified plot type and engine.

Parameters:
  • plot_type (PlotType) – The type of plot to retrieve.

  • engine (EngineType) – The engine used to render the plot.

Returns:

The registered plotting function.

Return type:

Callable

Raises:

ValueError – If no function is found for the given plot type and engine.

vuecore.engines.registry.get_saver(engine: EngineType) Callable[source]#

Retrieves a save function from the registry.

Returns the function used to save plots for the specified engine.

Parameters:

engine (EngineType) – The engine for which the saving function should be retrieved.

Returns:

The registered saving function.

Return type:

Callable

Raises:

ValueError – If no saver function is registered for the given engine.

vuecore.engines.registry.register_builder(plot_type: PlotType, engine: EngineType, func: Callable)[source]#

Registers a plot builder function for a given plot type and engine.

This allows dynamic dispatch of plotting functions depending on the desired plot type (e.g., scatter, histogram) and backend engine (e.g., Plotly, Matplotlib).

Parameters:
  • plot_type (PlotType) – The type of plot (e.g., SCATTER).

  • engine (EngineType) – The rendering engine (e.g., PLOTLY).

  • func (Callable) – The plotting function to register for this type and engine.

Return type:

None

vuecore.engines.registry.register_saver(engine: EngineType, func: Callable)[source]#

Registers a save function for a given engine.

This allows saving plots using engine-specific logic (e.g., Plotly’s write_image, Matplotlib’s savefig, etc.).

Parameters:
  • engine (EngineType) – The rendering engine for which to register the saver function.

  • func (Callable) – The saving function to use for this engine.

Return type:

None