Skip to content

Plugins

Paul Talbot edited this page Jan 30, 2018 · 24 revisions

RAVEN Plugins

Plugins in RAVEN are an option to associate a workflow or set of RAVEN external models to RAVEN without having them included in the RAVEN repository. Benefits include modularity, access restriction, and regression testing for compatibility with RAVEN as it continues to grow.

Table of Contents

  1. Introduction
  2. Official Plugins
  3. Creating a New Plugin
  4. Plugin Testing

Introduction

RAVEN users commonly develop sophisticated workflows with complex physics models while doing their analyses. While RAVEN doesn't provide storage for workflows and physics, these can be associated to RAVEN by the use of plugins. Official plugins are supported through RAVEN regression testing.

Official Plugins

The following plugin repositories are officially supported by RAVEN.

Creating a New Plugin

This section provides an outline on creating a new RAVEN plugin. For more information, see the RAVEN user manual.

Getting Started

Creating a plugin requires no changes to the RAVEN repository itself. Instead, a plugin is created and located in RAVEN under raven/plugins.

The structure for a plugin includes a README.md file as well as three directories. The README is for any explanation of process or performance for your plugin. The three directories to include are doc, where LaTeX documentation can be included; src, where the plugin objects reside; and tests, where RAVEN's automated regression system can find regression tests for the plugin.

External models are added to a plugin by creating class modules and object definitions in the plugin folder. For more details on the methods RAVEN uses to interface with your external models, see the user manual description of adding external model plugins.

Registration and Installation

To register the plugin with RAVEN and make its components accessible, run the script

  raven/scripts/install_plugins.py -s /abs/path/to/myPlugin -f

replacing myPlugin with the path to your plugin and the name of the directory, such as /user/projects/raven/plugins/myNewPlugin. Use the absolute path to your new plugin to avoid any navigation problems. It might not be necessary to include the -f flag, but in general this assures installation overwrites any previous files in the plugin install directory.

At this stage, RAVEN will import all the plugins within that directory and perform some error checking.

Using the plugin in RAVEN

Once registered, new external models can be used in RAVEN by using the model subtype defined by your plugin name. For example, if your external model class is named "myPluginModel", you can access an external model in the RAVEN input as

<Models>
  ...
  <ExternalModel name='myName' subType='myPluginModel'>
    ...
  </ExternalModel>
  ...
</Models>

Plugin Testing

RAVEN supports some official plugins on a case-by-case basis for regression testing nightly against new RAVEN developments. If you are interested in maintaining your plugin as an official RAVEN plugin, please contact us.