From f7fd73249bd42c6d1beb25fe59c99d08be104910 Mon Sep 17 00:00:00 2001 From: Steffen Neumann Date: Tue, 21 May 2019 12:39:34 +0200 Subject: [PATCH 1/3] Update help text for Relabel List Identifiers This addresses https://github.com/galaxyproject/galaxy/issues/6156#issuecomment-494290527. The rest of #6156 might require python-hacking. Yours, Steffen --- lib/galaxy/tools/relabel_from_file.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/galaxy/tools/relabel_from_file.xml b/lib/galaxy/tools/relabel_from_file.xml index e60457b90ea..c35cb51de74 100644 --- a/lib/galaxy/tools/relabel_from_file.xml +++ b/lib/galaxy/tools/relabel_from_file.xml @@ -147,6 +147,9 @@ in the collection. In that case only matching list identifiers will be relabeled. + Valid identifiers must contain only characters (a-z, A-Z), numbers (0-9), + dash and underscore (-, _). Punctuation or whitespace are not allowed. + This tool will create new history datasets from your collection but your quota usage will not increase. ]]> From b3d7989a85a837c1e8e26db39828b5573fc89710 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Mon, 27 May 2019 12:24:42 +0200 Subject: [PATCH 2/3] Convert tags starting with # to name: tags I think we want name tags to be `name:` tags in the backend, this keeps processing more uniform. --- lib/galaxy/model/tags.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/galaxy/model/tags.py b/lib/galaxy/model/tags.py index 6192b25ba53..14e73d67784 100644 --- a/lib/galaxy/model/tags.py +++ b/lib/galaxy/model/tags.py @@ -311,6 +311,8 @@ class TagHandler(object): def _get_name_value_pair(self, tag_str): """Get name, value pair from a tag string.""" # Use regular expression to parse name, value. + if tag_str.startswith('#'): + tag_str = "name:%s" % tag_str[1:] reg_exp = re.compile("[" + self.key_value_separators + "]") name_value_pair = reg_exp.split(tag_str, 1) # Add empty slot if tag does not have value. From dd91b14b6d9e3df3d2d0b42fdbc9e10654fc3cc6 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Mon, 27 May 2019 12:43:53 +0200 Subject: [PATCH 3/3] Add testcase for new tag from file behavior --- lib/galaxy/tools/tag_collection_from_file.xml | 8 ++++---- test-data/new_tags_1.txt | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/galaxy/tools/tag_collection_from_file.xml b/lib/galaxy/tools/tag_collection_from_file.xml index 1427fb504c5..2abad0f5452 100644 --- a/lib/galaxy/tools/tag_collection_from_file.xml +++ b/lib/galaxy/tools/tag_collection_from_file.xml @@ -34,13 +34,13 @@ - + - + @@ -63,13 +63,13 @@ - + - + diff --git a/test-data/new_tags_1.txt b/test-data/new_tags_1.txt index 91caa6c4fae..4dbd9d7a001 100644 --- a/test-data/new_tags_1.txt +++ b/test-data/new_tags_1.txt @@ -1,2 +1,2 @@ -forward orientation:forward alias:r1 alias:f -reverse orientation:reverse alias:r2 alias:r +forward orientation:forward alias:r1 alias:f #forward +reverse orientation:reverse alias:r2 alias:r #reverse