Configuration parameters#

ACTION_CLASSES_DIRECTORIES#

Description

A list of local directories, from which all *.py files will be considered action definitions. Each loaded definition is named after the filename stem and must contain an Action class. e.g. foo-bar.py may be referenced in a YAML workflow as type: foo-bar.

Workflow file configuration field

action_classes_directories

Environment variable

GRANA_ACTIONS_CLASS_DEFINITIONS_DIRECTORY

RC file field

action_classes_directories

Default

An empty list

CONTEXT_DIRECTORY#

Description

A directory that is used to resolve all relative paths.

Default

Current working directory

DEFAULT_SHELL_EXECUTABLE#

Description

Specifies which shell executable should be used by the shell action by default.

Workflow file configuration field

default_shell_executable

Environment variable

GRANA_DEFAULT_SHELL_EXECUTABLE

RC file field

default_shell_executable

Default

/bin/sh

DEPENDENCY_DEFAULT_STRICTNESS#

Description

Default strictness for action dependencies.

Workflow file configuration field

strict

Environment variable

GRANA_STRICT_DEPENDENCIES

RC file field

strict

Default

False

EXTERNAL_DISPLAY_CLASS#

Description

May point to a file containing a Display class definition, which will replace the default implementation.

Environment variable

GRANA_DISPLAY_SOURCE_FILE

RC file field

display_source_file

Default

None

EXTERNAL_PYTHON_MODULES_PATHS#

Description

A list of local directories, which are added to the sys.path while loading any external modules.

Workflow file configuration field

external_python_modules_paths

Environment variable

GRANA_EXTERNAL_MODULES_PATHS

RC file field

external_python_modules_paths

Default

An empty list

INTERACTIVE_MODE#

Description

Specifies whither to run plan interaction phase or not.

Command-line option

--interactive

Default

False

INTERNAL_DISPLAY_CLASS#

Description

Selects a display by name from the bundled list.

Command-line option

--display

Environment variable

GRANA_DISPLAY_NAME

RC file field

display_name

Default

prefix

LOG_FILE#

Description

Specifies the log file path.

Command-line option

--log-file

Environment variable

GRANA_LOG_FILE

RC file field

log_file

Default

None

LOG_LEVEL#

Description

Specifies the level for the logging subsystem.

Command-line option

--log-level

Environment variable

GRANA_LOG_LEVEL

RC file field

log_level

Default

ERROR

RC_FILE#

Description

Specifies the runtime configuration file location.

Environment variable

GRANA_RC_FILE

Default

.granarc file in the current working directory

RUNNER_TEMPORARY_DIRECTORY#

Description

Holds a runner-scoped temporary directory path

Default

Obtain from runner context

SHELL_INJECT_YIELD_FUNCTION#

Description

When set to True, all shell-related actions will inject the yield_outcome function definition.

Workflow file configuration field

shell_inject_yield_function

Environment variable

GRANA_SHELL_INJECT_YIELD_FUNCTION

RC file field

shell_inject_yield_function

Default

True

STRATEGY_CLASS#

Description

Specifies the execution strategy.

Workflow file configuration field

strategy

Command-line option

--strategy

Environment variable

GRANA_STRATEGY_NAME

RC file field

strategy

Default

auto

STRICT_OUTCOMES_RENDERING#

Description

When set to True, rendering a missing outcome key will result in an error instead of an empty string.

Workflow file configuration field

strict_outcomes_rendering

Environment variable

STRICT_OUTCOMES_RENDERING

RC file field

strict_outcomes_rendering

Default

True

SUBPROCESS_STREAM_BUFFER_LIMIT#

Description

An integer number defining the maximum line stdout/stderr length for a spawned subprocess.

Environment variable

GRANA_SUBPROCESS_STREAM_BUFFER_LIMIT

RC file field

subprocess_stream_buffer_limit

Default

65536

TEMPLAR_MODULES_WHITELIST#

Description

List of modules allowed to be used in a template.

Workflow file configuration field

templar_modules_whitelist

Environment variable

GRANA_TEMPLAR_MODULES_WHITELIST

RC file field

templar_modules_whitelist

Default

An empty dict

USE_COLOR#

Description

When specified, this will force the colored or non-colored output, according to the setting.

Environment variable

GRANA_FORCE_COLOR

RC file field

force_color

Default

Depending on if a TTY is allocated.

WORKFLOW_LOADER_CLASS#

Description

May point to a file containing a WorkflowLoader class definition, which will replace the default implementation.

Environment variable

GRANA_WORKFLOW_LOADER_SOURCE_FILE

RC file field

workflow_loader_source_file

Default

None

WORKFLOW_SOURCE_FILE#

Description

Workflow source file path. When not set, grana.yml/grana.yaml are being looked for in the working directory. If set to -, then standard input stream is used as the source.

Command-line option

Positional argument to grana run and grana validate.

Environment variable

GRANA_WORKFLOW_FILE

RC file field

workflow_file

Default

None