Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI for CWL workflow/tool execution #145

Open
mr-c opened this issue Oct 7, 2022 · 2 comments
Open

UI for CWL workflow/tool execution #145

mr-c opened this issue Oct 7, 2022 · 2 comments

Comments

@mr-c
Copy link
Member

mr-c commented Oct 7, 2022

@mvdbeek proposed using a schema-salad representation of workflow/tool inputs to help build the web UI for executing CWL tools/workflows in Galaxy

I wrote common-workflow-language/cwltool#1748 to add a --print-input-schema option to cwltool

Here are some outputs of cwltool --print-input-schema for CWL workflows and tools descriptions from the MGnify team:

https://gist.github.com/mr-c/3b87d8538817c023197b7ed4bb1f0210#file-raw-reads-wf-v-5-cond_inputs_schema-yml

(Currently, each file has the same boilerplate definitions at the top, but that is likely to be moved to an $import from a stable, public URL)

These schema salad documents can used by the schema-salad Python library, and/or loaded from a standalone parser like https://github.com/common-workflow-lab/schema-salad-ts-auto for TypeScript

(that parser was generated from the schema-salad codegen feature using the schema salad metaschema 😅 )

We can also generate that specialized parser for Python, Java, .Net (and any future languages supported by schema-salad-tool --codegen)

ALSO we can generate a parser for a particular workflow/tool input schema, here's the Python version of that for raw-reads-wf-v-5-cond.cwl inputs: https://gist.github.com/mr-c/3b87d8538817c023197b7ed4bb1f0210#file-raw-reads-wf-v-5-cond_inputs_schema-py

@mr-c
Copy link
Member Author

mr-c commented Oct 18, 2022

I did some more thinking about this, and talked with @tetron ;

CWL input and output sections are schemas that are a super-set of schema-salad schemas. So lowering them to schema-salad schemas makes us lose features: secondaryFiles spec & validation; file format spec & validation as both narrow the File type; there are likely other aspects we would lose by lowering the schema from CWL to schema SALAD format.

So I think we need to gather use cases for what to do with the schema of a CWL workflow/tool input object.

For validating an input object, we can write code to use the TypeScript CWL loader to validate an input object against a CWL tool/workflow description. In this case I would volunteer to write the validator in Python using the cwl-utils autogenerated CWL objects, that should be straightforward to rewrite into TypeScript by someone with familiarity with that language.

@mvdbeek
Copy link
Collaborator

mvdbeek commented Oct 18, 2022

OK, let's see how far we're getting with the input sections we have now, and we can start with validation via the typescript cwl loader.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants