How to generate an execution plugin

From EdnaWiki
Jump to: navigation, search

EDNA Plug-in Generator

The EDNA Plug-in Generator is designed to automatically generate the basic Python code for the program plug-in based on the description in the XML Schema. It will also generate test scripts and various other useful bits and pieces such as getters and setters for the variables.

The first step is to set-up the environment variables:

  edna_home, e.g. /dls_sw/software/edna/
  edna_site, e.g. DLS


The second step is to create .xsd files defining the data input and output used by the plugin. This can be achieved using the GenerateDS script.


The last step is to run the PluginGenerator.py script. Its default location is /$edna_home/kernel/bin/PluginGenerator.py an example of how it is run is given below.

   PluginGenerator.py –n XSDataMTZDump –b Exec -v 1.0 –p CCP4 –a 'mark' -i XSDataInputMTZDUMPUnitCellSpaceGroup -r   
   XSDataResultMTZDUMPUnitCellSpaceGroup -c DLS –x /project/datamodel/mtz.xsd


-n defines the name of the plugin to generate.

-b defines the type of the plugin e.g. Executable. By default, it will create a control plugin.

-v defines the current version of the plugin

-p is the name of the main project

-a defines the author of the plugin.

-i the name of the input object defined by the xsd file set using the -x option

-r the name of the result object defined in the xsd file set using the -x option

-c defines copyright information

-x defines the path to the datamodel xsd file.


Help can by accessed by using the --help option.

The resulting structure contains the following folders:

  • datamodel
  • plugins
  • tests


An exec plugin is a plugin that runs a specific task or a sequence of tasks.

A control plugin will link several exec plugins together to form a flow of execution.