# HG changeset patch # User fubar # Date 1618893362 0 # Node ID ecd1d283b5a7a4f57aac5eb0932de21da8a85f23 # Parent 470d3e3095083770ca96500924b4bfeafa6a5d19 Uploaded diff -r 470d3e309508 -r ecd1d283b5a7 toolfactory/rgToolFactory2.py --- a/toolfactory/rgToolFactory2.py Sun Apr 18 08:30:25 2021 +0000 +++ b/toolfactory/rgToolFactory2.py Tue Apr 20 04:36:02 2021 +0000 @@ -1044,13 +1044,21 @@ supplied test outputs are sent to repdir for display """ penv = os.environ - # ourdir = os.getcwd() - # print('########## ourdir=',ourdir,'gr=',self.args.galaxy_root) - # pconfig = os.path.join(ourdir,'planemo', '.planemo.yml') - # penv["PLANEMO_GLOBAL_CONFIG_PATH"] = pconfig - # os.mkdir(os.path.join(ourdir,'planemo')) - # penv["HOME"] = os.path.join(ourdir,'home') - # os.mkdir(os.path.join(ourdir,'home')) + phome = penv['HOME'] + isDocker = os.path.exists('/.dockerenv') + if isDocker: # use the volume if it exists + phome = '/home/planemo' + if os.path.exists(phome): # is mounted + home = phome + else: + home = '/tmp/planemo' # this will be brutal but otherwise /home/galaxy + os.mkdir('/tmp/planemo') + penv["HOME"] = phome + path = penv['PATH'] + penv['PATH'] = '%s:%s' % (phome,path) + print(f"#### set home to {phome} with path={penv['PATH']}") + #pconfig = os.path.join(phome,'.planemo.yml') + #penv["PLANEMO_GLOBAL_CONFIG_PATH"] = pconfig # self.set_planemo_galaxy_root(self.args.galaxy_root, config_path=pconfig) xreal = "%s.xml" % self.tool_name tool_test_path = os.path.join( @@ -1069,15 +1077,15 @@ os.path.abspath(self.testdir), "--test_output", os.path.abspath(tool_test_path), - "--galaxy_root", - self.args.galaxy_root, + ## "--galaxy_root", + ## self.args.galaxy_root, "--update_test_data", os.path.abspath(xreal), ] p = subprocess.run( cll, + env = penv, shell=False, - env=penv, cwd=self.tooloutdir, stderr=tout, stdout=tout, @@ -1115,7 +1123,6 @@ f.write(CONFIG_TEMPLATE % galaxyroot) - def main(): """ This is a Galaxy wrapper. diff -r 470d3e309508 -r ecd1d283b5a7 toolfactory/rgToolFactory2.xml --- a/toolfactory/rgToolFactory2.xml Sun Apr 18 08:30:25 2021 +0000 +++ b/toolfactory/rgToolFactory2.xml Tue Apr 20 04:36:02 2021 +0000 @@ -64,8 +64,8 @@
- + - - + + @@ -99,15 +99,15 @@ - - + + - - + + @@ -127,14 +127,14 @@
-
+
- +