88from planemo import options
99from planemo .cli import command_function
1010from planemo .engine import engine_context
11- from planemo .io import conditionally_captured_io , warn
11+ from planemo .io import warn
1212from planemo .tools import uri_to_path
1313
1414
1818@options .galaxy_run_options ()
1919@options .galaxy_config_options ()
2020@options .galaxy_cwl_root_option ()
21- @options .cwl_conformance_test ()
2221@options .run_output_directory_option ()
2322@options .run_output_json_option ()
2423@options .engine_options ()
@@ -29,32 +28,21 @@ def cli(ctx, uri, job_path, **kwds):
2928 \b
3029 % planemo run cat1-tool.cwl cat-job.json
3130 """
32- path = DEFAULT_TOOL_LOCATION_FETCHER . to_tool_path ( uri )
31+ path = uri_to_path ( ctx , uri )
3332 kwds ["cwl" ] = path .endswith (".cwl" )
34- conformance_test = kwds .get ("conformance_test" , False )
3533
36- with conditionally_captured_io (conformance_test ):
37- with engine_context (ctx , ** kwds ) as engine :
38- run_result = engine .run (path , job_path )
34+ with engine_context (ctx , ** kwds ) as engine :
35+ run_result = engine .run (path , job_path )
3936
4037 if not run_result .was_successful :
4138 warn ("Run failed [%s]" % str (run_result ))
4239 ctx .exit (1 )
4340
44- if conformance_test :
45- if hasattr (run_result , "cwl_command_state" ):
46- command_state = run_result .cwl_command_state
47- dumped_json = json .dumps (command_state )
48- if hasattr (run_result , "galaxy_paths" ):
49- for (local_path , galaxy_path ) in run_result .galaxy_paths :
50- dumped_json = dumped_json .replace (galaxy_path , local_path )
51- print (dumped_json )
52- else :
53- outputs_dict = run_result .outputs_dict
54- print (outputs_dict )
55- output_json = kwds .get ("output_json" , None )
56- if output_json :
57- with open (output_json , "w" ) as f :
58- json .dump (outputs_dict , f )
41+ outputs_dict = run_result .outputs_dict
42+ print (outputs_dict )
43+ output_json = kwds .get ("output_json" , None )
44+ if output_json :
45+ with open (output_json , "w" ) as f :
46+ json .dump (outputs_dict , f )
5947
6048 return 0
0 commit comments