Skip to content

Commit af4bb1b

Browse files
authored
Merge pull request #713 from RECETOX/hechth/issue709
fix table tools lint errors
2 parents 91d32d5 + eb9b95a commit af4bb1b

File tree

3 files changed

+9
-17
lines changed

3 files changed

+9
-17
lines changed

tools/tables/macros.xml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,27 +28,17 @@
2828

2929
<xml name="regex_sanitizer">
3030
<sanitizer>
31-
<valid initial="string.ascii_letters,string.digits">
31+
<valid initial="default">
3232
<add value="^"/>
3333
<add value="$"/>
34-
<add value="("/>
35-
<add value=")"/>
3634
<add value="|"/>
37-
<add value="?"/>
38-
<add value="*"/>
39-
<add value="+"/>
4035
<add value="{"/>
4136
<add value="}"/>
4237
<add value="\"/>
4338
<add value="["/>
4439
<add value="]"/>
45-
<add value="."/>
46-
<add value=","/>
47-
<add value="_"/>
48-
<add value="-"/>
4940
</valid>
5041
</sanitizer>
51-
<validator type="empty_field" />
5242
<validator type="regex" message="Pattern must not end with backslash.">.*[^\\]$</validator>
5343
</xml>
5444
</macros>

tools/tables/table_pandas_rename_column.xml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
</xrefs> -->
66
<macros>
77
<import>macros.xml</import>
8-
<token name="@VERSION_SUFFIX@">0</token>
8+
<token name="@VERSION_SUFFIX@">1</token>
99
</macros>
1010
<!-- TODO: please annotate this tool with topics and operations from http://edamontology.org -->
1111
<!-- TODO: for more information see: https://galaxy-iuc-standards.readthedocs.io/en/latest/best_practices/tool_xml.html#edam-topics-and-operations -->
@@ -54,8 +54,10 @@
5454
<tests>
5555
<test>
5656
<param name="input_dataset" value="reference.txt" ftype="tabular"/>
57-
<param name="column" value="2"/>
58-
<param name="new_name" value="retention_time"/>
57+
<repeat name="columns_selection">
58+
<param name="column" value="2"/>
59+
<param name="new_name" value="retention_time"/>
60+
</repeat>
5961
<output name="output_dataset" file="rename/reference_rt_renamed.tabular" ftype="tabular"/>
6062
</test>
6163
<test>

tools/tables/table_pandas_rename_columns_regex.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<description>rename columns in a table using regex</description>
33
<macros>
44
<import>macros.xml</import>
5-
<token name="@VERSION_SUFFIX@">0</token>
5+
<token name="@VERSION_SUFFIX@">1</token>
66
</macros>
77

88
<requirements>
@@ -48,11 +48,11 @@
4848
<test expect_num_outputs="1">
4949
<param name="input_dataset" value="rename/reference_both_renamed.tabular" ftype="tabular"/>
5050
<param name="columns" value="1,2"/>
51-
<param name="regex_check" value="retention_"/>
52-
<param name="regex_replace" value=""/>
51+
<param name="regex_check" value="(retention_){1}"/>
5352
<output name="output_dataset" ftype="tabular">
5453
<assert_contents>
5554
<has_text text="retention" negate="true"/>
55+
<has_line line="index&#9;time"/>
5656
</assert_contents>
5757
</output>
5858
</test>

0 commit comments

Comments
 (0)