File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 1111from .process import Process
1212
1313
14- def gather (tool : Process , ctx : ContextType ) -> Graph :
14+ def gather (tool : Process , inputs : Any , ctx : ContextType ) -> Graph :
1515 g = Graph ()
1616
1717 def visitor (t : CommentedMap ) -> None :
1818 makerdf (t ["id" ], t , ctx , graph = g )
1919
20+ for inp_name in inputs :
21+ for inp in tool .tool ["inputs" ]:
22+ if inp ["id" ].endswith (f"#{ inp_name } " ):
23+ inp ["rdf:value" ] = inputs [inp_name ]
2024 tool .visit (visitor )
2125 return g
2226
2327
24- def printrdf (wflow : Process , ctx : ContextType , style : str ) -> str :
28+ def printrdf (wflow : Process , inputs : Any , ctx : ContextType , style : str ) -> str :
2529 """Serialize the CWL document into a string, ready for printing."""
26- rdf = gather (wflow , ctx ).serialize (format = style , encoding = "utf-8" )
30+ rdf = gather (wflow , inputs , ctx ).serialize (format = style , encoding = "utf-8" )
2731 if not rdf :
2832 return ""
2933 return str (rdf , "utf-8" )
Original file line number Diff line number Diff line change @@ -1149,7 +1149,9 @@ def main(
11491149
11501150 if args .print_rdf :
11511151 print (
1152- printrdf (tool , loadingContext .loader .ctx , args .rdf_serializer ),
1152+ printrdf (
1153+ tool , job_order_object , loadingContext .loader .ctx , args .rdf_serializer
1154+ ),
11531155 file = stdout ,
11541156 )
11551157 return 0
You can’t perform that action at this time.
0 commit comments