sci-bots / microdrop

Microdrop is a graphical user interface for an automated Digital Microfluidics control system.
BSD 3-Clause "New" or "Revised" License
24 stars 12 forks source link

New hook for launching v2.0 plugins #197

Open ryanfobel opened 7 years ago

ryanfobel commented 7 years ago

MicroDrop v1.0-style plugins based on PyUtilib are launched by importing the plugin's root directory. The proposed v2.0 plugin framework aims to be language agnostic, and therefore we need a new method for launching plugins. One option could be to use a hook script -- e.g., on_plugin_start.bat (Windows) or on_plugin_start.sh (Linux/Mac OS) -- similar to the on_plugin_install scripts already in use.

If we do decide to go this route, we will also need to figure out what (if any) arguments should be passed to this script. For Python-based plugins, we somehow need to pass the path to the Python executable and we would probably need something similar for other interpreted languages. One option would be to store these paths in some kind of "environment definition" file that could be accessed via the hook scripts, e.g.:

python_path = x
node_js_path = y
java_path = z
cfobel commented 7 years ago

We could adopt the same approach as used in Conda build. Conda build uses environment variables to pass context to the build script (i.e., bld.bat).