gemseo / post / dataset

factory module

Dataset plot factory

The module factory contains the DatasetPlotFactory class which is a factory to instantiate a DatasetPlot from its class name. The class can be internal to GEMSEO or located in an external module whose path is provided to the constructor. It also provides a list of available cache types and allows you to test if a cache type is available.

class gemseo.post.dataset.factory.DatasetPlotFactory[source]

Bases: object

This factory instantiates a DatasetPlot from its class name. The class can be internal to GEMSEO or located in an external module whose path is provided to the constructor.

Initializes the factory: scans the directories to search for subclasses of DatasetPlot. Searches in “GEMSEO_PATH” and gemseo.mlearning.p_datasets

create(plot_name, **options)[source]

Create a plot for dataset

Parameters
  • plot_name (str) – name of the plot for dataset (its classname)

  • options – additional options specific

Returns

dataset plot

is_available(plot_name)[source]

Checks the availability of a plot for dataset.

Parameters

plot_name (str) – name of the plot for dataset (its class name).

Returns

True if the plot for dataset is available.

Return type

bool

property plots

Lists the available plots for datasets.

Returns

the list of plots for datasets.

Return type

list(str)