diff --git a/MANIFEST.in b/MANIFEST.in index 83b8c3fa5..4f378c444 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -64,6 +64,7 @@ include cwltool/schemas/v1.3.0-dev1/salad/schema_salad/metaschema/*.md include cwltool/extensions.yml include cwltool/extensions-v1.1.yml include cwltool/extensions-v1.2.yml +include cwltool/extensions-v1.3.yml include cwltool/jshint/jshint_wrapper.js include cwltool/jshint/jshint.js include cwltool/hello.simg diff --git a/cwltool/main.py b/cwltool/main.py index 4cbf356c7..2db2c2957 100755 --- a/cwltool/main.py +++ b/cwltool/main.py @@ -645,9 +645,11 @@ def setup_schema( ext10 = files("cwltool").joinpath("extensions.yml").read_text("utf-8") ext11 = files("cwltool").joinpath("extensions-v1.1.yml").read_text("utf-8") ext12 = files("cwltool").joinpath("extensions-v1.2.yml").read_text("utf-8") + ext13 = files("cwltool").joinpath("extensions-v1.3.yml").read_text("utf-8") use_custom_schema("v1.0", "http://commonwl.org/cwltool", ext10) use_custom_schema("v1.1", "http://commonwl.org/cwltool", ext11) use_custom_schema("v1.2", "http://commonwl.org/cwltool", ext12) + use_custom_schema("v1.3.0-dev1", "http://commonwl.org/cwltool", ext13) use_custom_schema("v1.2.0-dev1", "http://commonwl.org/cwltool", ext11) use_custom_schema("v1.2.0-dev2", "http://commonwl.org/cwltool", ext11) use_custom_schema("v1.2.0-dev3", "http://commonwl.org/cwltool", ext11) @@ -655,6 +657,7 @@ def setup_schema( use_standard_schema("v1.0") use_standard_schema("v1.1") use_standard_schema("v1.2") + use_standard_schema("v1.3.0-dev1") use_standard_schema("v1.2.0-dev1") use_standard_schema("v1.2.0-dev2") use_standard_schema("v1.2.0-dev3") diff --git a/tests/test_ext.py b/tests/test_ext.py index 0d2665ca1..58a50b25b 100644 --- a/tests/test_ext.py +++ b/tests/test_ext.py @@ -285,3 +285,10 @@ def test_ext_validation_no_namespace_warning() -> None: "URI prefix 'cwltool' of 'cwltool:loop' not recognized, are you " "missing a $namespaces section?" ) not in stderr + + +def test_ext_in_dollarsign_graph() -> None: + error_code, stdout, stderr = get_main_output( + ["--validate", "--enable-ext", get_data("tests/wf/hello_gpu.cwl")] + ) + assert error_code == 0 diff --git a/tests/wf/hello_gpu.cwl b/tests/wf/hello_gpu.cwl new file mode 100644 index 000000000..39cb89582 --- /dev/null +++ b/tests/wf/hello_gpu.cwl @@ -0,0 +1,52 @@ +#!/usr/bin/env cwl-runner +cwlVersion: v1.0 + +$graph: + +- class: Workflow + id: main + label: Test GPU + doc: | + Print GPU info. + s:keywords: gpu + s:softwareVersion: 0.1.0 + + inputs: [] + + outputs: + echo: + type: File + outputSource: node_hello/echo + + steps: + node_hello: + in: [] + run: '#hello-cl' + out: + - echo + +- class: CommandLineTool + id: hello-cl + s:softwareVersion: 1.0.0 + + baseCommand: nvidia-smi + arguments: [] + + requirements: + cwltool:CUDARequirement: + cudaVersionMin: "12.0" + cudaComputeCapability: "7.5" + cudaDeviceCountMin: 1 + cudaDeviceCountMax: 4 + inputs: [] + + outputs: + echo: + type: File + outputBinding: + glob: output.txt + stdout: output.txt + +$namespaces: + cwltool: http://commonwl.org/cwltool# + s: https://schema.org/