CWL (and input file) parser for Golang, used by github.com/otiai10/yacle
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
cwl @ 2c439a8
tests
.gitmodules
.travis.yml
LICENSE
README.md
alias.go
arguments.go
basecommands.go
binding.go
entry.go
envdef.go
eval.go
field.go
graphs.go
hints.go
input.go
input_default.go
input_provided.go
namespaces.go
output.go
parameter.go
parser.go
requirement.go
root.go
schemas.go
secondary_file.go
step.go
step_input.go
step_output.go
types.go
xtest.sh

README.md

cwl.go

Build Status GoDoc

cwl.go is just a parser of CWL file and input files based on CWL, for example 1st-tool.yaml and echo-job.yml.

Fully documented here!

Example

package main

import (
	"fmt"
	"os"

	cwl "github.com/otiai10/cwl.go"
)

func main() {
	file, _ := os.Open("hello.cwl")
	doc := cwl.NewCWL()
	doc.Decode(file)
	fmt.Printf("%+v\n", doc)
}

Tests

Prerequisite

xtest.sh requires Go package github.com/otiai10/mint

To install it.

go get -u github.com/otiai10/mint

Why xtest.sh and How to do test with it.

Because there are both array and dictionary in CWL specification, and as you know Golang can't keep order of map keys, the test fails sometimes by order problem. Therefore, ./xtest.sh tries testing each case several times eagerly unless it passes.

For all cases,

./xtest.sh

For only 1 case which matches _wf3,

./xtest.sh _wf3

Or if you want to execute single test for just 1 time (NOT eagerly),

go test ./tests -run _wf3