Class BaseModelRunCommand
java.lang.Object
nz.org.riskscape.engine.cli.ApplicationCommand
nz.org.riskscape.engine.cli.model.BaseModelRunCommand
- All Implemented Interfaces:
AutoCloseable,nz.org.riskscape.engine.cli.ChildCommand,nz.org.riskscape.engine.cli.EngineCommand,nz.org.riskscape.engine.cli.PipelineRenderer,nz.org.riskscape.engine.cli.TerminalCommand
- Direct Known Subclasses:
BatchCommand,RunCommand
public abstract class BaseModelRunCommand
extends nz.org.riskscape.engine.cli.ApplicationCommand
implements nz.org.riskscape.engine.cli.PipelineRenderer
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescription -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected LocalDateTimeprotected nz.org.riskscape.engine.pipeline.RealizedPipelinerealize(nz.org.riskscape.engine.model.Model model, nz.org.riskscape.engine.pipeline.ExecutionContext executionContext) protected nz.org.riskscape.engine.pipeline.RealizedPipelinerealize(nz.org.riskscape.engine.model.Model model, nz.org.riskscape.engine.pipeline.ExecutionContext executionContext, boolean allowFailures) protected nz.org.riskscape.engine.model.ModelupdateParameters(nz.org.riskscape.engine.model.Model model, Map<String, List<String>> cliParameters) protected voidwarnIfCannotOverrideFormat(nz.org.riskscape.engine.pipeline.RealizedPipeline pipeline, nz.org.riskscape.problem.ProblemSink problemSink) Prints a warning to the terminal if the given pipeline looks to have an explicit format set for various steps that disagree with the --format option the user has specified.Methods inherited from class nz.org.riskscape.engine.cli.ApplicationCommand
asPropertyWithProblems, bindOutput, combineKeyValuesForDisplay, displayWithProblems, doCommand, formatFailedObjectErrorsForTable, formatProblemsForTableText, getDetailedHelp, getEngine, getMessages, getObject, getProject, getTerminal, paramString, parseJsonArguments, parseJsonArguments, resourceFrom, run, setEngine, setMessages, setProject, setTerminalMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface nz.org.riskscape.engine.cli.EngineCommand
closeMethods inherited from interface nz.org.riskscape.engine.cli.PipelineRenderer
boundPipelineParameterToString, graph, printPipeline, printPipeline, printTypeMethods inherited from interface nz.org.riskscape.engine.cli.TerminalCommand
print, printerr, stderr, stdin, stdout
-
Field Details
-
modelId
-
runnerOptions
-
parametersFile
-
parameters
-
-
Constructor Details
-
BaseModelRunCommand
public BaseModelRunCommand()
-
-
Method Details
-
warnIfCannotOverrideFormat
protected void warnIfCannotOverrideFormat(nz.org.riskscape.engine.pipeline.RealizedPipeline pipeline, nz.org.riskscape.problem.ProblemSink problemSink) Prints a warning to the terminal if the given pipeline looks to have an explicit format set for various steps that disagree with the --format option the user has specified. The pipeline shouldn't have been 'capped' with default save sinks, otherwise it's going to cause spurious warning.
NB I considered moving this logic in to the CliPipelineRunner, so that other model running commands can use this feature, but the batch command has specific logic in there to avoid spamming the user with warnings.
-
getCliParameterMap
-
updateParameters
-
realize
protected nz.org.riskscape.engine.pipeline.RealizedPipeline realize(nz.org.riskscape.engine.model.Model model, nz.org.riskscape.engine.pipeline.ExecutionContext executionContext) -
realize
protected nz.org.riskscape.engine.pipeline.RealizedPipeline realize(nz.org.riskscape.engine.model.Model model, nz.org.riskscape.engine.pipeline.ExecutionContext executionContext, boolean allowFailures) -
getCurrentTime
-