comparison toolfactory/rgToolFactory2.py @ 138:1dba6c7687a9 draft

Uploaded
author fubar
date Wed, 14 Apr 2021 07:05:22 +0000
parents 63d15caea378
children 6b414af9ca11
comparison
equal deleted inserted replaced
137:63d15caea378 138:1dba6c7687a9
1042 different call if in the biocontainer - see above 1042 different call if in the biocontainer - see above
1043 and for generating test outputs if command or test overrides are 1043 and for generating test outputs if command or test overrides are
1044 supplied test outputs are sent to repdir for display 1044 supplied test outputs are sent to repdir for display
1045 """ 1045 """
1046 penv = os.environ 1046 penv = os.environ
1047 pconfig = os.path.join(self.args.tool_dir,'.planemo.yml') 1047 pconfig = os.path.join(self.args.tool_dir, '.planemo.yml')
1048 penv["PLANEMO_GLOBAL_CONFIG_PATH"] = pconfig 1048 penv["PLANEMO_GLOBAL_CONFIG_PATH"] = pconfig
1049 self.set_planemo_galaxy_root(self.args.galaxy_root,config_path=pconfig) 1049 self.set_planemo_galaxy_root(self.args.galaxy_root, config_path=pconfig)
1050 xreal = "%s.xml" % self.tool_name 1050 xreal = "%s.xml" % self.tool_name
1051 tool_test_path = os.path.join( 1051 tool_test_path = os.path.join(
1052 self.repdir, f"{self.tool_name}_planemo_test_report.html" 1052 self.repdir, f"{self.tool_name}_planemo_test_report.html"
1053 ) 1053 )
1054 if os.path.exists(self.tlog): 1054 if os.path.exists(self.tlog):
1069 os.path.abspath(xreal), 1069 os.path.abspath(xreal),
1070 ] 1070 ]
1071 p = subprocess.run( 1071 p = subprocess.run(
1072 cll, 1072 cll,
1073 shell=False, 1073 shell=False,
1074 env = penv, 1074 env=penv,
1075 cwd=self.tooloutdir, 1075 cwd=self.tooloutdir,
1076 stderr=tout, 1076 stderr=tout,
1077 stdout=tout, 1077 stdout=tout,
1078 ) 1078 )
1079 tout.close() 1079 tout.close()
1080 return p.returncode 1080 return p.returncode
1081 1081
1082 def set_planemo_galaxy_root(self, galaxyroot='/galaxy-central', config_path=".planemo.yml"): 1082 def set_planemo_galaxy_root(self, galaxyroot='/galaxy-central', config_path=".planemo.yml"):
1083 # bug in planemo - bogus '--dev-wheels' passed to run_tests.sh as at april 2021 - need a fiddled copy so it is ignored until fixed 1083 # bug in planemo - bogus '--dev-wheels' passed to run_tests.sh as at april 2021 - need a fiddled copy so it is ignored until fixed
1084 CONFIG_TEMPLATE = f"""## Planemo Global Configuration File. 1084 CONFIG_TEMPLATE = """## Planemo Global Configuration File.
1085 ## Everything in this file is completely optional - these values can all be 1085 ## Everything in this file is completely optional - these values can all be
1086 ## configured via command line options for the corresponding commands. 1086 ## configured via command line options for the corresponding commands.
1087 1087
1088 ## Specify a default galaxy_root for test and server commands here. 1088 ## Specify a default galaxy_root for test and server commands here.
1089 galaxy_root: %s 1089 galaxy_root: %s