Skip to content
/ cwl.go Public
forked from otiai10/cwl.go

CWL (and input file) parser for Golang

License

Notifications You must be signed in to change notification settings

sb10/cwl.go

This branch is 42 commits behind otiai10/cwl.go:master.

Folders and files

NameName
Last commit message
Last commit date
Sep 11, 2017
Nov 29, 2017
Sep 11, 2017
Nov 29, 2017
Sep 12, 2017
Jan 18, 2018
Nov 28, 2017
Nov 28, 2017
Sep 13, 2017
Nov 28, 2017
Sep 14, 2017
Sep 13, 2017
Nov 30, 2017
Nov 29, 2017
Sep 13, 2017
Jan 18, 2018
Nov 28, 2017
Sep 13, 2017
Nov 29, 2017
Nov 28, 2017
Sep 13, 2017
Sep 14, 2017
Nov 28, 2017
Sep 13, 2017
Sep 13, 2017
Nov 29, 2017
Nov 29, 2017
Sep 13, 2017
Nov 30, 2017
Sep 15, 2017

Repository files navigation

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

About

CWL (and input file) parser for Golang

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 99.3%
  • Shell 0.7%