simphony / simphony-mayavi

The mayavi adapters to the simphony framework
BSD 2-Clause "Simplified" License
0 stars 1 forks source link

Mayavi Source for Simphony Engine #109

Closed kitchoi closed 8 years ago

kitchoi commented 8 years ago

I added a EngineSource (similar to CUDSFileSource) for handling datasets from a simphony modeling engine. Then I added a EngineSourceManager for visualisation and basic operations of the engine. The screenshot below is the EngineSourceManager in action. (I actually used it on an engine from simphony-lammps) engine_source_manager

@dpinte, @itziakos, the new feature is currently available in the branch add-engine-source. I still need to add more tests and documentation before I can make a PR. At the moment I would like to solicit feedbacks.

If you could check out the branch, there is a dummy engine so you can experiment with the following:

>>> from simphony_mayavi.sources.tests import testing_utils
>>> engine = testing_utils.DummyEngine()
>>> from simphony_mayavi.plugins.api import EngineSourceManager
>>> manager = EngineSourceManager(engine)
>>> manager.show_config()   # show the UI

If you dig into the code you will find some in-function imports. That's because I intend to make it available as a plugin in Mayavi (ref)

Please let me know if you have any comments/suggestions.

kitchoi commented 8 years ago

I have updated the GUI. To test it, check out the add-engine-source branch and try this:

from simphony_mayavi.plugins.api import EngineManagerStandaloneUI
from simphony_mayavi.sources.tests import testing_utils
engine = testing_utils.DummyEngine()
manager = EngineManagerStandaloneUI("test", engine)
manager.show_config()

action1-new action2-new

kitchoi commented 8 years ago

I have added a mayavi2 plugin so that a panel view can be added in Mayavi2 and the user can add engine via the python shell in Mayavi. However, this plugin requires envisage to be included in the setup requirement. mayavi2-plugin

kitchoi commented 8 years ago

merged #110