Mercurial > repos > fubar > tool_factory_2
comparison toolfactory/rgToolFactory2.py @ 127:98c8a76b3638 draft
Uploaded
author | fubar |
---|---|
date | Tue, 30 Mar 2021 00:17:55 +0000 |
parents | def0f754ee1b |
children | c35ff02652bf |
comparison
equal
deleted
inserted
replaced
126:def0f754ee1b | 127:98c8a76b3638 |
---|---|
25 import sys | 25 import sys |
26 import tarfile | 26 import tarfile |
27 import tempfile | 27 import tempfile |
28 import time | 28 import time |
29 | 29 |
30 | |
31 import galaxyxml.tool as gxt | |
32 import galaxyxml.tool.parameters as gxtp | |
33 import lxml | |
34 import yaml | |
30 from bioblend import ConnectionError | 35 from bioblend import ConnectionError |
31 from bioblend import toolshed | 36 from bioblend import toolshed |
32 | |
33 import galaxyxml.tool as gxt | |
34 import galaxyxml.tool.parameters as gxtp | |
35 | |
36 import lxml | |
37 | |
38 import yaml | |
39 | 37 |
40 | 38 |
41 myversion = "V2.2 February 2021" | 39 myversion = "V2.2 February 2021" |
42 verbose = True | 40 verbose = True |
43 debug = True | 41 debug = True |
488 num_dashes=ndash, | 486 num_dashes=ndash, |
489 ) | 487 ) |
490 aninput.positional = self.is_positional | 488 aninput.positional = self.is_positional |
491 if self.is_positional: | 489 if self.is_positional: |
492 if p["origCL"].upper() == "STDIN": | 490 if p["origCL"].upper() == "STDIN": |
493 aparm.positional = 9999998 | 491 aninput.positional = 9999998 |
494 aparm.command_line_override = "> $%s" % newname | 492 aninput.command_line_override = "> $%s" % newname |
495 else: | 493 else: |
496 aparm.positional = int(p["origCL"]) | 494 aninput.positional = int(p["origCL"]) |
497 aparm.command_line_override = "$%s" % newname | 495 aninput.command_line_override = "$%s" % newname |
498 self.tinputs.append(aninput) | 496 self.tinputs.append(aninput) |
499 tparm = gxtp.TestParam(name=newname, value="%s_sample" % newname) | 497 tparm = gxtp.TestParam(name=newname, value="%s_sample" % newname) |
500 self.testparam.append(tparm) | 498 self.testparam.append(tparm) |
501 for p in self.addpar: | 499 for p in self.addpar: |
502 newname = p["name"] | 500 newname = p["name"] |
987 else: | 985 else: |
988 newname = f"{entry.name}.txt" | 986 newname = f"{entry.name}.txt" |
989 dest = os.path.join(self.repdir, newname) | 987 dest = os.path.join(self.repdir, newname) |
990 src = os.path.join(self.testdir, entry.name) | 988 src = os.path.join(self.testdir, entry.name) |
991 shutil.copyfile(src, dest) | 989 shutil.copyfile(src, dest) |
992 | |
993 | 990 |
994 def planemo_test_once(self): | 991 def planemo_test_once(self): |
995 """planemo is a requirement so is available for testing but needs a | 992 """planemo is a requirement so is available for testing but needs a |
996 different call if in the biocontainer - see above | 993 different call if in the biocontainer - see above |
997 and for generating test outputs if command or test overrides are | 994 and for generating test outputs if command or test overrides are |