Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions cwltool/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -645,16 +645,19 @@ 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)
else:
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")
Expand Down
7 changes: 7 additions & 0 deletions tests/test_ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
52 changes: 52 additions & 0 deletions tests/wf/hello_gpu.cwl
Original file line number Diff line number Diff line change
@@ -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/
Loading