New Experiment Results Processing Plugin (--proc)#

For the purposes of this tutorial, I will assume you are creating a new Plugin archive for processing Raw Output Data files to create some kind of unique archival format. Before we begin, see Stage 3 Dataflow to get a brief overview of how data flows through the pipeline w.r.t. stage 3, and Plugin Development Guide for a general overview of creating a new plugin.

To begin, create the following filesystem structure in $HOME/git/plugins/infinite.

  • plugin.py - This file is required, and is where most of the bits for the

    plugin will go. You don't have to call it this; if you want to use a different name, see Schemas for options.

  • cmdline.py This file is optional. If your new plugin doesn't need any additional cmdline arguments, you can skip it.

These files will be populated as you go through the rest of the tutorial.

  1. Create additional cmdline arguments for the new engine by following Extending the SIERRA Cmdline For Your Plugin.

  2. Create the following filesystem structure in $HOME/git/plugins/archive:

    Within this file, you must define the following functions, which must be named EXACTLY as specified, otherwise SIERRA will not detect them.

    from sierra.core import types, batchroot
    import sierra.core.variables.batch_criteria as bc
    
    def proc_batch_exp(
        main_config: types.YAMLDict,
        cmdopts: types.Cmdopts,
        pathset: batchroot.PathSet,
        criteria: bc.XVarBatchCriteria,
    ) -> None:
        """Process the results for all experiments in the batch experiment.
    
        Can be serially or in parallel. Processing should respect
        ``--processing-parallelism`` and ``--exp-range``.
        """
    
  3. Put $HOME/git/plugins on your SIERRA_PLUGIN_PATH. Then your plugin can be selected as --proc=plugins.archive.