comparison toolfactory/rgToolFactory2.py @ 81:6395be766c2e draft

Uploaded
author fubar
date Wed, 18 Nov 2020 21:47:51 +0000
parents f423a77bc669
children 48acd0708839
comparison
equal deleted inserted replaced
80:f423a77bc669 81:6395be766c2e
1
2 # rgToolFactory.py 1 # rgToolFactory.py
3 # see https://github.com/fubar2/toolfactory 2 # see https://github.com/fubar2/toolfactory
4 # 3 #
5 # copyright ross lazarus (ross stop lazarus at gmail stop com) May 2012 4 # copyright ross lazarus (ross stop lazarus at gmail stop com) May 2012
6 # 5 #
876 875
877 def planemo_test(self, genoutputs=True): 876 def planemo_test(self, genoutputs=True):
878 """planemo is a requirement so is available for testing 877 """planemo is a requirement so is available for testing
879 and for generating test outputs if command or test overrides are supplied 878 and for generating test outputs if command or test overrides are supplied
880 test outputs are sent to repdir for display 879 test outputs are sent to repdir for display
881 planemo test --engine docker_galaxy --database_type docker_postgres --galaxy_root /galaxy-central pyrevpos/pyrevpos.xml 880 planemo test --engine docker_galaxy --galaxy_root /galaxy-central pyrevpos/pyrevpos.xml
881
882 Planemo runs:
883 python ./scripts/functional_tests.py -v --with-nosehtml --html-report-file
884 /export/galaxy-central/database/job_working_directory/000/17/working/TF_run_report_tempdir/tacrev_planemo_test_report.html
885 --with-xunit --xunit-file /tmp/tmpt90p7f9h/xunit.xml --with-structureddata
886 --structured-data-file
887 /export/galaxy-central/database/job_working_directory/000/17/working/tfout/tool_test_output.json functional.test_toolbox
888
889
890 for the planemo-biocontainer,
891 planemo test --conda_dependency_resolution --skip_venv --galaxy_root /galthrow/ rgToolFactory2.xml
892
882 """ 893 """
883 xreal = "%s.xml" % self.tool_name 894 xreal = "%s.xml" % self.tool_name
884 tool_test_path = os.path.join(self.repdir,f"{self.tool_name}_planemo_test_report.html") 895 tool_test_path = os.path.join(self.repdir,f"{self.tool_name}_planemo_test_report.html")
885 if os.path.exists(self.tlog): 896 if os.path.exists(self.tlog):
886 tout = open(self.tlog, "a") 897 tout = open(self.tlog, "a")
889 if genoutputs: 900 if genoutputs:
890 dummy, tfile = tempfile.mkstemp() 901 dummy, tfile = tempfile.mkstemp()
891 cll = [ 902 cll = [
892 "planemo", 903 "planemo",
893 "test", 904 "test",
905 "--conda_dependency_resolution",
894 "--test_data", os.path.abspath(self.testdir), 906 "--test_data", os.path.abspath(self.testdir),
895 "--test_output", os.path.abspath(tool_test_path), 907 "--test_output", os.path.abspath(tool_test_path),
908 "--skip_venv",
896 "--galaxy_root", 909 "--galaxy_root",
897 self.args.galaxy_root, 910 self.args.galaxy_root,
898 "--update_test_data", 911 "--update_test_data",
899 os.path.abspath(xreal), 912 os.path.abspath(xreal),
900 ] 913 ]
908 921
909 else: 922 else:
910 cll = [ 923 cll = [
911 "planemo", 924 "planemo",
912 "test", 925 "test",
926 "--conda_dependency_resolution",
913 "--test_data", os.path.abspath(self.testdir), 927 "--test_data", os.path.abspath(self.testdir),
914 "--test_output", os.path.abspath(tool_test_path), 928 "--test_output", os.path.abspath(tool_test_path),
929 "--skip_venv",
915 "--galaxy_root", 930 "--galaxy_root",
916 self.args.galaxy_root, 931 self.args.galaxy_root,
917 os.path.abspath(xreal), 932 os.path.abspath(xreal),
918 ] 933 ]
919 p = subprocess.run( 934 p = subprocess.run(