diff toolfactory/galaxyxml/tool/import_xml.py @ 38:a30536c100bf draft

Updated history outputs
author fubar
date Wed, 12 Aug 2020 01:43:46 -0400
parents ce2b1f8ea68d
children
line wrap: on
line diff
--- a/toolfactory/galaxyxml/tool/import_xml.py	Mon Aug 10 23:25:51 2020 -0400
+++ b/toolfactory/galaxyxml/tool/import_xml.py	Wed Aug 12 01:43:46 2020 -0400
@@ -1,5 +1,6 @@
 import logging
 import xml.etree.ElementTree as ET
+
 import galaxyxml.tool as gxt
 import galaxyxml.tool.parameters as gxtp
 
@@ -115,9 +116,7 @@
             value = req.text
             if req.tag == "requirement":
                 version = req.attrib.get("version", None)
-                tool.requirements.append(
-                    gxtp.Requirement(req_type, value, version=version)
-                )
+                tool.requirements.append(gxtp.Requirement(req_type, value, version=version))
             elif req.tag == "container":
                 tool.requirements.append(gxtp.Container(req_type, value))
             else:
@@ -350,9 +349,7 @@
         """
         root.append(
             gxtp.SelectOption(
-                option.attrib.get("value", None),
-                option.text,
-                selected=option.attrib.get("selected", False),
+                option.attrib.get("value", None), option.text, selected=option.attrib.get("selected", False)
             )
         )
 
@@ -432,13 +429,9 @@
         # Deal with child nodes (usually option and options)
         for sel_child in sel_param:
             try:
-                getattr(self, "_load_{}_select".format(sel_child.tag))(
-                    select_param, sel_child
-                )
+                getattr(self, "_load_{}_select".format(sel_child.tag))(select_param, sel_child)
             except AttributeError:
-                logger.warning(
-                    sel_child.tag + " tag is not processed for <param type='select'>."
-                )
+                logger.warning(sel_child.tag + " tag is not processed for <param type='select'>.")
         root.append(select_param)
 
     def _load_param(self, root, param_root):
@@ -539,12 +532,7 @@
             try:
                 getattr(self, "_load_{}".format(inp_child.tag))(root, inp_child)
             except AttributeError:
-                logger.warning(
-                    inp_child.tag
-                    + " tag is not processed for <"
-                    + inputs_root.tag
-                    + "> tag."
-                )
+                logger.warning(inp_child.tag + " tag is not processed for <" + inputs_root.tag + "> tag.")
 
 
 class OutputsParser(object):
@@ -589,9 +577,7 @@
         for chfmt_child in chfmt_root:
             change_format.append(
                 gxtp.ChangeFormatWhen(
-                    chfmt_child.attrib["input"],
-                    chfmt_child.attrib["format"],
-                    chfmt_child.attrib["value"],
+                    chfmt_child.attrib["input"], chfmt_child.attrib["format"], chfmt_child.attrib["value"]
                 )
             )
         root.append(change_format)
@@ -618,9 +604,7 @@
             try:
                 getattr(self, "_load_{}".format(coll_child.tag))(collection, coll_child)
             except AttributeError:
-                logger.warning(
-                    coll_child.tag + " tag is not processed for <collection>."
-                )
+                logger.warning(coll_child.tag + " tag is not processed for <collection>.")
         outputs_root.append(collection)
 
     def _load_discover_datasets(self, root, disc_root):
@@ -725,7 +709,5 @@
                 try:
                     getattr(self, "_load_{}".format(test_child.tag))(test, test_child)
                 except AttributeError:
-                    logger.warning(
-                        test_child.tag + " tag is not processed within <test>."
-                    )
+                    logger.warning(test_child.tag + " tag is not processed within <test>.")
             root.append(test)