1+ from planemo .io import conditionally_captured_io
2+ from planemo import galaxy_serve
3+ from .client import run_cwl_tool
4+ from planemo import io
5+
6+ from cwltool .main import main
17
28
39def run_galaxy (ctx , path , job_path , ** kwds ):
@@ -6,11 +12,23 @@ def run_galaxy(ctx, path, job_path, **kwds):
612 with conditionally_captured_io (conformance_test ):
713 with galaxy_serve .serve_daemon (ctx , [path ], ** kwds ) as config :
814 try :
9- cwl_run = cwl . run_cwl_tool (path , job_path , config , ** kwds )
15+ cwl_run = run_cwl_tool (path , job_path , config , ** kwds )
1016 except Exception :
1117 io .warn ("Problem running cwl tool..." )
1218 print (config .log_contents )
1319 raise
1420
1521 print (cwl_run .cwl_command_state )
1622 return 0
23+
24+
25+ def run_cwltool (ctx , path , job_path , ** kwds ):
26+ args = []
27+ if kwds .get ("conformance_test" , False ):
28+ args .append ("--conformance-test" )
29+ if ctx .verbose :
30+ args .append ("--verbose" )
31+
32+ args .extend ([path , job_path ])
33+ ctx .vlog ("Calling cwltool with arguments %s" % args )
34+ return main (args )
0 commit comments