comparison toolfactory/rgToolFactory2.py @ 122:c763ae9237ca draft

Uploaded
author fubar
date Thu, 07 Jan 2021 23:25:48 +0000
parents 2050b2475ae5
children f267ed4a3026
comparison
equal deleted inserted replaced
121:2050b2475ae5 122:c763ae9237ca
308 for i, p in enumerate(self.infiles): 308 for i, p in enumerate(self.infiles):
309 infp = copy.copy(p) 309 infp = copy.copy(p)
310 icl = infp[ICLPOS] 310 icl = infp[ICLPOS]
311 infp.append(icl) 311 infp.append(icl)
312 if ( 312 if (
313 infp[ICLPOS].isdigit() \ 313 infp[ICLPOS].isdigit()
314 or self.args.parampass == "0" \ 314 or self.args.parampass == "0"
315 or infp[ICLPOS].strip().upper() == "STDOUT" 315 or infp[ICLPOS].strip().upper() == "STDOUT"
316 ): 316 ):
317 scl = "input%d" % (i + 1) 317 scl = "input%d" % (i + 1)
318 infp[ICLPOS] = scl 318 infp[ICLPOS] = scl
319 self.infiles[i] = infp 319 self.infiles[i] = infp
585 safertext = safertext + "\n\n------\n" # transition allowed! 585 safertext = safertext + "\n\n------\n" # transition allowed!
586 scr = [x for x in self.spacedScript if x.strip() > ""] 586 scr = [x for x in self.spacedScript if x.strip() > ""]
587 scr.insert(0, "\n\nScript::\n") 587 scr.insert(0, "\n\nScript::\n")
588 if len(scr) > 300: 588 if len(scr) > 300:
589 scr = ( 589 scr = (
590 scr[:100] \ 590 scr[:100]
591 + [" >300 lines - stuff deleted", " ......"] \ 591 + [" >300 lines - stuff deleted", " ......"]
592 + scr[-100:] 592 + scr[-100:]
593 ) 593 )
594 scr.append("\n") 594 scr.append("\n")
595 safertext = safertext + "\n".join(scr) 595 safertext = safertext + "\n".join(scr)
596 self.newtool.help = safertext 596 self.newtool.help = safertext
880 src = os.path.join(self.tooloutdir, entry.name) 880 src = os.path.join(self.tooloutdir, entry.name)
881 shutil.copyfile(src, dest) 881 shutil.copyfile(src, dest)
882 with os.scandir(self.testdir) as outs: 882 with os.scandir(self.testdir) as outs:
883 for entry in outs: 883 for entry in outs:
884 if ( 884 if (
885 (not entry.is_file()) \ 885 (not entry.is_file())
886 or entry.name.endswith("_sample") \ 886 or entry.name.endswith("_sample")
887 or entry.name.endswith("_planemo_test_report.html") 887 or entry.name.endswith("_planemo_test_report.html")
888 ): 888 ):
889 continue 889 continue
890 if "." in entry.name: 890 if "." in entry.name:
891 nayme, ext = os.path.splitext(entry.name) 891 nayme, ext = os.path.splitext(entry.name)