name: hello
description: >
  A "hello world" sample model

  This is a sample model that provides various operations for printing
  hello world messages.

  The message provided, either by default, by a flag, or a file (see
  each operation for the applicable interface) is printed to standard
  output and written to a file named `output` in the run directory.

operations:
  default:
    description: >
      Print a default message

      This operation doesn't support a user-defined message. Use the
      from-flag operation with the 'message' flag to print an
      alternative message.

    cmd: say

  from-flag:
    description: >
      Print a message

      Use the 'message' flag to specify the message to print.

    cmd: say
    flags:
      message:
        description: Message to print
        default: Hello Guild, from a flag!

  from-file:
    description: >
      Print a message from a file

      Use the 'file' flag to specify the file to print.

    cmd: say
    requires: msg-file
    flags:
      file:
        description: File containing the message to print
        default: msg.txt

  from-file-output:
    description: >
      Print output from last file-output operation

      This operation requires a completed file-output run.

    cmd: say --file-output
    requires: file-output

resources:
  msg-file:
    description: Default file used in from-file operation
    sources:
      - file: msg.txt
        sha256: 0bc96b4f4757a80c0a3f9b9bc14de789e5eb1d75659904de68241cfc7030e7de

  file-output:
    description: Output generated by from-file operation
    path: from-file
    sources:
      - operation: hello:from-file
        select: output
