common-workflow-lab / python-cwlgen

Generation of CWL programmatically. Available types: CommandLineTool and DockerRequirement
https://github.com/common-workflow-language/cwl-utils
MIT License
29 stars 13 forks source link

Can we create a workflow using this package? #11

Closed ghost closed 5 years ago

ghost commented 6 years ago

Tried creating a workflow using this pacakge just like 'CommandLineTool' creation example. But looks like this tool does not support the workflow creation, got an error while doing so. Is this correct understanding?

illusional commented 5 years ago

Hey ghost, it will probably be released in v0.3.0 (it's in this repository now). You could then use classes to generate Workflows, as well as CommandLineTools. You could do the following:

import cwlgen

w = cwlgen.Workflow(workflow_id=None, label=None, doc=None, cwl_version='v1.0')
# and then set inputs
w.inputs.append(cwlgen.InputParameter(param_id, label=None, secondary_files=None, param_format=None, streamable=None, doc=None, input_binding=None, default=None, param_type=None)

w.export() # writes CWL to console

Note that this doesn't logically check your workflow, we'd recommend something like CWLTool for that.

illusional commented 5 years ago

Hi again ghost, v0.3.0 has been released so I'm going to close this issue. The documentation has been updated on the README and in the documentation