From e4d821e4f12c0245d328bb61801940ae6e553650 Mon Sep 17 00:00:00 2001 From: Alexander OSTROVSKY Date: Tue, 14 May 2019 13:44:07 -0400 Subject: [PATCH 1/6] Added yaml support --- config/datatypes_conf.xml.sample | 931 ++++++++++++++++++++++++++++++- lib/galaxy/datatypes/text.py | 7 + 2 files changed, 937 insertions(+), 1 deletion(-) mode change 120000 => 100644 config/datatypes_conf.xml.sample diff --git a/config/datatypes_conf.xml.sample b/config/datatypes_conf.xml.sample deleted file mode 120000 index 76fe1cddeb6..00000000000 --- a/config/datatypes_conf.xml.sample +++ /dev/null @@ -1 +0,0 @@ -../lib/galaxy/config/sample/datatypes_conf.xml.sample \ No newline at end of file diff --git a/config/datatypes_conf.xml.sample b/config/datatypes_conf.xml.sample new file mode 100644 index 00000000000..09930fa027f --- /dev/null +++ b/config/datatypes_conf.xml.sample @@ -0,0 +1,930 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/galaxy/datatypes/text.py b/lib/galaxy/datatypes/text.py index 43c99941335..f05401c6fb7 100644 --- a/lib/galaxy/datatypes/text.py +++ b/lib/galaxy/datatypes/text.py @@ -729,6 +729,7 @@ class IQTree(Text): """ return file_prefix.startswith("IQ-TREE") +<<<<<<< HEAD @build_sniff_from_prefix class Paf(Text): @@ -856,3 +857,9 @@ class Gfa2(Text): return False found_valid_lines = True return found_valid_lines +======= +@build_sniff_from_prefix +class Yaml(Text): + """Yaml files""" + file_ext = "yaml" +>>>>>>> dc062f82cf... Added yaml support From cf9298b76223965158bab2cafedc8fd9b4248df0 Mon Sep 17 00:00:00 2001 From: Alexander OSTROVSKY Date: Tue, 14 May 2019 14:02:03 -0400 Subject: [PATCH 2/6] linted --- lib/galaxy/datatypes/text.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/galaxy/datatypes/text.py b/lib/galaxy/datatypes/text.py index f05401c6fb7..b4424f09207 100644 --- a/lib/galaxy/datatypes/text.py +++ b/lib/galaxy/datatypes/text.py @@ -730,6 +730,7 @@ class IQTree(Text): return file_prefix.startswith("IQ-TREE") <<<<<<< HEAD +<<<<<<< HEAD @build_sniff_from_prefix class Paf(Text): @@ -858,6 +859,9 @@ class Gfa2(Text): found_valid_lines = True return found_valid_lines ======= +======= + +>>>>>>> 8cffc5cc03... linted @build_sniff_from_prefix class Yaml(Text): """Yaml files""" From dd9e3fc37399c1ecf8506039c5f4e43c0a50330f Mon Sep 17 00:00:00 2001 From: Alexander OSTROVSKY Date: Tue, 14 May 2019 15:23:18 -0400 Subject: [PATCH 3/6] added sniffer for yaml import order Better sniff for big files, removed extraneous comments Better test for bigger files lint safe load, yaml error typo --- config/datatypes_conf.xml.sample | 931 +----------------- .../config/sample/datatypes_conf.xml.sample | 2 + lib/galaxy/datatypes/text.py | 40 +- test-data/1.yaml | 7 + 4 files changed, 44 insertions(+), 936 deletions(-) mode change 100644 => 120000 config/datatypes_conf.xml.sample create mode 100644 test-data/1.yaml diff --git a/config/datatypes_conf.xml.sample b/config/datatypes_conf.xml.sample deleted file mode 100644 index 09930fa027f..00000000000 --- a/config/datatypes_conf.xml.sample +++ /dev/null @@ -1,930 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/config/datatypes_conf.xml.sample b/config/datatypes_conf.xml.sample new file mode 120000 index 00000000000..76fe1cddeb6 --- /dev/null +++ b/config/datatypes_conf.xml.sample @@ -0,0 +1 @@ +../lib/galaxy/config/sample/datatypes_conf.xml.sample \ No newline at end of file diff --git a/lib/galaxy/config/sample/datatypes_conf.xml.sample b/lib/galaxy/config/sample/datatypes_conf.xml.sample index 49a4228a9eb..58144bd40e1 100644 --- a/lib/galaxy/config/sample/datatypes_conf.xml.sample +++ b/lib/galaxy/config/sample/datatypes_conf.xml.sample @@ -248,6 +248,7 @@ + @@ -1118,6 +1119,7 @@ +