changeset 7:312eb2aaf313 draft

Uploaded
author fubar_too
date Mon, 21 Jun 2021 04:18:59 +0000
parents 5bf1cedca36c
children 7596aa302d60
files toolfactory/ToolFactory.py toolfactory/ToolFactory.xml
diffstat 2 files changed, 10 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/toolfactory/ToolFactory.py	Wed Jun 09 03:14:44 2021 +0000
+++ b/toolfactory/ToolFactory.py	Mon Jun 21 04:18:59 2021 +0000
@@ -134,7 +134,7 @@
         self.is_positional = self.args.parampass == "positional"
         if self.args.sysexe:
             if " " in self.args.sysexe:
-                self.executeme = self.args.sysexe.split(" ")
+                self.executeme = shlex.split(self.args.sysexe)
             else:
                 self.executeme = [
                     self.args.sysexe,
@@ -473,7 +473,7 @@
             if self.is_positional:
                 if p["origCL"].upper() == "STDIN":
                     aninput.positional = 9999998
-                    aninput.command_line_override = "> $%s" % newname
+                    aninput.command_line_override = "< $%s" % newname
                 else:
                     aninput.positional = int(p["origCL"])
                     aninput.command_line_override = "$%s" % newname
@@ -865,7 +865,7 @@
     a("--collection", action="append", default=[])
     a("--include_tests", default=False, action="store_true")
     a("--install_flag", action = "store_false", default=True)
-    a("--admin_only", default=False, action="store_true")
+    a("--admin_only", default=True, action="store_true")
     a("--untested_tool_out", default=None)
     a("--local_tools", default="tools")  # relative to $__root_dir__
     a("--tool_conf_path", default="config/tool_conf.xml")  # relative to $__root_dir__
@@ -876,7 +876,7 @@
 admin adds %s to "admin_users" in the galaxy.yml Galaxy configuration file'
             % (args.bad_user, args.bad_user)
         )
-    assert args.tool_name, "## Tool Factory expects a tool name - eg --tool_name=DESeq"
+    assert args.tool_name, "## This ToolFactory cannot build a tool without a tool name. Please supply one."
     tf = Tool_Factory(args)
     tf.writeShedyml()
     tf.makeTool()
--- a/toolfactory/ToolFactory.xml	Wed Jun 09 03:14:44 2021 +0000
+++ b/toolfactory/ToolFactory.xml	Mon Jun 21 04:18:59 2021 +0000
@@ -86,6 +86,10 @@
                </options>
             </param>
             <param name="input_label" type="text" value="" label="This will become the user prompt for the form so please make it informative" >
+                <sanitizer invalid_char="_">
+                <valid initial="string.printable" >
+                </valid>
+              </sanitizer>
             </param>
             <param name="input_help" type="text" value="" label="This will become help text on the form." >
             </param>
@@ -98,7 +102,7 @@
              help="New history items output by the executable to appear in the user history after the tool runs. The name will become a history item for users of the new tool you are making containing one of it's outputs">
             <param name="history_name" type="text" label="Output Name" optional="false"
               help="Name used for this output in history. No spaces! Argparse will also use this name as --[name]">
-              <sanitizer invalid_char=" ">
+              <sanitizer invalid_char="_">
                 <valid initial="string.ascii_letters,string.digits" >
                    <add value="_" />
                 </valid>
@@ -270,6 +274,7 @@
 --galaxy_root "$__root_dir__"
 --tool_dir "$__tool_directory__"
 --admin_only
+
  #end if
 ]]></command>
  <configfiles>