{"id":26550431,"url":"https://github.com/buchanae/cwl","last_synced_at":"2025-03-22T07:35:12.779Z","repository":{"id":137669455,"uuid":"108161691","full_name":"buchanae/cwl","owner":"buchanae","description":"common workflow language library and runtime","archived":false,"fork":false,"pushed_at":"2018-12-19T18:58:53.000Z","size":281,"stargazers_count":7,"open_issues_count":0,"forks_count":3,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-11-14T21:15:39.429Z","etag":null,"topics":["cwl"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/buchanae.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-10-24T17:36:12.000Z","updated_at":"2024-07-23T07:34:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"ee10a3af-12d5-4593-a0d7-bfa5b7cf538d","html_url":"https://github.com/buchanae/cwl","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buchanae%2Fcwl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buchanae%2Fcwl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buchanae%2Fcwl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buchanae%2Fcwl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/buchanae","download_url":"https://codeload.github.com/buchanae/cwl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244925201,"owners_count":20532873,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cwl"],"created_at":"2025-03-22T07:35:12.182Z","updated_at":"2025-03-22T07:35:12.768Z","avatar_url":"https://github.com/buchanae.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Godoc](https://img.shields.io/badge/godoc-ref-blue.svg)](http://godoc.org/github.com/buchanae/cwl)\n\nThis is a Go library and command line tool for working with the [common workflow language (CWL)](http://commonwl.org). \n\nThe core library includes the data type\npresent in the CWL spec (CommandLineTool, Workflow, etc.), with a few extra utilities for loading and working with CWL documents. \n\nFor details, see the [reference docs](https://godoc.org/github.com/buchanae/cwl).\n\n## Subpackages\n\nThe [process](./process) library contains experimental, unfinished code for processing CWL documents in order to execute commands and workflows.\n\nThe [expr](./expr) library contains utilities for parsing CWL expressions out of strings. This parser is not yet robust (see the known issues below).\n\n## Alpha quality\n\nAt 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. \n\nThe command line tool is far from stable, and needs work before becoming useful.\n\nThe [process](./process) library is highly experimental. Processing CWL tools and workflows in a robust manner is not a trivial task.\n\n## CLI\n\nThe `cwl` command line tool includes a few commands for loading, inspecting, and experimental support for running commands. See the [releases](https://github.com/buchanae/cwl/releases) page to download the command line tool binary.\n\n## Usage (CLI)\n\nThe command line tool is still young and therefore fairly useless. Still:\n```\ncwl dump https://raw.githubusercontent.com/buchanae/cwl/master/examples/array-inputs.cwl\n// ...outputs the normalized document in JSON.\n```\n\n`cwl run` exists and is experimental. This command will run a CWL document, similar `cwltool`.\n\n## Usage (library)\n\n```go\npackage main\n\nimport (\n  \"log\"\n  \"github.com/buchanae/cwl\"\n)\n\nfunc main() {\n  // Load a CWL CommandLineTool document.\n  path := \"https://raw.githubusercontent.com/buchanae/cwl/master/examples/array-inputs.cwl\"\n  doc, err := cwl.Load(path)\n  if err != nil {\n    log.Fatal(err)\n  }\n  \n  tool := doc.(*cwl.Tool)\n  \n  // Print the ID of all the input fields\n  for _, input := range tool.Inputs {\n    log.Println(input.ID)\n  }\n}\n```\n\n```\ngo run main.go\n2018/03/12 18:16:22 filesA\n2018/03/12 18:16:22 filesB\n2018/03/12 18:16:22 filesC\n```\n\n## Normalization\n\nThe 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).\n\nThis 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`](https://godoc.org/github.com/buchanae/cwl#Tool) is a list.\n\nSimilarly, many fields might be a [CWL expression](http://www.commonwl.org/v1.0/CommandLineTool.html#Expressions). In this library, any field which *might* be an expression has the type [`Expression`](https://godoc.org/github.com/buchanae/cwl#Expression).\n\n## Notable changes and known issues\n\nI've taken some liberties with the CWL spec:\n\n- `CommandLineTool` is named `Tool` instead, for brevity.\n- [Schema Salad](http://www.commonwl.org/v1.0/SchemaSalad.html) is not implemented and likely won't be implemented.\n- `$include` and `$import` statements are not yet implemented, but will be.\n- The CWL expression parser is not robust and will not correctly parse complex expressions, especially those containing `$()` and escaping.\n- documentation and examples are still sparse, more on the way soon.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuchanae%2Fcwl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbuchanae%2Fcwl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuchanae%2Fcwl/lists"}