24
24
25
25
_logger = logging .getLogger ("cwltool" )
26
26
27
+ jobloaderctx = {
28
+ u"cwl" : "https://w3id.org/cwl/cwl#" ,
29
+ u"path" : {u"@type" : u"@id" },
30
+ u"location" : {u"@type" : u"@id" },
31
+ u"format" : {u"@type" : u"@id" },
32
+ u"id" : u"@id"
33
+ }
27
34
28
35
def fetch_document (argsworkflow , # type: Union[Text, dict[Text, Any]]
29
36
resolver = None , # type: Callable[[Loader, Union[Text, dict[Text, Any]]], Text]
@@ -33,7 +40,7 @@ def fetch_document(argsworkflow, # type: Union[Text, dict[Text, Any]]
33
40
# type: (...) -> Tuple[Loader, CommentedMap, Text]
34
41
"""Retrieve a CWL document."""
35
42
36
- document_loader = Loader ({ "cwl" : "https://w3id.org/cwl/cwl#" , "id" : "@id" } ,
43
+ document_loader = Loader (jobloaderctx ,
37
44
fetcher_constructor = fetcher_constructor )
38
45
39
46
uri = None # type: Text
@@ -143,6 +150,7 @@ def validate_document(document_loader, # type: Loader
143
150
jobobj = None
144
151
if "cwl:tool" in workflowobj :
145
152
jobobj , _ = document_loader .resolve_all (workflowobj , uri )
153
+ print "ZZZZZ" , jobobj
146
154
uri = urllib .parse .urljoin (uri , workflowobj ["https://w3id.org/cwl/cwl#tool" ])
147
155
del cast (dict , jobobj )["https://w3id.org/cwl/cwl#tool" ]
148
156
workflowobj = fetch_document (uri , fetcher_constructor = fetcher_constructor )[1 ]
0 commit comments