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

ArraySchema.items does need typeDSL after all #1515

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mr-c
Copy link
Member

@mr-c mr-c commented Sep 9, 2021

  • wait for ratification of CWL v1.2.1

@tetron I think I was too tired when I tested this before; here is a simpler example!

@mr-c mr-c requested a review from tetron September 9, 2021 13:55
@mr-c
Copy link
Member Author

mr-c commented Sep 9, 2021

Here is the log from running the rests without the fix:

[gw0] linux -- Python 3.9.7 /home/michael/cwltool/env3.9/bin/python3

version = '1_0'

    @pytest.mark.parametrize("version", ["1_0", "1_1", "1_2"])
    def test_array_items_typedsl(version) -> None:
        """Demonstrate that 'type: array, items: SomeType[]' works."""
        err_code, _, stderr = get_main_output(
            [
                get_data(f"tests/wf/nested_typedsl_v{version}.cwl"),
                get_data("tests/wf/nested_typedsl_job.yml"),
            ]
        )
>       assert err_code == 0
E       assert 1 == 0
E         +1
E         -0

tests/test_examples.py:1601: AssertionError
----------------------------------------------------------------------------- Captured log call -----------------------------------------------------------------------------
INFO     cwltool:main.py:973  3.1.20210906152048
INFO     cwltool:load_tool.py:101 Resolved '/home/michael/cwltool/tests/wf/nested_typedsl_v1_0.cwl' to 'file:///home/michael/cwltool/tests/wf/nested_typedsl_v1_0.cwl'
ERROR    cwltool:main.py:1142 Tool definition failed validation:
tests/wf/nested_typedsl_v1_0.cwl:5:1: checking field `inputs`
tests/wf/nested_typedsl_v1_0.cwl:6:3:   checking object `tests/wf/nested_typedsl_v1_0.cwl#cat_in`
tests/wf/nested_typedsl_v1_0.cwl:7:5:     Field `items` references unknown identifier `File[]`,
                                          tried
                                          file:///home/michael/cwltool/tests/wf/nested_typedsl_v1_0.cwl#File[]
                                          checking field `type`
tests/wf/nested_typedsl_v1_0.cwl:9:7:       Field `items` references unknown identifier `File[]`,
                                            tried
                                            file:///home/michael/cwltool/tests/wf/nested_typedsl_v1_0.cwl#File[]
_______________________________________________________________________ test_array_items_typedsl[1_2] _______________________________________________________________________
[gw2] linux -- Python 3.9.7 /home/michael/cwltool/env3.9/bin/python3

version = '1_2'

    @pytest.mark.parametrize("version", ["1_0", "1_1", "1_2"])
    def test_array_items_typedsl(version) -> None:
        """Demonstrate that 'type: array, items: SomeType[]' works."""
        err_code, _, stderr = get_main_output(
            [
                get_data(f"tests/wf/nested_typedsl_v{version}.cwl"),
                get_data("tests/wf/nested_typedsl_job.yml"),
            ]
        )
>       assert err_code == 0
E       assert 1 == 0
E         +1
E         -0

tests/test_examples.py:1601: AssertionError
----------------------------------------------------------------------------- Captured log call -----------------------------------------------------------------------------
INFO     cwltool:main.py:973  3.1.20210906152048
INFO     cwltool:load_tool.py:101 Resolved '/home/michael/cwltool/tests/wf/nested_typedsl_v1_2.cwl' to 'file:///home/michael/cwltool/tests/wf/nested_typedsl_v1_2.cwl'
ERROR    cwltool:main.py:1142 Tool definition failed validation:
tests/wf/nested_typedsl_v1_2.cwl:5:1: checking field `inputs`
tests/wf/nested_typedsl_v1_2.cwl:6:3:   checking object `tests/wf/nested_typedsl_v1_2.cwl#cat_in`
tests/wf/nested_typedsl_v1_2.cwl:7:5:     Field `items` references unknown identifier `File[]`,
                                          tried
                                          file:///home/michael/cwltool/tests/wf/nested_typedsl_v1_2.cwl#File[]
                                          checking field `type`
tests/wf/nested_typedsl_v1_2.cwl:9:7:       Field `items` references unknown identifier `File[]`,
                                            tried
                                            file:///home/michael/cwltool/tests/wf/nested_typedsl_v1_2.cwl#File[]
_______________________________________________________________________ test_array_items_typedsl[1_1] _______________________________________________________________________
[gw1] linux -- Python 3.9.7 /home/michael/cwltool/env3.9/bin/python3

version = '1_1'

    @pytest.mark.parametrize("version", ["1_0", "1_1", "1_2"])
    def test_array_items_typedsl(version) -> None:
        """Demonstrate that 'type: array, items: SomeType[]' works."""
        err_code, _, stderr = get_main_output(
            [
                get_data(f"tests/wf/nested_typedsl_v{version}.cwl"),
                get_data("tests/wf/nested_typedsl_job.yml"),
            ]
        )
>       assert err_code == 0
E       assert 1 == 0
E         +1
E         -0

tests/test_examples.py:1601: AssertionError
----------------------------------------------------------------------------- Captured log call -----------------------------------------------------------------------------
INFO     cwltool:main.py:973  3.1.20210906152048
INFO     cwltool:load_tool.py:101 Resolved '/home/michael/cwltool/tests/wf/nested_typedsl_v1_1.cwl' to 'file:///home/michael/cwltool/tests/wf/nested_typedsl_v1_1.cwl'
ERROR    cwltool:main.py:1142 Tool definition failed validation:
tests/wf/nested_typedsl_v1_1.cwl:5:1: checking field `inputs`
tests/wf/nested_typedsl_v1_1.cwl:6:3:   checking object `tests/wf/nested_typedsl_v1_1.cwl#cat_in`
tests/wf/nested_typedsl_v1_1.cwl:7:5:     Field `items` references unknown identifier `File[]`,
                                          tried
                                          file:///home/michael/cwltool/tests/wf/nested_typedsl_v1_1.cwl#File[]
                                          checking field `type`
tests/wf/nested_typedsl_v1_1.cwl:9:7:       Field `items` references unknown identifier `File[]`,
                                            tried
                                            file:///home/michael/cwltool/tests/wf/nested_typedsl_v1_1.cwl#File[]

@mr-c mr-c force-pushed the arrayschema_typedsl_needed branch from ba39d22 to 36cf29d Compare September 9, 2021 13:59
@codecov
Copy link

codecov bot commented Sep 9, 2021

Codecov Report

Merging #1515 (bed518b) into main (6af9932) will decrease coverage by 10.99%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #1515       +/-   ##
===========================================
- Coverage   66.45%   55.46%   -11.00%     
===========================================
  Files          93       47       -46     
  Lines       16541     8294     -8247     
  Branches     4390     2160     -2230     
===========================================
- Hits        10992     4600     -6392     
+ Misses       4401     3147     -1254     
+ Partials     1148      547      -601     
Impacted Files Coverage Δ
cwltool/utils.py
cwltool/cuda.py
cwltool/builder.py
cwltool/pathmapper.py
cwltool/checker.py
cwltool/job.py
cwltool/cwlviewer.py
cwltool/context.py
cwltool/sandboxjs.py
cwltool/cwlrdf.py
... and 36 more

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 6af9932...bed518b. Read the comment docs.

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

Successfully merging this pull request may close these issues.

1 participant