Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
force-bdss
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Adham Hashibon
force-bdss
Commits
a53f0ff7
Commit
a53f0ff7
authored
7 years ago
by
Stefano Borini
Browse files
Options
Downloads
Patches
Plain Diff
Added some documentation in the BaseExtensionPlugin
parent
efe05953
No related branches found
No related tags found
1 merge request
!23
Introduces base class for plugins to simplify export
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
force_bdss/base_extension_plugin.py
+19
-3
19 additions, 3 deletions
force_bdss/base_extension_plugin.py
with
19 additions
and
3 deletions
force_bdss/base_extension_plugin.py
+
19
−
3
View file @
a53f0ff7
...
@@ -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
'
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment