comparison toolfactory/rgToolFactory2.py @ 72:a8764cda9dbf draft

Uploaded
author fubar
date Sat, 14 Nov 2020 08:04:59 +0000
parents afa3da660ae3
children 3d4324df911b
comparison
equal deleted inserted replaced
71:eea262faed9c 72:a8764cda9dbf
760 rids = [x.get('id','?') for x in repos] 760 rids = [x.get('id','?') for x in repos]
761 tout.write(f'############names={rnames} rids={rids}') 761 tout.write(f'############names={rnames} rids={rids}')
762 cat = 'ToolFactory generated tools' 762 cat = 'ToolFactory generated tools'
763 if self.args.tool_name not in rnames: 763 if self.args.tool_name not in rnames:
764 cll = ["planemo", "shed_create", "--shed_target", "local", 764 cll = ["planemo", "shed_create", "--shed_target", "local",
765 "--directory", self.args.tool_dir,
765 "--owner","fubar","--name", 766 "--owner","fubar","--name",
766 self.args.tool_name,"--shed_key", 767 self.args.tool_name,"--shed_key",
767 self.args.toolshed_api_key,] 768 self.args.toolshed_api_key,]
768 try: 769 try:
769 p = subprocess.run( 770 p = subprocess.run(
786 self.args.tool_name, 787 self.args.tool_name,
787 "--shed_key", 788 "--shed_key",
788 self.args.toolshed_api_key, 789 self.args.toolshed_api_key,
789 "--tar", 790 "--tar",
790 self.newtarpath, 791 self.newtarpath,
792 "--directory", self.args.tool_dir,
791 ] 793 ]
792 p = subprocess.run(cll, shell=False, stdout=tout, stderr=tout) 794 p = subprocess.run(cll, shell=False, stdout=tout, stderr=tout)
793 tout.write("Ran %s got %d" % (" ".join(cll), p.returncode)) 795 tout.write("Ran %s got %d" % (" ".join(cll), p.returncode))
794 tout.close() 796 tout.close()
795 return p.returncode 797 return p.returncode
837 cll = [ 839 cll = [
838 "planemo", 840 "planemo",
839 "test", 841 "test",
840 "--galaxy_root", 842 "--galaxy_root",
841 self.args.galaxy_root, 843 self.args.galaxy_root,
842 "--update_test_data", 844 "--update_test_data",
843 "--docker", 845 "--directory", self.args.tool_dir,
844 xreal, 846 xreal,
845 ] 847 ]
846 p = subprocess.run( 848 p = subprocess.run(
847 cll, shell=False, cwd=self.tooloutdir, stderr=dummy, stdout=dummy, 849 cll, shell=False, cwd=self.tooloutdir, stderr=dummy, stdout=dummy,
848 ) 850 )
849 else: 851 else:
850 cll = ["planemo", "test", "--galaxy_root", 852 cll = ["planemo", "test", "--galaxy_root",
851 self.args.galaxy_root, "--docker", 853 self.args.galaxy_root,
854 "--directory", self.args.tool_dir,
852 xreal,] 855 xreal,]
853 p = subprocess.run( 856 p = subprocess.run(
854 cll, shell=False, cwd=self.tooloutdir, stderr=tout, stdout=tout 857 cll, shell=False, cwd=self.tooloutdir, stderr=tout, stdout=tout
855 ) 858 )
856 tout.close() 859 tout.close()
949 a("--history_test", default=None) 952 a("--history_test", default=None)
950 a("--cl_prefix", default=None) 953 a("--cl_prefix", default=None)
951 a("--sysexe", default=None) 954 a("--sysexe", default=None)
952 a("--packages", default=None) 955 a("--packages", default=None)
953 a("--tool_name", default=None) 956 a("--tool_name", default=None)
957 a("--tool_dir", default=None)
954 a("--input_files", default=[], action="append") 958 a("--input_files", default=[], action="append")
955 a("--output_files", default=[], action="append") 959 a("--output_files", default=[], action="append")
956 a("--user_email", default="Unknown") 960 a("--user_email", default="Unknown")
957 a("--bad_user", default=None) 961 a("--bad_user", default=None)
958 a("--make_Tool", default="runonly") 962 a("--make_Tool", default="runonly")