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

types for input/output not consistent #2

Open
gijzelaerr opened this issue Jan 25, 2019 · 1 comment
Open

types for input/output not consistent #2

gijzelaerr opened this issue Jan 25, 2019 · 1 comment

Comments

@gijzelaerr
Copy link
Member

gijzelaerr commented Jan 25, 2019

cwlVersion: v1.0
class: Workflow

inputs:
 a: int
 b: int[]
 c:
   type: int?

outputs: {}

steps: {}

python:

IN: from cwl_utils.parser_v1_0 import load_document
IN: [i.type for i in load_document('test.cwl').inputs]
Out: 
['int',
 <cwl_utils.parser_v1_0.InputArraySchema at 0x7f9242121400>,
 ['null', 'int']]

Shouldn't the InputArraySchema object also be a string, for example array?

@mr-c
Copy link
Member

mr-c commented Dec 2, 2020

The generated parsers embody all the flexibility of the schema-salad definition of CWL.

It is feasible to add an field to the schema format and use that to indicate the canonical representation of a field. Then one would enhance schema-salad-tool --codegen python to either normalize to that formulation on read in or on field access (either option would enable proper PEP 484 Python type hints as well).

@tetron , what do you think of my assessment?

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