<commit_before>from mayavi import mlab
from traitsui.api import View, VGroup, Group, Item
from traits.api import HasTraits, Instance

from simphony_mayavi.plugins.engine_manager import EngineManager
from simphony_mayavi.plugins.add_source_panel import AddSourcePanel
from simphony_mayavi.plugins.run_and_animate_panel import RunAndAnimatePanel
from simphony_mayavi.plugins.tabbed_panel_collection import (
    TabbedPanelCollection)


class EngineManagerStandaloneUI(EngineManager):
    ''' Standalone GUI for visualising datasets from a Simphony Modeling
    Engine, running the engine and animating the results

    '''

    panels = Instance(TabbedPanelCollection)

    traits_view = View(
        VGroup(
            Group(Item("engine_name", label="Engine Wrapper")),
            Group(Item("panels", style="custom", show_label=False))),
        title="Engine Manager")

    def __init__(self, engine_name="", engine=None, mayavi_engine=None,
                 **metadata):
        '''<commit_msg>engine_name and engine are required in engine_manager_standalone_ui<commit_after>from mayavi import mlab
from traitsui.api import View, VGroup, Group, Item
from traits.api import HasTraits, Instance

from simphony_mayavi.plugins.engine_manager import EngineManager
from simphony_mayavi.plugins.add_source_panel import AddSourcePanel
from simphony_mayavi.plugins.run_and_animate_panel import RunAndAnimatePanel
from simphony_mayavi.plugins.tabbed_panel_collection import (
    TabbedPanelCollection)


class EngineManagerStandaloneUI(EngineManager):
    ''' Standalone GUI for visualising datasets from a Simphony Modeling
    Engine, running the engine and animating the results

    '''

    panels = Instance(TabbedPanelCollection)

    traits_view = View(
        VGroup(
            Group(Item("engine_name", label="Engine Wrapper")),
            Group(Item("panels", style="custom", show_label=False))),
        title="Engine Manager")

    def __init__(self, engine_name, engine, mayavi_engine=None,
                 **metadata):
        '''
{'fraction_non_alphanumeric': 0.0771484375, 'fraction_numerical': 0.0, 'mean_word_length': 4.43501326259947, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5897095', 'n_tokens_mistral': 561, 'n_tokens_neox': 554, 'n_words': 146}