simphony / simphony-mayavi

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

Clean-up: Reuse the _select_attributes function in CUDSSource #169

Closed kitchoi closed 8 years ago

kitchoi commented 8 years ago

Summary, with this, the only code block that assignspoint_scalars_name... is in CUDSSource._select_attributes. The related docstring is only duplicated twice, once in CUDSSource.__init__, and once in EngineSource.__init__

kitchoi commented 8 years ago

I think this is the best I could do... I was thinking of this: since only EngineManagerStadnalone uses AddEngineSourceToMayavi so perhaps I should move it there straight away. However then I think it is nice to have each panel of the GUI having an isolated non-GUI class that does the same thing and reuse the functions. Reusability was the motivation for having EngineManagerStandalone (vs EngineManagerStandaloneUI), AddEngineSourceToMayavi (vs AddSourcePanel) and RunAndAnimate (vs RunAndAnimate)