Skip to content
Snippets Groups Projects
Commit a53f0ff7 authored by Stefano Borini's avatar Stefano Borini
Browse files

Added some documentation in the BaseExtensionPlugin

parent efe05953
No related branches found
No related tags found
1 merge request!23Introduces base class for plugins to simplify export
...@@ -8,17 +8,33 @@ from force_bdss.mco.i_multi_criteria_optimizer_bundle import \ ...@@ -8,17 +8,33 @@ from force_bdss.mco.i_multi_criteria_optimizer_bundle import \
class BaseExtensionPlugin(Plugin): class BaseExtensionPlugin(Plugin):
"""Base class for extension plugins, that is, plugins that are
provided by external contributors.
It provides a set of slots to be populated that end up contributing
to the application extension points. To use the class, simply inherit it
in your plugin, and then define the trait default initializer for the
specific trait you want to populate. For example::
class MyPlugin(BaseExtensionPlugin):
def _data_source_bundles(self):
return [MyDataSourceBundle1(),
MyDataSourceBundle2()]
"""
#: A list of available Multi Criteria Optimizers this plugin exports.
mco_bundles = List( mco_bundles = List(
IMultiCriteriaOptimizerBundle, IMultiCriteriaOptimizerBundle,
contributes_to='force.bdss.mco.bundles' contributes_to='force.bdss.mco.bundles'
) )
#: A list of the available Data Sources. #: A list of the available Data Sources this plugin exports.
#: It will be populated by plugins.
data_source_bundles = List( data_source_bundles = List(
IDataSourceBundle, IDataSourceBundle,
contributes_to='force.bdss.data_sources.bundles') contributes_to='force.bdss.data_sources.bundles'
)
#: A list of the available KPI calculators this plugin exports.
kpi_calculator_bundles = List( kpi_calculator_bundles = List(
IKPICalculatorBundle, IKPICalculatorBundle,
contributes_to='force.bdss.kpi_calculators.bundles' contributes_to='force.bdss.kpi_calculators.bundles'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment