cwl

package module
v0.0.0-...-455f122 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2023 License: MIT Imports: 13 Imported by: 0

README

Godoc

This is a Go library and command line tool for working with the common workflow language (CWL).

The core library includes the data type present in the CWL spec (CommandLineTool, Workflow, etc.), with a few extra utilities for loading and working with CWL documents.

For details, see the reference docs.

Subpackages

The process library contains experimental, unfinished code for processing CWL documents in order to execute commands and workflows.

The expr library contains utilities for parsing CWL expressions out of strings. This parser is not yet robust (see the known issues below).

Alpha quality

At the time of this writing, this library is only a couple weeks old. I feel that the core CWL document loading library is fairly stable, but I can't promise that there aren't plenty of bugs lurking.

The command line tool is far from stable, and needs work before becoming useful.

The process library is highly experimental. Processing CWL tools and workflows in a robust manner is not a trivial task.

CLI

The cwl command line tool includes a few commands for loading, inspecting, and experimental support for running commands. See the releases page to download the command line tool binary.

Usage (CLI)

The command line tool is still young and therefore fairly useless. Still:

cwl dump https://raw.githubusercontent.com/buchanae/cwl/master/examples/array-inputs.cwl
// ...outputs the normalized document in JSON.

cwl run exists and is experimental. This command will run a CWL document, similar cwltool.

Usage (library)

package main

import (
  "log"
  "github.com/buchanae/cwl"
)

func main() {
  // Load a CWL CommandLineTool document.
  path := "https://raw.githubusercontent.com/buchanae/cwl/master/examples/array-inputs.cwl"
  doc, err := cwl.Load(path)
  if err != nil {
    log.Fatal(err)
  }
  
  tool := doc.(*cwl.Tool)
  
  // Print the ID of all the input fields
  for _, input := range tool.Inputs {
    log.Println(input.ID)
  }
}
go run main.go
2018/03/12 18:16:22 filesA
2018/03/12 18:16:22 filesB
2018/03/12 18:16:22 filesC

Normalization

The CWL spec allows multiple different types for some fields, e.g. CommandLineTool.inputs may be a string, a list of strings, a map of string to string, a map of string to object, and so on. This is rather difficult to program against, especially in a statically typed language without generics or union types (i.e. Go).

This library normalizes all fields to a single type, often prefering a list where a string and map might be allowed. In the example above, CommandLineTool.inputs is a list.

Similarly, many fields might be a CWL expression. In this library, any field which might be an expression has the type Expression.

Notable changes and known issues

I've taken some liberties with the CWL spec:

  • CommandLineTool is named Tool instead, for brevity.
  • Schema Salad is not implemented and likely won't be implemented.
  • $include and $import statements are not yet implemented, but will be.
  • The CWL expression parser is not robust and will not correctly parse complex expressions, especially those containing $() and escaping.
  • documentation and examples are still sparse, more on the way soon.

Tests and Features

  • 0 PASS General test of command line generation
  • 1 PASS Test nested prefixes with arrays
  • 2 FAIL: SchemaDefRequirement is not supported (yet)
  • 3 PASS Test command line with optional input (missing)
  • 4 PASS Test command line with optional input (provided)
  • 5 FAIL: InitialWorkDirRequirement is not supported (yet)
  • 6 PASS Test command execution in Docker with stdout redirection
  • 7 PASS Test command execution in Docker with simplified syntax stdout redirection
  • 8 PASS Test command execution in Docker with stdout redirection
  • 9 PASS Test command line with stderr redirection
  • 10 PASS Test command line with stderr redirection, brief syntax
  • 11 P Test command line with stderr redirection, named brief syntax
  • 12 FAIL 未实现 STDIN 的功能
  • 13 - 18 FAIL: Error: running doc: unknown doc type "ExpressionTool" ; Test default usage of Any in expressions.
  • 19 FAIL: 未实现 ANY 的功能 ; Testing Any type compatibility in outputSource

共 126 个测试,后面的进行省略

  • 采用实际 App 进行测试 :

  • hpc-batch lammps

  • hpc-session dcv

  • k8s-batch fit-10

  • k8s-session tesorflow

** 添加了 ClusterRequirement 用来进行作业的路由描述

和 endpoint 的关联关系

  • job 状态为 running 后建立 endpoint ,并 建立 job 和 endpoint 的关联
  • 从R队列中删除 job 时 , 关联删除 endpoint 记录

Documentation

Index

Constants

View Source
const (
	DotProduct         ScatterMethod = "dotproduct"
	NestedCrossProduct               = "nested_crossproduct"
	FlatCrossProduct                 = "flat_crossproduct"
)

Variables

This section is empty.

Functions

func ValidateTool

func ValidateTool(tool *Tool) error

Types

type Any

type Any struct{}

func (Any) MarshalText

func (Any) MarshalText() ([]byte, error)

func (Any) String

func (Any) String() string

type Boolean

type Boolean struct{}

func (Boolean) MarshalText

func (Boolean) MarshalText() ([]byte, error)

func (Boolean) String

func (Boolean) String() string

type CommandInput

type CommandInput struct {
	ID         string `json:"id,omitempty"`
	Label      string `json:"label,omitempty"`
	Doc        string `json:"doc,omitempty"`
	Streamable bool   `json:"streamable,omitempty"`
	Default    Value  `json:"default,omitempty"`

	Type []InputType `json:"type,omitempty"`

	SecondaryFiles []Expression `json:"secondaryFiles,omitempty"`
	Format         []Expression `json:"format,omitempty"`

	InputBinding *CommandLineBinding `json:"inputBinding,omitempty"`
}

type CommandLineBinding

type CommandLineBinding struct {
	LoadContents  bool       `json:"loadContents,omitempty"`
	Position      int        `json:"position,omitempty"`
	Prefix        string     `json:"prefix,omitempty"`
	ItemSeparator string     `json:"itemSeparator,omitempty"`
	ValueFrom     Expression `json:"valueFrom,omitempty"`
	Separate      OptOut     `json:"separate,omitempty"`
	ShellQuote    OptOut     `json:"shellQuote,omitempty"`
}

func (*CommandLineBinding) GetItemSeparator

func (clb *CommandLineBinding) GetItemSeparator() string

func (*CommandLineBinding) GetLoadContents

func (clb *CommandLineBinding) GetLoadContents() bool

func (*CommandLineBinding) GetPosition

func (clb *CommandLineBinding) GetPosition() int

func (*CommandLineBinding) GetPrefix

func (clb *CommandLineBinding) GetPrefix() string

func (*CommandLineBinding) GetValueFrom

func (clb *CommandLineBinding) GetValueFrom() Expression

type CommandOutput

type CommandOutput struct {
	ID         string `json:"id,omitempty"`
	Label      string `json:"label,omitempty"`
	Doc        string `json:"doc,omitempty"`
	Streamable bool   `json:"streamable,omitempty"`

	Type []OutputType `json:"type,omitempty"`

	SecondaryFiles []Expression `json:"secondaryFiles,omitempty"`
	Format         []Expression `json:"format,omitempty"`

	OutputBinding *CommandOutputBinding `json:"outputBinding,omitempty"`
}

type CommandOutputBinding

type CommandOutputBinding struct {
	Glob         []Expression `json:"glob,omitempty"`
	LoadContents bool         `json:"loadContents,omitempty"`
	OutputEval   Expression   `json:"outputEval,omitempty"`
}

type DefaultResolver

type DefaultResolver struct{}

DefaultResolver is a document location resolver which resolves local file paths.

func (DefaultResolver) Resolve

func (DefaultResolver) Resolve(base, loc string) ([]byte, string, error)

type Directory

type Directory struct {
	Location string    `json:"location,omitempty"`
	Path     string    `json:"path,omitempty"`
	Basename string    `json:"basename,omitempty"`
	Listing  []FileDir `json:"listing,omitempty"`
}

func (Directory) MarshalJSON

func (i Directory) MarshalJSON() ([]byte, error)

type DirectoryType

type DirectoryType struct{}

func (DirectoryType) MarshalText

func (DirectoryType) MarshalText() ([]byte, error)

func (DirectoryType) String

func (DirectoryType) String() string

type Dirent

type Dirent struct {
	Entry     Expression `json:"entry,omitempty"`
	Entryname Expression `json:"entryname,omitempty"`
	Writable  bool       `json:"writeable,omitempty"`
}

type DockerRequirement

type DockerRequirement struct {
	Pull            string `json:"dockerPull,omitempty"`
	Load            string `json:"dockerLoad,omitempty"`
	File            string `json:"dockerFile,omitempty"`
	Import          string `json:"dockerImport,omitempty"`
	ImageID         string `json:"dockerImageID,omitempty"`
	OutputDirectory string `json:"dockerOutputDirectory,omitempty"`
}

func (DockerRequirement) MarshalJSON

func (x DockerRequirement) MarshalJSON() ([]byte, error)

type Document

type Document interface {
	Doctype() string
}

func Load

func Load(loc string) (Document, error)

func LoadDocumentBytes

func LoadDocumentBytes(b []byte, base string, r Resolver) (Document, error)

func LoadWithResolver

func LoadWithResolver(loc string, r Resolver) (Document, error)

type DocumentRef

type DocumentRef struct {
	Location string
}

func (DocumentRef) Doctype

func (DocumentRef) Doctype() string

func (DocumentRef) MarshalText

func (d DocumentRef) MarshalText() ([]byte, error)

type Double

type Double struct{}

func (Double) MarshalText

func (Double) MarshalText() ([]byte, error)

func (Double) String

func (Double) String() string

type EnvVarRequirement

type EnvVarRequirement struct {
	EnvDef map[string]Expression `json:"envDef,omitempty"`
}

func (EnvVarRequirement) MarshalJSON

func (x EnvVarRequirement) MarshalJSON() ([]byte, error)

type Expression

type Expression string

type ExpressionTool

type ExpressionTool struct {
	CWLVersion string `json:"cwlVersion,omitempty"`
	Class      string `json:"class,omitempty"`

	ID    string `json:"id,omitempty"`
	Label string `json:"label,omitempty"`
	Doc   string `json:"doc,omitempty"`

	Hints        []Requirement `json:"hints,omitempty"`
	Requirements []Requirement `json:"requirements,omitempty"`

	Inputs  []CommandInput  `json:"inputs,omitempty"`
	Outputs []CommandOutput `json:"outputs,omitempty"`

	Expression Expression `json:"expression,omitempty"`
}

func (ExpressionTool) Doctype

func (ExpressionTool) Doctype() string

type File

type File struct {
	Location       string    `json:"location,omitempty"`
	Path           string    `json:"path,omitempty"`
	Basename       string    `json:"basename,omitempty"`
	Dirname        string    `json:"dirname,omitempty"`
	Nameroot       string    `json:"nameroot,omitempty"`
	Nameext        string    `json:"nameext,omitempty"`
	Checksum       string    `json:"checksum,omitempty"`
	Size           int64     `json:"size"`
	Format         string    `json:"format,omitempty"`
	Contents       string    `json:"contents,omitempty"`
	SecondaryFiles []FileDir `json:"secondaryFiles,omitempty"`
}

func (File) MarshalJSON

func (i File) MarshalJSON() ([]byte, error)

type FileDir

type FileDir interface {
	// contains filtered or unexported methods
}

type FileType

type FileType struct{}

func (FileType) MarshalText

func (FileType) MarshalText() ([]byte, error)

func (FileType) String

func (FileType) String() string

type Float

type Float struct{}

func (Float) MarshalText

func (Float) MarshalText() ([]byte, error)

func (Float) String

func (Float) String() string

type Graph

type Graph struct {
	CWLVersion string     `json:"cwlVersion,omitempty"`
	Docs       []Document `json:"$graph"`
}

func (Graph) Doctype

func (Graph) Doctype() string

type InitialWorkDirListing

type InitialWorkDirListing struct {
	Entry     Expression `json:"entry,omitempty"`
	Entryname Expression `json:"entryname,omitempty"`
}

type InitialWorkDirRequirement

type InitialWorkDirRequirement struct {
	// TODO the most difficult union type
	Listing []InitialWorkDirListing `json:"listing,omitempty"`
}

func (InitialWorkDirRequirement) MarshalJSON

func (x InitialWorkDirRequirement) MarshalJSON() ([]byte, error)

type InlineJavascriptRequirement

type InlineJavascriptRequirement struct {
	ExpressionLib []string `json:"expressionLib,omitempty"`
}

func (InlineJavascriptRequirement) MarshalJSON

func (x InlineJavascriptRequirement) MarshalJSON() ([]byte, error)

type InputArray

type InputArray struct {
	Label        string              `json:"label,omitempty"`
	Items        []InputType         `json:"items,omitempty"`
	InputBinding *CommandLineBinding `json:"inputBinding,omitempty"`
}

func (InputArray) MarshalJSON

func (i InputArray) MarshalJSON() ([]byte, error)

func (InputArray) String

func (InputArray) String() string

type InputEnum

type InputEnum struct {
	Label        string              `json:"label,omitempty"`
	Symbols      []string            `json:"symbols,omitempty"`
	InputBinding *CommandLineBinding `json:"inputBinding,omitempty"`
}

func (InputEnum) String

func (InputEnum) String() string

type InputField

type InputField struct {
	Name         string              `json:"name,omitempty"`
	Doc          string              `json:"doc,omitempty"`
	Label        string              `json:"label,omitempty"`
	Type         []InputType         `json:"type,omitempty"`
	InputBinding *CommandLineBinding `json:"inputBinding,omitempty"`
}

type InputRecord

type InputRecord struct {
	Label  string       `json:"label,omitempty"`
	Fields []InputField `json:"fields,omitempty"`
}

func (InputRecord) MarshalJSON

func (i InputRecord) MarshalJSON() ([]byte, error)

func (InputRecord) String

func (InputRecord) String() string

type InputType

type InputType interface {
	String() string
	// contains filtered or unexported methods
}

type Int

type Int struct{}

func (Int) MarshalText

func (Int) MarshalText() ([]byte, error)

func (Int) String

func (Int) String() string

type KubernetesRequirement

type KubernetesRequirement struct {
	Deployments []Expression `json:"deployments,omitempty"`
	Proxies     []Expression `json:"proxies,omitempty"`
}

KubernetesRequirement 用来描述 Kubernetes deployment 用来控制 k8s-deployment 应用的创建

type LinkMergeMethod

type LinkMergeMethod string
const (
	MergeNested    LinkMergeMethod = "merge_nested"
	MergeFlattened                 = "merge_flattened"
)

type Long

type Long struct{}

func (Long) MarshalText

func (Long) MarshalText() ([]byte, error)

func (Long) String

func (Long) String() string

type MultipleInputFeatureRequirement

type MultipleInputFeatureRequirement struct {
}

func (MultipleInputFeatureRequirement) MarshalJSON

func (x MultipleInputFeatureRequirement) MarshalJSON() ([]byte, error)

type Null

type Null struct{}

func (Null) MarshalText

func (Null) MarshalText() ([]byte, error)

func (Null) String

func (Null) String() string

type OptOut

type OptOut struct {
	// contains filtered or unexported fields
}

OptOut provides a boolean flag that defaults to true.

func (*OptOut) Clear

func (o *OptOut) Clear()

func (*OptOut) MarshalText

func (o *OptOut) MarshalText() ([]byte, error)

func (*OptOut) Set

func (o *OptOut) Set(v bool)

func (*OptOut) Value

func (o *OptOut) Value() bool

type OutputArray

type OutputArray struct {
	Label         string                `json:"label,omitempty"`
	Items         []OutputType          `json:"items,omitempty"`
	OutputBinding *CommandOutputBinding `json:"outputBinding,omitempty"`
}

func (OutputArray) MarshalJSON

func (i OutputArray) MarshalJSON() ([]byte, error)

func (OutputArray) String

func (OutputArray) String() string

type OutputEnum

type OutputEnum struct {
	Label         string                `json:"label,omitempty"`
	Symbols       []string              `json:"symbols,omitempty"`
	OutputBinding *CommandOutputBinding `json:"outputBinding,omitempty"`
}

func (OutputEnum) String

func (OutputEnum) String() string

type OutputField

type OutputField struct {
	Name          string                `json:"name,omitempty"`
	Doc           string                `json:"doc,omitempty"`
	Type          []OutputType          `json:"type,omitempty"`
	OutputBinding *CommandOutputBinding `json:"outputBinding,omitempty"`
}

type OutputRecord

type OutputRecord struct {
	Label  string        `json:"label,omitempty"`
	Fields []OutputField `json:"fields,omitempty"`
}

func (OutputRecord) MarshalJSON

func (i OutputRecord) MarshalJSON() ([]byte, error)

func (OutputRecord) String

func (OutputRecord) String() string

type OutputType

type OutputType interface {
	String() string
	// contains filtered or unexported methods
}

type ParallelRequirement

type ParallelRequirement struct {
	MpiEnabled bool `json:"writeable,omitempty"`
}

ParallelRequirement 用来描述作业执行的并行环境 Runtime 会根据需要 进行 srun/mpirun 的 包装

type Requirement

type Requirement interface {
	// contains filtered or unexported methods
}

type Resolver

type Resolver interface {
	// Resolve is given the current `base`,
	// such as the directory of the root document,
	// and the `location` referenced by the CWL document.
	//
	// Upon success, the document bytes and the new `base`
	// should be returned.
	Resolve(base, location string) (doc []byte, newBase string, err error)
}

Resolver describes a type which resolves docment by location, such as loading relative file paths referenced in a CWL document.

func NoResolve

func NoResolve() Resolver

NoResolve is a special case resolver which does not resolve documents, but instead creates `DocumentRef` instances in the document tree.

type ResourceRequirement

type ResourceRequirement struct {
	CoresMin  Expression `json:"coresMin,omitempty"`
	CoresMax  Expression `json:"coresMax,omitempty"`
	RAMMin    Expression `json:"ramMin,omitempty"`
	RAMMax    Expression `json:"ramMax,omitempty"`
	TmpDirMin Expression `json:"tmpdirMin,omitempty"`
	TmpDirMax Expression `json:"tmpdirMax,omitempty"`
	OutDirMin Expression `json:"outdirMin,omitempty"`
	OutDirMax Expression `json:"outdirMax,omitempty"`
}

func (ResourceRequirement) MarshalJSON

func (x ResourceRequirement) MarshalJSON() ([]byte, error)

type ScatterFeatureRequirement

type ScatterFeatureRequirement struct {
}

func (ScatterFeatureRequirement) MarshalJSON

func (x ScatterFeatureRequirement) MarshalJSON() ([]byte, error)

type ScatterMethod

type ScatterMethod string

type SchedulerRequirement

type SchedulerRequirement struct {
	Scheduler     string       `json:"scheduler,omitempty"`
	Cluster       Expression   `json:"cluster,omitempty"`
	Partition     Expression   `json:"partition,omitempty"`
	Nodes         Expression   `json:"nodes,omitempty"`
	SchedulerArgs []Expression `json:"args,omitempty"`
}

SchedulerRequirement 用来描述作业执行的环境 对于本地运行实际可以缺省 用来在作业网关上控制作业路由,实际的值可以由 inputs 解析获取 组合 DockerRequirement 使用可以创建 k8s-job 应用

type SchemaDef

type SchemaDef struct {
	Name string `json:"name,omitempty"`
	Type SchemaType
}

type SchemaDefRequirement

type SchemaDefRequirement struct {
	Types []SchemaDef `json:"types,omitempty"`
}

func (SchemaDefRequirement) MarshalJSON

func (x SchemaDefRequirement) MarshalJSON() ([]byte, error)

type SchemaType

type SchemaType interface {
	// contains filtered or unexported methods
}

type ShellCommandRequirement

type ShellCommandRequirement struct {
}

func (ShellCommandRequirement) MarshalJSON

func (x ShellCommandRequirement) MarshalJSON() ([]byte, error)

type SoftwarePackage

type SoftwarePackage struct {
	Package string   `json:"package,omitempty"`
	Version []string `json:"version,omitempty"`
	Specs   []string `json:"specs,omitempty"`
}

type SoftwareRequirement

type SoftwareRequirement struct {
	Packages []SoftwarePackage `json:"packages,omitempty"`
}

func (SoftwareRequirement) MarshalJSON

func (x SoftwareRequirement) MarshalJSON() ([]byte, error)

type Stderr

type Stderr struct{}

func (Stderr) MarshalText

func (Stderr) MarshalText() ([]byte, error)

func (Stderr) String

func (Stderr) String() string

type Stdout

type Stdout struct{}

func (Stdout) MarshalText

func (Stdout) MarshalText() ([]byte, error)

func (Stdout) String

func (Stdout) String() string

type Step

type Step struct {
	ID    string `json:"id,omitempty"`
	Label string `json:"label,omitempty"`
	Doc   string `json:"doc,omitempty"`

	Hints        []Requirement `json:"hints,omitempty"`
	Requirements []Requirement `json:"requirements,omitempty"`

	In  []StepInput  `json:"in,omitempty"`
	Out []StepOutput `json:"out,omitempty"`

	Run Document `json:"run,omitempty"`

	Scatter       []string      `json:"scatter,omitempty"`
	ScatterMethod ScatterMethod `json:"scatterMethod,omitempty"`
}

type StepInput

type StepInput struct {
	ID        string          `json:"id,omitempty"`
	Source    []string        `json:"source,omitempty"`
	LinkMerge LinkMergeMethod `json:"linkMerge,omitempty"`
	Default   Value           `json:"default,omitempty"`
	ValueFrom Expression      `json:"valueFrom,omitempty"`
}

type StepInputExpressionRequirement

type StepInputExpressionRequirement struct {
}

func (StepInputExpressionRequirement) MarshalJSON

func (x StepInputExpressionRequirement) MarshalJSON() ([]byte, error)

type StepOutput

type StepOutput struct {
	ID string `json:"id,omitempty"`
}

type String

type String struct{}

func (String) MarshalText

func (String) MarshalText() ([]byte, error)

func (String) String

func (String) String() string

type SubworkflowFeatureRequirement

type SubworkflowFeatureRequirement struct {
}

func (SubworkflowFeatureRequirement) MarshalJSON

func (x SubworkflowFeatureRequirement) MarshalJSON() ([]byte, error)

type Tool

type Tool struct {
	CWLVersion string `json:"cwlVersion,omitempty"`
	ID         string `json:"id,omitempty"`
	Label      string `json:"label,omitempty"`
	Doc        string `json:"doc,omitempty"`

	Hints        []Requirement `json:"hints,omitempty"`
	Requirements []Requirement `json:"requirements,omitempty"`

	Inputs  []CommandInput  `json:"inputs,omitempty"`
	Outputs []CommandOutput `json:"outputs,omitempty"`

	BaseCommand []string              `json:"baseCommand,omitempty"`
	Arguments   []*CommandLineBinding `json:"arguments,omitempty"`

	Stdin  Expression `json:"stdin,omitempty"`
	Stderr Expression `json:"stderr,omitempty"`
	Stdout Expression `json:"stdout,omitempty"`

	SuccessCodes       []int `json:"successCodes,omitempty"`
	TemporaryFailCodes []int `json:",omitempty"`
	PermanentFailCodes []int `json:",omitempty"`
}

func (Tool) Doctype

func (Tool) Doctype() string

func (Tool) MarshalJSON

func (x Tool) MarshalJSON() ([]byte, error)

func (*Tool) RequiresDocker

func (t *Tool) RequiresDocker() (*DockerRequirement, bool)

func (*Tool) RequiresInlineJavascript

func (t *Tool) RequiresInlineJavascript() ([]string, bool)

func (*Tool) RequiresSchemaDef

func (t *Tool) RequiresSchemaDef() (*SchemaDefRequirement, bool)

func (*Tool) RequiresShellCommand

func (t *Tool) RequiresShellCommand() bool

func (*Tool) ResolveSchemaDefs

func (t *Tool) ResolveSchemaDefs() error

type TypeRef

type TypeRef struct {
	Name string
}

func (TypeRef) MarshalText

func (t TypeRef) MarshalText() ([]byte, error)

func (TypeRef) String

func (t TypeRef) String() string

type UnknownRequirement

type UnknownRequirement struct {
	Name string
}

type Value

type Value interface{}

type Values

type Values map[string]Value

func LoadValuesBytes

func LoadValuesBytes(b []byte) (Values, error)

func LoadValuesFile

func LoadValuesFile(p string) (Values, error)

type Workflow

type Workflow struct {
	CWLVersion string `json:"cwlVersion,omitempty"`
	ID         string `json:"id,omitempty"`
	Label      string `json:"label,omitempty"`
	Doc        string `json:"doc,omitempty"`

	Hints        []Requirement `json:"hints,omitempty"`
	Requirements []Requirement `json:"requirements,omitempty"`

	Inputs  []WorkflowInput  `json:"inputs,omitempty"`
	Outputs []WorkflowOutput `json:"outputs,omitempty"`
	Steps   []Step           `json:"steps,omitempty"`
}

func (Workflow) Doctype

func (Workflow) Doctype() string

func (Workflow) MarshalJSON

func (x Workflow) MarshalJSON() ([]byte, error)

type WorkflowInput

type WorkflowInput struct {
	ID         string `json:"id,omitempty"`
	Label      string `json:"label,omitempty"`
	Doc        string `json:"doc,omitempty"`
	Streamable bool   `json:"streamable,omitempty"`
	Default    Value  `json:"default,omitempty"`

	Type []InputType `json:"type,omitempty"`

	SecondaryFiles []Expression `json:"secondaryFiles,omitempty"`
	Format         []Expression `json:"format,omitempty"`

	InputBinding *CommandLineBinding `json:"inputBinding,omitempty"`
}

TODO exactly the same as CommandInput? Changing in v1.1?

type WorkflowOutput

type WorkflowOutput struct {
	ID         string          `json:"id,omitempty"`
	Label      string          `json:"label,omitempty"`
	Doc        string          `json:"doc,omitempty"`
	Streamable bool            `json:"streamable,omitempty"`
	LinkMerge  LinkMergeMethod `json:"linkMerge,omitempty"`

	Type           []OutputType `json:"type,omitempty"`
	SecondaryFiles []Expression `json:"secondaryFiles,omitempty"`
	Format         []Expression `json:"format,omitempty"`

	OutputBinding *CommandOutputBinding `json:"outputBinding,omitempty"`
	OutputSource  []string              `json:"outputSource,omitempty"`
}

type WorkflowRequirement

type WorkflowRequirement interface {
	// contains filtered or unexported methods
}

Directories

Path Synopsis
cmd
cwl

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL