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

Optional types #13

Closed illusional closed 5 years ago

illusional commented 5 years ago

My submission for #12 (no optional types), moves the type checking to separate function in preparation for checking arrays and other types referenced from the [CommandInputParameter documentation], (https://www.commonwl.org/v1.0/CommandLineTool.html#CommandInputParameter).

illusional commented 5 years ago

Although my local tests passed, the Travis build failed because of an extraneous quotation mark that wraps the int? on ln 4:30 of the generated output (int? -> 'int?')

!/usr/bin/env cwl-runner\n\nclass: Workflow\ncwlVersion: v1.0\ninputs:\n INTEGER: {id: INTEGER, type: 'int?'}\noutputs:\n step_OUTP ...

I will remove this extra test I originally added because it's not valuable to the change that I made, which is covered by test_unit_typing.py.

codecov[bot] commented 5 years ago

Codecov Report

Merging #13 into master will increase coverage by 0.96%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #13      +/-   ##
==========================================
+ Coverage   76.28%   77.25%   +0.96%     
==========================================
  Files           6        6              
  Lines         544      554      +10     
==========================================
+ Hits          415      428      +13     
+ Misses        129      126       -3
Impacted Files Coverage Δ
cwlgen/elements.py 100% <100%> (+10%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 39a8e51...d1a07cd. Read the comment docs.