# HG changeset patch
# User ross lazarus ross.lazarus@gmail.com
# Date 1338640833 -36000
# Node ID 71f2ac0eee9587980299cc3f0441f060ae84fc4d
# Parent e09c76551bed96fdadacd5dd4e520c5bace8622a
Updated tarball with some test material - still need code generated...
Completed a round trip test via a local toolshed.
Awsome
diff -r e09c76551bed -r 71f2ac0eee95 rgToolFactory.py
--- a/rgToolFactory.py Sat Jun 02 21:08:57 2012 +1000
+++ b/rgToolFactory.py Sat Jun 02 22:40:33 2012 +1000
@@ -1,11 +1,13 @@
-# rgDynamicScriptWrapper.py
-# derived from
+# rgToolFactory.py
+# derived from
# rgBaseScriptWrapper.py
-# to run some user supplied code
-# extremely dangerous
+# but designed to run arbitrary user supplied code
+# extremely dangerous!!
# trusted users only - private site only
-# a list in the xml is searched - only users in the list can run this tool.
-#
+# a list in the xml is searched for users permitted to run this tool.
+# DO NOT install on a public or important site - local instance only
+# generated tools are fine as they just run normally and their user cannot do anything unusually insecure
+#
# copyright ross lazarus (ross.lazarus@gmail.com) May 2012
#
# all rights reserved
@@ -170,6 +172,15 @@
self.makeXML()
tdir = self.toolname
os.mkdir(tdir)
+ if self.opts.input_tab: # we may have test data?
+ testdir = os.path.join(tdir,'test-data')
+ os.mkdir(testdir) # make tests directory
+ shutil.copyfile(self.opts.input_tab,os.path.join(testdir,'test1_in.tab'))
+ if self.opts.output_tab:
+ shutil.copyfile(self.opts.output_tab,os.path.join(testdir,'test1_out.tab'))
+ if self.opts.make_HTML:
+ shutil.copyfile(self.opts.output_html,os.path.join(testdir,'test1_out.html'))
+ shutil.copyfile(self.opts.tlog,os.path.join(testdir,'test1_out.log'))
shutil.copyfile(self.xmlfile,os.path.join(tdir,self.xmlfile))
shutil.copyfile(self.pyfile,os.path.join(tdir,'%s.py' % self.toolname))
shutil.copyfile(self.sfile,os.path.join(tdir,self.sfile))
diff -r e09c76551bed -r 71f2ac0eee95 rgToolFactory.xml
--- a/rgToolFactory.xml Sat Jun 02 21:08:57 2012 +1000
+++ b/rgToolFactory.xml Sat Jun 02 22:40:33 2012 +1000
@@ -9,7 +9,7 @@
#if $make_HTML.value=="yes" or $factory.make_Tool=="yes":
--output_dir "$html_file.files_path" --output_html "$html_file"
#end if
- #if $input1.value != 'None':
+ #if $input1 != 'None':
--input_tab "$input1"
#end if
#if $make_HTML.value=="yes":
@@ -74,7 +74,7 @@
make_TAB=="yes"
- make_HTML=="yes" or make_Tool=="yes"
+ make_HTML=="yes" or factory.make_Tool=="yes"
@@ -91,21 +91,24 @@
**What it does**
This tool enables a user to paste and submit an arbitrary R/python/perl script to run in Galaxy.
-This is (extremely) insecure. However, once you get the script working on some test data, you can generate a complete ready to run
-Galaxy tool by setting the "Make tool" option to Yes. The resulting tarball will be ready to install
-It will run like as securely as any other Galaxy tool - unlike this one used to generate it.
**Restrictions**
This tool will ONLY work if your user id has been added to the local copy's list of permitted users.
It should only ever be used on a private, personal Galaxy instance and you should edit this tool's source so your local login
-is authorised to use it - == it will not run otherwise ==
+is authorised to use it - *it will not run otherwise*
+
+.. class:: warningmark
+
+**Note to system administrators** Under no circumstances should you allow any user to use this tool unless you really, really trust them to do
+no harm. This tool (extremely) insecure and is only recommended for private/personnal Galaxy instances.
-**Note to system administrators**
-Under no circumstances should you allow any user to use this tool unless you really, really trust them to do
-no harm.
+Once you get the script working on some test data, you can generate a complete ready to run
+Galaxy tool by setting the "Make tool" option to Yes. The resulting tarball will be ready to install
+It will run just as securely as any other normal Galaxy tool - unlike this one used to generate it.
-**Use on public servers**
-is STRONGLY discouraged for obvious reasons
+.. class:: warningmark
+
+**Use on public servers** is STRONGLY discouraged for obvious reasons
**Scripting conventions**
The pasted script will be executed.
@@ -137,7 +140,10 @@
heatmap(bar,main='Random Heatmap')
dev.off()
-
+**Attribution**
+Copyright ross lazarus (ross.lazarus at gmail stop com) May 2012
+All rights reserved
+Licensed under the LGPL for your pleasure