# HG changeset patch # User fubar # Date 1605069324 0 # Node ID bc1977b1f7b5b222e8413bd5b16e75d0bcddfe9e # Parent ed1ecd161295f04ee37f393243bc35739ea3ae5d Uploaded diff -r ed1ecd161295 -r bc1977b1f7b5 toolfactory/rgToolFactory2.py --- a/toolfactory/rgToolFactory2.py Tue Nov 10 23:53:32 2020 +0000 +++ b/toolfactory/rgToolFactory2.py Wed Nov 11 04:35:24 2020 +0000 @@ -745,8 +745,8 @@ [--homepage_url=] [--long_description=] [--category=]* - - + + planemo shed_update --check_diff --shed_target testtoolshed """ if os.path.exists(self.tlog): @@ -760,7 +760,7 @@ tout.write(f'############names={rnames} rids={rids}') cat = 'ToolFactory generated tools' if self.args.tool_name not in rnames: - cll = ["planemo", "shed_create", "--shed_target", "local", + cll = ["planemo", "shed_create", "--shed_target", "local", "--owner","fubar","--name", self.args.tool_name,"--shed_key", self.args.toolshed_api_key,] @@ -838,6 +838,7 @@ "--galaxy_root", self.args.galaxy_root, "--update_test_data", + "--docker", xreal, ] p = subprocess.run( @@ -845,7 +846,7 @@ ) else: cll = ["planemo", "test", "--galaxy_root", - self.args.galaxy_root, + self.args.galaxy_root, "--docker", xreal,] p = subprocess.run( cll, shell=False, cwd=self.tooloutdir, stderr=tout, stdout=tout @@ -893,6 +894,11 @@ def makeToolTar(self): """ move outputs into test-data and prepare the tarball """ + excludeme = "tool_test_output" + def exclude_function(tarinfo): + filename = tarinfo.name + return None if filename.startswith(excludeme) or os.path.splitext(filename)[1].startswith(excludeme) else tarinfo + for p in self.outfiles: src = p[ONAMEPOS] if os.path.isfile(src): @@ -907,7 +913,7 @@ ) self.newtarpath = "toolfactory_%s.tgz" % self.tool_name tf = tarfile.open(self.newtarpath, "w:gz") - tf.add(name=self.tooloutdir, arcname=self.tool_name) + tf.add(name=self.tooloutdir, arcname=self.tool_name, filter=exclude_function) tf.close() shutil.copyfile(self.newtarpath, self.args.new_tool) @@ -926,8 +932,6 @@ dest = os.path.join(self.repdir, ofn) src = os.path.join(self.tooloutdir, entry.name) shutil.copyfile(src, dest) - if entry.name.startswith('tool_test_output'): - os.unlink(src) def main(): @@ -987,15 +991,20 @@ r = ScriptRunner(args) r.writeShedyml() r.makeTool() - retcode = r.planemo_test(genoutputs=True) # this fails :( - see PR - r.moveRunOutputs() - r.makeToolTar() - retcode = r.planemo_test(genoutputs=False) - r.moveRunOutputs() - if args.make_Tool == "gentestinstall": - retcode = r.planemo_shedload() #r.shedLoad() - print(f'planemo_shedload returned {retcode}') - r.eph_galaxy_load() + if args.make_Tool == "generate": + retcode = r.run() + r.moveRunOutputs() + r.makeToolTar() + else: + retcode = r.planemo_test(genoutputs=True) # this fails :( - see PR + r.moveRunOutputs() + r.makeToolTar() + retcode = r.planemo_test(genoutputs=False) + r.moveRunOutputs() + if args.make_Tool == "gentestinstall": + retcode = r.planemo_shedload() #r.shedLoad() + print(f'planemo_shedload returned {retcode}') + r.eph_galaxy_load() diff -r ed1ecd161295 -r bc1977b1f7b5 toolfactory/rgToolFactory2.xml --- a/toolfactory/rgToolFactory2.xml Tue Nov 10 23:53:32 2020 +0000 +++ b/toolfactory/rgToolFactory2.xml Wed Nov 11 04:35:24 2020 +0000 @@ -132,9 +132,9 @@ + python planemo galaxyxml - + + + + + + + +