def test_load_preset(self): xml = IO.schema_workflow_options_to_xml(self._to_opts()) preset_xml = get_temp_file(suffix="_preset.xml") log.debug(preset_xml) with open(preset_xml, 'w') as w: w.write(str(xml)) preset_record = IO.parse_pipeline_preset_xml(preset_xml) workflow_level_opts = preset_record.to_workflow_level_opt() self.assertTrue(len(workflow_level_opts), len(self._to_opts()))
def _args_run_show_workflow_level_options(args): from pbsmrtpipe.pb_io import REGISTERED_WORKFLOW_OPTIONS _print_option_schemas(REGISTERED_WORKFLOW_OPTIONS) output_file = args.output_preset_xml if output_file is not None: xml = IO.schema_workflow_options_to_xml(REGISTERED_WORKFLOW_OPTIONS) with open(output_file, 'w') as w: w.write(str(xml)) log.info("wrote options to {x}".format(x=output_file)) return 0
def test_to_xml(self): wopts = self._to_opts() xml = IO.schema_workflow_options_to_xml(wopts) log.debug(xml) self.assertIsNotNone(xml)