예제 #1
0
 def getToolDescription():
     from proto.HtmlCore import HtmlCore
     core = HtmlCore()
     core.smallHeader("General description")
     core.paragraph("This tool is used to try out ProTo tools that have "
                    "not been installed as separate tools in the tool "
                    "menu. This is typically used for development "
                    "purposes, so that one can polish the tool until it "
                    "is finished for deployment in the tool menu. "
                    "When a tool is installed into the menu, the tool "
                    "disappears from the tool list in this tool."
                    "The logic for inclusion in the list is that there "
                    "exists a Python module with a class that inherits "
                    "from GeneralGuiTool, without there existing "
                    "a Galaxy xml file for the tool.")
     core.paragraph(
         "Note: when the list of tools is generated, modules "
         "under the tool directory that does not contain "
         "ProTo tool classes are stored and excluded from "
         "subsequent runs. This is done to improve loading "
         "times. The hidden tool modules are stored in the "
         '"%s" ' % os.path.basename(HIDDEN_NONTOOL_MODULES_CONFIG_FN) +
         'file in the "config" folder. This file can be manually edited if needed.'
     )
     return str(core)
    def getToolDescription(cls):
        from proto.HtmlCore import HtmlCore
        core = HtmlCore()
        core.smallHeader("General description")
        core.paragraph(
            "This tool is used to install ProTo tools into the tool menu. "
            "The installation process creates a Galaxy tool XML file and "
            "adds the tool to the tool menu (in the 'tool_conf.xml' file). "
            "After execution, the XML file has been generated and added "
            "to the tool configuration file, but Galaxy needs to reload "
            "the tool menu for it to become visible. This is done by a "
            "Galaxy administrator, either from the Admin menu, or from a "
            "link in the output history element from this tool.")
        core.paragraph("Note that the after this tool has been executed "
                       "but before a Galaxy administrator has reloaded the "
                       "tool menu, the tool is not available from neither "
                       "of the 'ProTo tool explorer' tool or from the "
                       "Galaxy menu.")
        core.divider()
        core.smallHeader("Parameters")

        core.descriptionLine("Select tool", "The tool to install.",
                             emphasize=True)
        core.descriptionLine("Tool ID",
                             "The Galaxy tool id for the new tool to be "
                             "created. This is the 'id' argument to the "
                             "<tool> tag in the tool XML file.",
                             emphasize=True)
        core.descriptionLine("Tool name",
                             "The name of the tool as it will appear in the "
                             "tool menu. The tool name will appear as a HTML "
                             "link.", emphasize=True)
        core.descriptionLine("Tool description",
                             "The description of the tool as it will appear "
                             "in the tool menu. The tool description will "
                             "appear directly after the tool name as "
                             "normal text.", emphasize=True)
        core.descriptionLine("Tool XML file",
                             "The path (relative to '%s') and name " %
                             os.path.sep.join([''] + cls._getProtoRelToolDirs(fromBase=True)) +
                             "of the Galaxy tool XML file to be created. "
                             "The tool file can be named anything and be "
                             "placed anywhere (as the 'tool_conf.xml' file "
                             "contains the path to the tool XML file). "
                             "However, we encourage the practice of placing "
                             "the Galaxy tool XML file together with the "
                             "Python module, in the same directory and "
                             "with the same name as tool module (with e.g. "
                             "'ABCTool.xml' instead of 'AbcTool.py').",
                             emphasize=True)
        core.descriptionLine("Select section in tool_conf.xml file",
                             "The section in the tool_conf.xml file where"
                             "the tool should be placed in the menu. "
                             "This corresponds to the first level in the"
                             "tool hierarchy.", emphasize=True)
        return str(core)
 def getToolDescription():
     core = HtmlCore()
     core.smallHeader("General description")
     core.paragraph("This tool is used to dynamically generate a Python "
                    "module defining a new ProTo tool. After tool "
                    "execution, The tool will be available from the "
                    "'ProTo tool explorer' tool for development purposes.")
     core.divider()
     core.smallHeader("Parameters")
     core.descriptionLine(
         "Choose directory for new tool",
         "Hierarchical selection of directory in which to "
         "place the new tool. The directory structure defines "
         "the Python package which is used if one needs to import "
         "the tool. The package name is automatically shown in an info "
         "box according to the selections. It is also possible "
         "to create new directories. Note that the creation of "
         "new directories happens at execution of this tool. ",
         emphasize=True)
     core.descriptionLine("Module/class name",
                          "The name of the Python module (filename) and "
                          "class for the new tool. For historical reasons, "
                          "ProTo uses 'MixedCase' naming for both the "
                          "module and the class. By convention, it is "
                          "advised (but not required) to end the name "
                          "with 'Tool', e.g. 'MyNewTool'. This will create "
                          "a Python module 'MyNewTool.py' with the class "
                          "'MyNewTool', inheriting from "
                          "'proto.GeneralGuiTool'.",
                          emphasize=True)
     core.descriptionLine("Tool name",
                          "A string with the name or title of the tool. "
                          "This will appear on the top of the tool GUI "
                          "as well as being the default value for the "
                          "tool name in the menu (which can be changed "
                          "when installing).",
                          emphasize=True)
     core.descriptionLine("Use template with inline documentation",
                          "The new Python module is based upon a template"
                          "file containing a simple example tool with "
                          "two option boxes (one selection box and one "
                          "text box). There are two such template files, "
                          "one that contains inline documentation of the "
                          "methods and possible choices, and one without "
                          "the documentation. Advanced users could select "
                          "the latter to make the tool code itself shorter "
                          "and more readable.",
                          emphasize=True)
     return str(core)
 def getToolDescription(cls):
     from proto.HtmlCore import HtmlCore
     core = HtmlCore()
     core.smallHeader("General description")
     core.paragraph(
         "This tool is used for debugging when an uninstalled tool does not appear "
         'in the "Explore ProTo tools" tool. This is typically due to an Python '
         "exception being raised at the import the tool module. This tool "
         "lists all modules under the tool directory that cannot be imported "
         "due to an exception. When selecting the tool, a traceback of the "
         'exception is shown. One can also click "Execute" to store the exception '
         "within a history element (which will then become red). This is "
         "useful if one wants to send a bug report for the exception, or if one "
         "wants to keep a backlog of the error messages.")
     return str(core)
예제 #5
0
 def getToolDescription(cls):
     from proto.HtmlCore import HtmlCore
     core = HtmlCore()
     core.smallHeader("General description")
     core.paragraph(
         "This tool is used to hide modules containing ProTo tools from "
         'the "Explore ProTo tools" tool. This is both useful in order to '
         "to reduce the list, and also to reduce the loading times of the "
         "explore tool.")
     core.paragraph(
         "Hidden tool modules are stored in the "
         '"%s" ' % os.path.basename(HIDDEN_MODULES_CONFIG_FN) +
         'file in the "config" folder. This file can be manually edited if needed.'
     )
     return str(core)