changeset 1:bb463043c93e draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_build_bakta_database commit fb13b466a4c529d701a181535568b5f73e7f832f
author iuc
date Thu, 02 Mar 2023 14:47:02 +0000
parents a19189a128cb
children adfd6bf710bd
files data_manager/bakta_build_database.py data_manager_conf.xml test-data/bakta_test.loc test-data/bakta_test_data_manager.json test-data/bakta_test_data_manager_test2.json tool-data/bakta_database.loc tool-data/bakta_database.loc.sample tool_data_table_conf.xml.sample
diffstat 8 files changed, 19 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/data_manager/bakta_build_database.py	Sat Dec 10 21:52:28 2022 +0000
+++ b/data_manager/bakta_build_database.py	Thu Mar 02 14:47:02 2023 +0000
@@ -78,13 +78,13 @@
 
     def get_data_manager(self, bakta_database_info):
         self.bakta_table_list = self.get_data_table_format()
-        bakta_value = f"V{bakta_database_info['major']}." \
-                      f"{bakta_database_info['minor']}_" \
-                      f"{bakta_database_info['date']}"
+        bakta_name = f"V{bakta_database_info['major']}." \
+                     f"{bakta_database_info['minor']}_" \
+                     f"{bakta_database_info['date']}"
         tool_version = str(f"{bakta_database_info['software-min']['major']}."
                            f"{bakta_database_info['software-min']['minor']}")
-        data_info = dict(value=bakta_database_info['record'],
-                         dbkey=bakta_value,
+        data_info = dict(value=bakta_name,
+                         dbkey=bakta_database_info['record'],
                          bakta_version=tool_version,
                          path="db")
         self.bakta_table_list["data_tables"][self.data_table_name] = [data_info]
--- a/data_manager_conf.xml	Sat Dec 10 21:52:28 2022 +0000
+++ b/data_manager_conf.xml	Thu Mar 02 14:47:02 2023 +0000
@@ -8,9 +8,9 @@
                 <column name="path" output_ref="output_file">
                     <move type="directory" relativize_symlinks="True">
                         <source>${path}</source>
-                        <target base="${GALAXY_DATA_MANAGER_DATA_PATH}">bakta_database/${value}</target>
+                        <target base="${GALAXY_DATA_MANAGER_DATA_PATH}">bakta_database/${dbkey}</target>
                     </move>
-                    <value_translation>${GALAXY_DATA_MANAGER_DATA_PATH}/bakta_database/${value}</value_translation>
+                    <value_translation>${GALAXY_DATA_MANAGER_DATA_PATH}/bakta_database/${dbkey}</value_translation>
                     <value_translation type="function">abspath</value_translation>
                 </column>
             </output>
--- a/test-data/bakta_test.loc	Sat Dec 10 21:52:28 2022 +0000
+++ b/test-data/bakta_test.loc	Thu Mar 02 14:47:02 2023 +0000
@@ -5,7 +5,5 @@
 #
 # for example
 7197299	V0.0_date_test	0.0	${__HERE__}
-7197299	V1.0_2022-10-12	1.4	/tmp/tmpxrkfnuec/galaxy-dev/tool-data/bakta_database/7197299
-7360139	V2.0_2022-11-25	1.5	/tmp/tmpxrkfnuec/galaxy-dev/tool-data/bakta_database/7360139
-7197299	V1.0_2022-10-12	1.4	/tmp/tmpwe9n4gyg/galaxy-dev/tool-data/bakta_database/7197299
-7360139	V2.0_2022-11-25	1.5	/tmp/tmpwe9n4gyg/galaxy-dev/tool-data/bakta_database/7360139
+V1.0_2022-10-12	7197299	1.4	/tmp/tmpiyh6lcqw/galaxy-dev/tool-data/bakta_database/7197299
+V2.0_2022-11-25	7360139	1.5	/tmp/tmpiyh6lcqw/galaxy-dev/tool-data/bakta_database/7360139
--- a/test-data/bakta_test_data_manager.json	Sat Dec 10 21:52:28 2022 +0000
+++ b/test-data/bakta_test_data_manager.json	Thu Mar 02 14:47:02 2023 +0000
@@ -1,1 +1,1 @@
-{"data_tables": {"bakta_database": [{"bakta_version": "1.4", "dbkey": "V1.0_2022-10-12", "path": "db", "value": "7197299"}]}}
\ No newline at end of file
+{"data_tables": {"bakta_database": [{"bakta_version": "1.4", "dbkey": "7197299", "path": "db", "value": "V1.0_2022-10-12"}]}}
\ No newline at end of file
--- a/test-data/bakta_test_data_manager_test2.json	Sat Dec 10 21:52:28 2022 +0000
+++ b/test-data/bakta_test_data_manager_test2.json	Thu Mar 02 14:47:02 2023 +0000
@@ -1,1 +1,1 @@
-{"data_tables": {"bakta_database": [{"bakta_version": "1.5", "dbkey": "V2.0_2022-11-25", "path": "db", "value": "7360139"}]}}
\ No newline at end of file
+{"data_tables": {"bakta_database": [{"bakta_version": "1.5", "dbkey": "7360139", "path": "db", "value": "V2.0_2022-11-25"}]}}
\ No newline at end of file
--- a/tool-data/bakta_database.loc	Sat Dec 10 21:52:28 2022 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-# this is a tab separated file describing the location of bakta database
-#
-# the columns are:
-# value, dbkey, bakta_version, path
-#
-# for example
-#7197299	V0.0_date_test	0.0	${__HERE__}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool-data/bakta_database.loc.sample	Thu Mar 02 14:47:02 2023 +0000
@@ -0,0 +1,7 @@
+# this is a tab separated file describing the location of bakta database
+#
+# the columns are:
+# name, dbkey, bakta_version, path
+#
+# for example
+#V0.0_date_test	7197299	0.0	${__HERE__}
--- a/tool_data_table_conf.xml.sample	Sat Dec 10 21:52:28 2022 +0000
+++ b/tool_data_table_conf.xml.sample	Thu Mar 02 14:47:02 2023 +0000
@@ -2,6 +2,6 @@
     <!-- Locations of bakta database in the required format -->
     <table name="bakta_database" comment_char="#">
         <columns>value, dbkey, bakta_version, path</columns>
-        <file path="tool-data/bakta_database.loc" />
+        <file path="tool-data/bakta_database.loc.sample" />
     </table>
 </tables>