Mercurial > repos > galaxyp > openms_openswathmzmlfilecacher
annotate get_tests.py @ 14:fe39f583c19a draft default tip
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
| author | galaxyp | 
|---|---|
| date | Fri, 14 Jun 2024 21:42:42 +0000 | 
| parents | |
| children | 
| rev | line source | 
|---|---|
| 14 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 1 #!/usr/bin/env python | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 2 | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 3 import argparse | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 4 import os.path | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 5 import re | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 6 import shlex | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 7 import sys | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 8 import tempfile | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 9 from typing import ( | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 10 Dict, | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 11 List, | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 12 Optional, | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 13 TextIO, | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 14 Tuple, | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 15 ) | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 16 | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 17 from ctdconverter.common.utils import ( | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 18 ParameterHardcoder, | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 19 parse_hardcoded_parameters, | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 20 parse_input_ctds, | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 21 ) | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 22 from ctdconverter.galaxy.converter import convert_models | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 23 from CTDopts.CTDopts import ( | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 24 CTDModel, | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 25 ModelTypeError, | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 26 Parameters, | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 27 ) | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 28 | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 29 SKIP_LIST = [ | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 30 r"_prepare\"", | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 31 r"_convert", | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 32 r"WRITEINI", | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 33 r"WRITECTD", | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 34 r"INVALIDVALUE", | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 35 r"\.ini\.json", | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 36 r"OpenSwathMzMLFileCacher .*-convert_back", # - OpenSwathMzMLFileCacher with -convert_back argument https://github.com/OpenMS/OpenMS/issues/4399 | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 37 r"MaRaClusterAdapter.*-consensus_out", # - MaRaCluster with -consensus_out (parameter blacklister: https://github.com/OpenMS/OpenMS/issues/4456) | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 38 r"FileMerger_1_input1.dta2d.*FileMerger_1_input2.dta ", # - FileMerger with mixed dta dta2d input (ftype can not be specified in the test, dta can not be sniffed) | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 39 r'^(TOPP_OpenSwathAnalyzer_test_3|TOPP_OpenSwathAnalyzer_test_4)$', # no suppert for cached mzML | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 40 r'TOPP_SiriusAdapter_[0-9]+$', # Do not test SiriusAdapter https://github.com/OpenMS/OpenMS/issues/7000 .. will be removed anyway | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 41 r'TOPP_AssayGeneratorMetabo_(7|8|9|10|11|12|13|14|15|16|17|18)$' # Skip AssayGeneratorMetabo tests using Sirius https://github.com/OpenMS/OpenMS/issues/7150 (will be replaced by two tools) | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 42 ] | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 43 | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 44 | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 45 def get_failing_tests(cmake: List[str]) -> List[str]: | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 46 failing_tests = [] | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 47 re_fail = re.compile(r"set_tests_properties\(\"([^\"]+)\" PROPERTIES WILL_FAIL 1\)") | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 48 | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 49 for cmake in args.cmake: | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 50 with open(cmake) as cmake_fh: | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 51 for line in cmake_fh: | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 52 match = re_fail.search(line) | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 53 if match: | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 54 failing_tests.append(match.group(1)) | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 55 return failing_tests | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 56 | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 57 | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 58 def fix_tmp_files(line: str, diff_pairs: Dict[str, str]) -> str: | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 59 """ | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 60 OpenMS tests output to tmp files and compare with FuzzyDiff to the expected file. | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 61 problem: the extension of the tmp files is unusable for test generation. | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 62 unfortunately the extensions used in the DIFF lines are not always usable for the CLI | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 63 (e.g. for prepare_test_data, e.g. CLI expects csv but test file is txt) | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 64 this function replaces the tmp file by the expected file. | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 65 """ | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 66 cmd = shlex.split(line) | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 67 for i, e in enumerate(cmd): | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 68 if e in diff_pairs: | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 69 dst = os.path.join("test-data", diff_pairs[e]) | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 70 if os.path.exists(dst): | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 71 os.unlink(dst) | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 72 sys.stderr.write(f"symlink {e} {dst}\n") | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 73 os.symlink(e, dst) | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 74 cmd[i] = diff_pairs[e] | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 75 return shlex.join(cmd) | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 76 | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 77 | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 78 def get_ini(line: str, tool_id: str) -> Tuple[str, str]: | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 79 """ | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 80 if there is an ini file then we use this to generate the test | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 81 otherwise the ctd file is used | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 82 other command line parameters are inserted later into this xml | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 83 """ | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 84 cmd = shlex.split(line) | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 85 ini = None | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 86 for i, e in enumerate(cmd): | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 87 if e == "-ini": | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 88 ini = cmd[i + 1] | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 89 cmd = cmd[:i] + cmd[i + 2:] | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 90 if ini: | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 91 return os.path.join("test-data", ini), shlex.join(cmd) | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 92 else: | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 93 return os.path.join("ctd", f"{tool_id}.ctd"), line | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 94 | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 95 | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 96 def unique_files(line: str): | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 97 """ | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 98 some tests use the same file twice which does not work in planemo tests | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 99 hence we create symlinks for each file used twice | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 100 """ | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 101 cmd = shlex.split(line) | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 102 # print(f"{cmd}") | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 103 files = {} | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 104 # determine the list of indexes where each file argument (anything appearing in test-data/) appears | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 105 for idx, e in enumerate(cmd): | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 106 p = os.path.join("test-data", e) | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 107 if not os.path.exists(p) and not os.path.islink(p): | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 108 continue | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 109 try: | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 110 files[e].append(idx) | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 111 except KeyError: | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 112 files[e] = [idx] | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 113 # print(f"{files=}") | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 114 for f in files: | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 115 if len(files[f]) < 2: | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 116 continue | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 117 for i, idx in enumerate(files[f]): | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 118 f_parts = f.split(".") | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 119 f_parts[0] = f"{f_parts[0]}_{i}" | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 120 new_f = ".".join(f_parts) | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 121 # if os.path.exists(os.path.join("test-data", new_f)): | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 122 # os.unlink(os.path.join("test-data", new_f)) | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 123 sys.stderr.write( | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 124 f'\tsymlink {os.path.join("test-data", new_f)} {f}\n' | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 125 ) | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 126 try: | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 127 os.symlink(f, os.path.join("test-data", new_f)) | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 128 except FileExistsError: | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 129 pass | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 130 cmd[idx] = new_f | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 131 return shlex.join(cmd) | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 132 | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 133 | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 134 def fill_ctd_clargs(ini: str, line: str, ctd_tmp: TextIO) -> None: | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 135 cmd = shlex.split(line) | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 136 | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 137 # load CTDModel | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 138 ini_model = None | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 139 try: | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 140 ini_model = CTDModel(from_file=ini) | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 141 except ModelTypeError: | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 142 pass | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 143 try: | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 144 ini_model = Parameters(from_file=ini) | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 145 except ModelTypeError: | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 146 pass | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 147 assert ini_model is not None, "Could not parse %s, seems to be no CTD/PARAMS" % ( | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 148 args.ini_file | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 149 ) | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 150 | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 151 # get a dictionary of the ctd arguments where the values of the parameters | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 152 # given on the command line are overwritten | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 153 ini_values = ini_model.parse_cl_args(cl_args=cmd, ignore_required=True) | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 154 ini_model.write_ctd(ctd_tmp, ini_values) | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 155 | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 156 | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 157 def process_test_line( | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 158 id: str, | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 159 line: str, | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 160 failing_tests: List[str], | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 161 skip_list: List[str], | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 162 diff_pairs: Dict[str, str], | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 163 ) -> Optional[str]: | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 164 | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 165 re_test_id = re.compile(r"add_test\(\"([^\"]+)\" ([^ ]+) (.*)") | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 166 re_id_out_test = re.compile(r"_out_?[0-9]?") | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 167 | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 168 # TODO auto extract from set(OLD_OSW_PARAM ... lin | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 169 line = line.replace( | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 170 "${OLD_OSW_PARAM}", | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 171 " -test -mz_extraction_window 0.05 -mz_extraction_window_unit Th -ms1_isotopes 0 -Scoring:TransitionGroupPicker:compute_peak_quality -Scoring:Scores:use_ms1_mi false -Scoring:Scores:use_mi_score false", | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 172 ) | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 173 | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 174 line = line.replace("${TOPP_BIN_PATH}/", "") | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 175 line = line.replace("${DATA_DIR_TOPP}/", "") | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 176 line = line.replace("THIRDPARTY/", "") | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 177 line = line.replace("${DATA_DIR_SHARE}/", "") | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 178 # IDRipper PATH gets empty causing problems. TODO But overall the option needs to be handled differently | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 179 line = line.replace("${TMP_RIP_PATH}/", "") | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 180 # some input files are originally in a subdir (degenerated cases/), but not in test-data | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 181 line = line.replace("degenerate_cases/", "") | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 182 # determine the test and tool ids and remove the 1) add_test("TESTID" 2) trailing ) | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 183 match = re_test_id.match(line) | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 184 if not match: | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 185 sys.exit(f"Ill formated test line {line}\n") | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 186 test_id = match.group(1) | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 187 tool_id = match.group(2) | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 188 | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 189 line = f"{match.group(2)} {match.group(3)}" | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 190 | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 191 if test_id in failing_tests: | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 192 sys.stderr.write(f" skip failing {test_id} {line}\n") | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 193 return | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 194 | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 195 if id != tool_id: | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 196 sys.stderr.write(f" skip {test_id} ({id} != {tool_id}) {line}\n") | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 197 return | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 198 | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 199 if re_id_out_test.search(test_id): | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 200 sys.stderr.write(f" skip {test_id} {line}\n") | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 201 return | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 202 | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 203 for skip in skip_list: | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 204 if re.search(skip, line): | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 205 return | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 206 if re.search(skip, test_id): | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 207 return | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 208 | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 209 line = fix_tmp_files(line, diff_pairs) | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 210 # print(f"fix {line=}") | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 211 line = unique_files(line) | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 212 # print(f"unq {line=}") | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 213 ini, line = get_ini(line, tool_id) | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 214 | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 215 from dataclasses import dataclass, field | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 216 | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 217 @dataclass | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 218 class CTDConverterArgs: | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 219 input_files: list | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 220 output_destination: str | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 221 default_executable_path: Optional[str] = None | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 222 hardcoded_parameters: Optional[str] = None | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 223 parameter_hardcoder: Optional[ParameterHardcoder] = None | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 224 xsd_location: Optional[str] = None | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 225 formats_file: Optional[str] = None | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 226 add_to_command_line: str = "" | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 227 required_tools_file: Optional[str] = None | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 228 skip_tools_file: Optional[str] = None | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 229 macros_files: Optional[List[str]] = field(default_factory=list) | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 230 test_macros_files: Optional[List[str]] = field(default_factory=list) | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 231 test_macros_prefix: Optional[List[str]] = field(default_factory=list) | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 232 test_test: bool = False | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 233 test_only: bool = False | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 234 test_unsniffable: Optional[List[str]] = field(default_factory=list) | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 235 test_condition: Optional[List[str]] = ("compare=sim_size", "delta_frac=0.05") | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 236 tool_version: str = None | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 237 tool_profile: str = None | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 238 bump_file: str = None | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 239 | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 240 # create an ini/ctd file where the values are equal to the arguments from the command line | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 241 # and transform it to xml | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 242 test = [f"<!-- {test_id} -->\n"] | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 243 with tempfile.NamedTemporaryFile( | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 244 mode="w+", delete_on_close=False | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 245 ) as ctd_tmp, tempfile.NamedTemporaryFile( | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 246 mode="w+", delete_on_close=False | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 247 ) as xml_tmp: | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 248 fill_ctd_clargs(ini, line, ctd_tmp) | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 249 ctd_tmp.close() | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 250 xml_tmp.close() | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 251 parsed_ctd = parse_input_ctds(None, [ctd_tmp.name], xml_tmp.name, "xml") | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 252 ctd_args = CTDConverterArgs( | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 253 input_files=[ctd_tmp.name], | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 254 output_destination=xml_tmp.name, | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 255 macros_files=["macros.xml"], | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 256 skip_tools_file="aux/tools_blacklist.txt", | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 257 formats_file="aux/filetypes.txt", | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 258 # tool_conf_destination = "tool.conf", | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 259 hardcoded_parameters="aux/hardcoded_params.json", | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 260 tool_version="3.1", | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 261 test_only=True, | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 262 test_unsniffable=[ | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 263 "csv", | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 264 "tsv", | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 265 "txt", | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 266 "dta", | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 267 "dta2d", | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 268 "edta", | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 269 "mrm", | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 270 "splib", | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 271 ], | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 272 test_condition=["compare=sim_size", "delta_frac=0.7"], | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 273 ) | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 274 ctd_args.parameter_hardcoder = parse_hardcoded_parameters( | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 275 ctd_args.hardcoded_parameters | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 276 ) | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 277 convert_models(ctd_args, parsed_ctd) | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 278 xml_tmp = open(xml_tmp.name, "r") | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 279 for l in xml_tmp: | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 280 test.append(l) | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 281 | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 282 return "".join(test) | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 283 | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 284 | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 285 parser = argparse.ArgumentParser(description="Create Galaxy tests for a OpenMS tools") | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 286 parser.add_argument("--id", dest="id", help="tool id") | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 287 parser.add_argument("--cmake", nargs="+", help="OpenMS test CMake files") | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 288 args = parser.parse_args() | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 289 sys.stderr.write(f"generate tests for {args.id}\n") | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 290 | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 291 re_comment = re.compile("#.*") | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 292 re_empty_prefix = re.compile(r"^\s*") | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 293 re_empty_suffix = re.compile(r"\s*$") | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 294 re_add_test = re.compile(r"add_test\(\"(TOPP|UTILS)_.*/" + args.id) | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 295 re_diff = re.compile(r"\$\{DIFF\}.* -in1 ([^ ]+) -in2 ([^ ]+)") | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 296 failing_tests = get_failing_tests(args.cmake) | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 297 tests = [] | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 298 | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 299 # process the given CMake files and compile lists of | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 300 # - test lines .. essentially add_test(...) | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 301 # - and pairs of files that are diffed | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 302 jline = "" | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 303 test_lines = [] | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 304 diff_pairs = {} | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 305 for cmake in args.cmake: | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 306 with open(cmake) as cmake_fh: | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 307 for line in cmake_fh: | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 308 # remove comments, empty prefixes and suffixes | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 309 line = re_comment.sub("", line) | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 310 line = re_empty_prefix.sub("", line) | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 311 line = re_empty_suffix.sub("", line) | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 312 # skip empty lines | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 313 if line == "": | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 314 continue | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 315 | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 316 # join test statements that are split over multiple lines | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 317 if line.endswith(")"): | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 318 jline += " " + line[:-1] | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 319 else: | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 320 jline = line | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 321 continue | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 322 line, jline = jline.strip(), "" | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 323 match = re_diff.search(line) | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 324 if match: | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 325 in1 = match.group(1).split("/")[-1] | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 326 in2 = match.group(2).split("/")[-1] | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 327 if in1 != in2: | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 328 diff_pairs[in1] = in2 | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 329 elif re_add_test.match(line): | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 330 test_lines.append(line) | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 331 | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 332 for line in test_lines: | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 333 test = process_test_line(args.id, line, failing_tests, SKIP_LIST, diff_pairs) | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 334 if test: | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 335 tests.append(test) | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 336 | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 337 tests = "\n".join(tests) | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 338 print( | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 339 f""" | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 340 <xml name="autotest_{args.id}"> | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 341 {tests} | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 342 </xml> | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 343 """ | 
| 
fe39f583c19a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
 galaxyp parents: diff
changeset | 344 ) | 
