comparison toolfactory/rgToolFactory2.py @ 148:470d3e309508 draft

Uploaded
author fubar
date Sun, 18 Apr 2021 08:30:25 +0000
parents 4e83512cb72c
children ecd1d283b5a7
comparison
equal deleted inserted replaced
147:4e83512cb72c 148:470d3e309508
1046 penv = os.environ 1046 penv = os.environ
1047 # ourdir = os.getcwd() 1047 # ourdir = os.getcwd()
1048 # print('########## ourdir=',ourdir,'gr=',self.args.galaxy_root) 1048 # print('########## ourdir=',ourdir,'gr=',self.args.galaxy_root)
1049 # pconfig = os.path.join(ourdir,'planemo', '.planemo.yml') 1049 # pconfig = os.path.join(ourdir,'planemo', '.planemo.yml')
1050 # penv["PLANEMO_GLOBAL_CONFIG_PATH"] = pconfig 1050 # penv["PLANEMO_GLOBAL_CONFIG_PATH"] = pconfig
1051 # penv["HOME"] = ourdir 1051 # os.mkdir(os.path.join(ourdir,'planemo'))
1052 # # self.set_planemo_galaxy_root(self.args.galaxy_root, config_path=pconfig) 1052 # penv["HOME"] = os.path.join(ourdir,'home')
1053 # os.mkdir(os.path.join(ourdir,'home'))
1054 # self.set_planemo_galaxy_root(self.args.galaxy_root, config_path=pconfig)
1053 xreal = "%s.xml" % self.tool_name 1055 xreal = "%s.xml" % self.tool_name
1054 tool_test_path = os.path.join( 1056 tool_test_path = os.path.join(
1055 self.repdir, f"{self.tool_name}_planemo_test_report.html" 1057 self.repdir, f"{self.tool_name}_planemo_test_report.html"
1056 ) 1058 )
1057 if os.path.exists(self.tlog): 1059 if os.path.exists(self.tlog):
1081 stdout=tout, 1083 stdout=tout,
1082 ) 1084 )
1083 tout.close() 1085 tout.close()
1084 return p.returncode 1086 return p.returncode
1085 1087
1086 def set_planemo_galaxy_root(self, galaxyroot, config_path=".planemo.yml"): 1088 def set_planemo_galaxy_root(self, galaxyroot, config_path):
1087 # planemo tries to write to ~/.planemo - trying to convince it otherwise 1089 # planemo tries to write to ~/.planemo - trying to convince it otherwise
1088 CONFIG_TEMPLATE = """## Planemo Global Configuration File. 1090 CONFIG_TEMPLATE = """## Planemo Global Configuration File.
1089 ## Everything in this file is completely optional - these values can all be 1091 ## Everything in this file is completely optional - these values can all be
1090 ## configured via command line options for the corresponding commands. 1092 ## configured via command line options for the corresponding commands.
1091 ## Specify a default galaxy_root for test and server commands here. 1093 ## Specify a default galaxy_root for test and server commands here.