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

Silenced warnings for IDs not specified by specifying them

parent e64702ea
No related branches found
No related tags found
1 merge request!53Silenced warnings for IDs not specified by specifying them
from .base_extension_plugin import BaseExtensionPlugin # noqa from .base_extension_plugin import BaseExtensionPlugin # noqa
from .ids import bundle_id # noqa from .ids import bundle_id, plugin_id # noqa
from .data_sources.base_data_source_model import BaseDataSourceModel # noqa from .data_sources.base_data_source_model import BaseDataSourceModel # noqa
from .data_sources.data_source_result import DataSourceResult # noqa from .data_sources.data_source_result import DataSourceResult # noqa
......
...@@ -3,17 +3,21 @@ from __future__ import print_function ...@@ -3,17 +3,21 @@ from __future__ import print_function
import sys import sys
from traits.api import on_trait_change from traits.api import on_trait_change
from .ids import plugin_id
from .base_core_driver import BaseCoreDriver from .base_core_driver import BaseCoreDriver
from .io.workflow_reader import ( from .io.workflow_reader import (
InvalidVersionException, InvalidVersionException,
InvalidFileException InvalidFileException
) )
CORE_EVALUATION_DRIVER_ID = plugin_id("core", "CoreEvaluationDriver")
class CoreEvaluationDriver(BaseCoreDriver): class CoreEvaluationDriver(BaseCoreDriver):
"""Main plugin that handles the execution of the MCO """Main plugin that handles the execution of the MCO
or the evaluation. or the evaluation.
""" """
id = CORE_EVALUATION_DRIVER_ID
@on_trait_change("application:started") @on_trait_change("application:started")
def application_started(self): def application_started(self):
......
...@@ -4,17 +4,21 @@ import sys ...@@ -4,17 +4,21 @@ import sys
from traits.api import on_trait_change from traits.api import on_trait_change
from .ids import plugin_id
from .base_core_driver import BaseCoreDriver from .base_core_driver import BaseCoreDriver
from .io.workflow_reader import ( from .io.workflow_reader import (
InvalidVersionException, InvalidVersionException,
InvalidFileException InvalidFileException
) )
CORE_MCO_DRIVER_ID = plugin_id("core", "CoreMCODriver")
class CoreMCODriver(BaseCoreDriver): class CoreMCODriver(BaseCoreDriver):
"""Main plugin that handles the execution of the MCO """Main plugin that handles the execution of the MCO
or the evaluation. or the evaluation.
""" """
id = CORE_MCO_DRIVER_ID
@on_trait_change("application:started") @on_trait_change("application:started")
def application_started(self): def application_started(self):
......
from force_bdss.api import BaseExtensionPlugin from force_bdss.api import BaseExtensionPlugin, plugin_id
from .csv_extractor.csv_extractor_bundle import CSVExtractorBundle from .csv_extractor.csv_extractor_bundle import CSVExtractorBundle
from .kpi_adder.kpi_adder_bundle import KPIAdderBundle from .kpi_adder.kpi_adder_bundle import KPIAdderBundle
from .dummy_dakota.dakota_bundle import DummyDakotaBundle from .dummy_dakota.dakota_bundle import DummyDakotaBundle
...@@ -9,6 +9,8 @@ from .dummy_kpi_calculator.dummy_kpi_calculator_bundle import ( ...@@ -9,6 +9,8 @@ from .dummy_kpi_calculator.dummy_kpi_calculator_bundle import (
class DummyPlugin(BaseExtensionPlugin): class DummyPlugin(BaseExtensionPlugin):
id = plugin_id("enthought", "DummyPlugin")
def _data_source_bundles_default(self): def _data_source_bundles_default(self):
return [DummyDataSourceBundle(), return [DummyDataSourceBundle(),
CSVExtractorBundle()] CSVExtractorBundle()]
......
...@@ -36,6 +36,10 @@ def mco_parameter_id(producer, identifier): ...@@ -36,6 +36,10 @@ def mco_parameter_id(producer, identifier):
return _string_id("mco_parameter", producer, identifier) return _string_id("mco_parameter", producer, identifier)
def plugin_id(producer, identifier):
return _string_id("plugin", producer, identifier)
def _string_id(entity_namespace, producer, identifier): def _string_id(entity_namespace, producer, identifier):
"""Creates an id for a generic entity. """Creates an id for a generic entity.
......
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