From a53f0ff7d47bef5546aaac2959a9f28e3cc9caaa Mon Sep 17 00:00:00 2001 From: Stefano Borini <sborini@enthought.com> Date: Wed, 19 Jul 2017 14:48:15 +0100 Subject: [PATCH] Added some documentation in the BaseExtensionPlugin --- force_bdss/base_extension_plugin.py | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/force_bdss/base_extension_plugin.py b/force_bdss/base_extension_plugin.py index 28c543d..3627b13 100644 --- a/force_bdss/base_extension_plugin.py +++ b/force_bdss/base_extension_plugin.py @@ -8,17 +8,33 @@ from force_bdss.mco.i_multi_criteria_optimizer_bundle import \ 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( IMultiCriteriaOptimizerBundle, contributes_to='force.bdss.mco.bundles' ) - #: A list of the available Data Sources. - #: It will be populated by plugins. + #: A list of the available Data Sources this plugin exports. data_source_bundles = List( 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( IKPICalculatorBundle, contributes_to='force.bdss.kpi_calculators.bundles' -- GitLab