comparison toolfactory/rgToolFactory2.py @ 74:3d4324df911b draft

Uploaded
author fubar
date Sat, 14 Nov 2020 21:52:39 +0000
parents a8764cda9dbf
children 25dd9364a32a
comparison
equal deleted inserted replaced
73:95adf7148d9a 74:3d4324df911b
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,
766 "--owner","fubar","--name", 765 "--owner","fubar","--name",
767 self.args.tool_name,"--shed_key", 766 self.args.tool_name,"--shed_key",
768 self.args.toolshed_api_key,] 767 self.args.toolshed_api_key,]
769 try: 768 try:
770 p = subprocess.run( 769 p = subprocess.run(
787 self.args.tool_name, 786 self.args.tool_name,
788 "--shed_key", 787 "--shed_key",
789 self.args.toolshed_api_key, 788 self.args.toolshed_api_key,
790 "--tar", 789 "--tar",
791 self.newtarpath, 790 self.newtarpath,
792 "--directory", self.args.tool_dir,
793 ] 791 ]
794 p = subprocess.run(cll, shell=False, stdout=tout, stderr=tout) 792 p = subprocess.run(cll, shell=False, stdout=tout, stderr=tout)
795 tout.write("Ran %s got %d" % (" ".join(cll), p.returncode)) 793 tout.write("Ran %s got %d" % (" ".join(cll), p.returncode))
796 tout.close() 794 tout.close()
797 return p.returncode 795 return p.returncode
839 cll = [ 837 cll = [
840 "planemo", 838 "planemo",
841 "test", 839 "test",
842 "--galaxy_root", 840 "--galaxy_root",
843 self.args.galaxy_root, 841 self.args.galaxy_root,
844 "--update_test_data", 842 "--update_test_data",
845 "--directory", self.args.tool_dir,
846 xreal, 843 xreal,
847 ] 844 ]
848 p = subprocess.run( 845 p = subprocess.run(
849 cll, shell=False, cwd=self.tooloutdir, stderr=dummy, stdout=dummy, 846 cll, shell=False, cwd=self.tooloutdir, stderr=dummy, stdout=dummy,
850 ) 847 )
851 else: 848 else:
852 cll = ["planemo", "test", "--galaxy_root", 849 cll = ["planemo", "test", "--galaxy_root",
853 self.args.galaxy_root, 850 self.args.galaxy_root,
854 "--directory", self.args.tool_dir,
855 xreal,] 851 xreal,]
856 p = subprocess.run( 852 p = subprocess.run(
857 cll, shell=False, cwd=self.tooloutdir, stderr=tout, stdout=tout 853 cll, shell=False, cwd=self.tooloutdir, stderr=tout, stdout=tout
858 ) 854 )
859 tout.close() 855 tout.close()