Package nz.org.riskscape.cpython
Class CPythonPostProcessingScriptRunner
java.lang.Object
nz.org.riskscape.cpython.CPythonPostProcessingScriptRunner
- All Implemented Interfaces:
nz.org.riskscape.engine.model.PostProcessingScriptRunner,nz.org.riskscape.engine.plugin.PluginFeature
public class CPythonPostProcessingScriptRunner
extends Object
implements nz.org.riskscape.engine.model.PostProcessingScriptRunner
Runs an optional Python script after a model run completes.
The script is called with a struct containing: - model_name: the name of the model - outputs: a list of {name, path} structs for each pipeline output - parameters: a list of {name, value} structs for each realization parameter
The script can register additional outputs via model_output().
-
Constructor Summary
ConstructorsConstructorDescriptionCPythonPostProcessingScriptRunner(nz.org.riskscape.engine.Engine engine, CPythonSpawner spawner) -
Method Summary
Modifier and TypeMethodDescriptionnz.org.riskscape.engine.model.PostProcessingScriptbuildMetadata(String modelName, String parameters) Builds the metadata map for a model run.booleanisSupported(URI scriptUri)
-
Constructor Details
-
CPythonPostProcessingScriptRunner
public CPythonPostProcessingScriptRunner(nz.org.riskscape.engine.Engine engine, CPythonSpawner spawner)
-
-
Method Details
-
buildMetadata
Builds the metadata map for a model run.
- Parameters:
modelName- the name of the model that ranparameters- the model parameters used for the run, formatted as a string
-
isSupported
- Specified by:
isSupportedin interfacenz.org.riskscape.engine.model.PostProcessingScriptRunner
-
build
- Specified by:
buildin interfacenz.org.riskscape.engine.model.PostProcessingScriptRunner
-