Open ericfranz opened 6 years ago
In the desktop case, the before, the script, and the after could be handled together like this:
export_module_function
(
launch_xfce4_desktop
) &
SCRIPT_PID=$!
# after function calls
We could also put many of the functions in the library under test: https://github.com/sstephenson/bats
There would still be a need for "interactive app plugins" to provide their own library of functions (setting up R or Jupyter, for example).
But with this approach, instead of using the plugin files as values to insert into a template that ood_core owns, the reversal could occur: the plugin files would contain the full script, and it would just be calling functions from the bash library that ood_core provides. We could still have the plugin be a template, so passing in configuration as necessary.
This type of exploration requires inlining multiple interactive app plugin code with the ood_core batch connect library code so that its all together. Some thought is required for this.
By creating a large library of small well named bash functions that every interactive app has access to, we can do many things:
Examples of what could be changed into functions is looking at the bc_desktop iHPC app:
A similar thing may be possible with https://github.com/OSC/ood_core/blob/d21a1d62a41b1a3e6d05a28cfe1100bb931597f9/lib/ood_core/batch_connect/template.rb and https://github.com/OSC/ood_core/blob/d21a1d62a41b1a3e6d05a28cfe1100bb931597f9/lib/ood_core/batch_connect/templates/vnc.rb
┆Issue is synchronized with this Asana task by Unito