changeset 1:3542cd220bc3 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_fetch_plasmidfinder commit 1fa130238d58da20df9eee4e960dd794224400a5
author iuc
date Fri, 25 Aug 2023 23:34:04 +0000
parents b56071bdecad
children
files data_manager/macro.xml data_manager/plasmidfinder_fetch_database.py data_manager_conf.xml plasmidfinder_database.loc test-data/plasmidfinder.loc.test test-data/plasmidfinder_test_data_manager_2.1.json tool-data/plasmidfinder_database.loc tool-data/plasmidfinder_database.loc.sample tool_data_table_conf.xml.sample tool_data_table_conf.xml.test
diffstat 10 files changed, 24 insertions(+), 33 deletions(-) [+]
line wrap: on
line diff
--- a/data_manager/macro.xml	Thu Jun 15 09:14:08 2023 +0000
+++ b/data_manager/macro.xml	Fri Aug 25 23:34:04 2023 +0000
@@ -4,7 +4,7 @@
     <token name="@GIT_VERSION@">2.34.1</token>
     <token name="@GIT_DB@">4.0.10</token>
     <token name="@PYTHON_VERSION@">3.11.3</token>
-    <token name="@VERSION_SUFFIX@">0</token>
+    <token name="@VERSION_SUFFIX@">1</token>
     <token name="@PROFILE@">21.05</token>
     <xml name="requirements">
         <requirements>
--- a/data_manager/plasmidfinder_fetch_database.py	Thu Jun 15 09:14:08 2023 +0000
+++ b/data_manager/plasmidfinder_fetch_database.py	Fri Aug 25 23:34:04 2023 +0000
@@ -15,7 +15,7 @@
 
     def __init__(self,
                  plasmidfinder_database="plasmidfinder_database",
-                 db_name="plasmidfinder_database",
+                 db_name="plasmidfinder-db",
                  plasmidfinder_version="latest"):
         self.data_table_name = plasmidfinder_database
         self._db_name = db_name
@@ -69,7 +69,7 @@
     def __init__(self,
                  output_dir=Path.cwd(),
                  plasmidfinder_url="https://bitbucket.org/genomicepidemiology/plasmidfinder_db/src/master",
-                 db_name="plasmidfinder_database",
+                 db_name="plasmidfinder-db",
                  db_tmp="tmp_database",
                  plasmidfinder_version="latest",
                  json_file_path=None,
@@ -87,8 +87,9 @@
         self._commit_number = None
 
     def git_clone(self):
-        git.Repo.clone_from(url=self._plasmidfinder_url, to_path=self._output_dir)
-        self._plasmidfinder_repository = git.Repo(path=self._output_dir)
+        self.plasmidfinder_db_path = f'{self._output_dir}/{self._db_name}'
+        git.Repo.clone_from(url=self._plasmidfinder_url, to_path=self.plasmidfinder_db_path)
+        self._plasmidfinder_repository = git.Repo(path=self.plasmidfinder_db_path)
 
     def get_commit_number(self):
         sha = self._plasmidfinder_repository.head.commit.hexsha
--- a/data_manager_conf.xml	Thu Jun 15 09:14:08 2023 +0000
+++ b/data_manager_conf.xml	Fri Aug 25 23:34:04 2023 +0000
@@ -3,9 +3,9 @@
     <data_manager tool_file="data_manager/plasmidfinder_fetch_database.xml" id="plasmidfinder_fetch_database">
         <data_table name="plasmidfinder_database">
             <output>
-                <column name="value" />
-                <column name="name" />
-                <column name="date" />
+                <column name="value"/>
+                <column name="name"/>
+                <column name="date"/>
                 <column name="path" output_ref="output_file">
                     <move type="directory" relativize_symlinks="True">
                         <source>${path}</source>
--- a/plasmidfinder_database.loc	Thu Jun 15 09:14:08 2023 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-# this is a tab separated file describing the location of plasmidfinder database
-# The name was obtained by merging date of download and commit number
-# the columns are:
-# value, name, date, path
-#
-# for example
-#plasmidfinder_9002e7282dd0_2022-12-20	9002e7282dd0_2022-12-20	2022-12-20	plasmidfinder-db
-#plasmidfinder_1307168b1ce7_2022-12-20	2.1_2022-12-20	2022-12-20	plasmidfinder-db
--- a/test-data/plasmidfinder.loc.test	Thu Jun 15 09:14:08 2023 +0000
+++ b/test-data/plasmidfinder.loc.test	Fri Aug 25 23:34:04 2023 +0000
@@ -1,5 +1,4 @@
-plasmidfinder_1307168_2019_08_28	2.1_2019_08_28	2019_08_28	/tmp/tmptllq5k0r/galaxy-dev/tool-data/plasmidfinder-db/2.1_2019_08_28
-plasmidfinder_1307168_2019_08_28	2.1_2019_08_28	2019_08_28	/tmp/tmpnshbzr8f/galaxy-dev/tool-data/plasmidfinder-db/2.1_2019_08_28
-plasmidfinder_1307168_2019_08_28	2.1_2019_08_28	2019_08_28	/tmp/tmpgfqg6r8x/galaxy-dev/tool-data/plasmidfinder-db/2.1_2019_08_28
-plasmidfinder_1307168_2019_08_28	2.1_2019_08_28	2019_08_28	/tmp/tmpam2pha1m/galaxy-dev/tool-data/plasmidfinder-db/2.1_2019_08_28
-plasmidfinder_1307168_2019_08_28	2.1_2019_08_28	2019_08_28	/tmp/tmp_tzl62ye/galaxy-dev/tool-data/plasmidfinder-db/2.1_2019_08_28
+plasmidfinder_1307168_2019_08_28	2.1_2019_08_28	2019_08_28	plasmidfinder-db
+plasmidfinder_1307168_2019_08_28	2.1_2019_08_28	2019_08_28	/tmp/tmpimkqnsxv/galaxy-dev/tool-data/plasmidfinder-db/2.1_2019_08_28
+plasmidfinder_1307168_2019_08_28	2.1_2019_08_28	2019_08_28	/tmp/tmpbqa_r7hv/galaxy-dev/tool-data/plasmidfinder-db/2.1_2019_08_28
+plasmidfinder_1307168_2019_08_28	2.1_2019_08_28	2019_08_28	/tmp/tmpp_z4mmla/galaxy-dev/tool-data/plasmidfinder-db/2.1_2019_08_28
--- a/test-data/plasmidfinder_test_data_manager_2.1.json	Thu Jun 15 09:14:08 2023 +0000
+++ b/test-data/plasmidfinder_test_data_manager_2.1.json	Fri Aug 25 23:34:04 2023 +0000
@@ -1,1 +1,1 @@
-{"data_tables": {"plasmidfinder_database": [{"date": "2019_08_28", "name": "2.1_2019_08_28", "path": "plasmidfinder_database", "value": "plasmidfinder_1307168_2019_08_28"}]}}
\ No newline at end of file
+{"data_tables": {"plasmidfinder_database": [{"date": "2019_08_28", "name": "2.1_2019_08_28", "path": "plasmidfinder-db", "value": "plasmidfinder_1307168_2019_08_28"}]}}
\ No newline at end of file
--- a/tool-data/plasmidfinder_database.loc	Thu Jun 15 09:14:08 2023 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-# this is a tab separated file describing the location of plasmidfinder database
-# The name was obtained by merging date of download and commit number
-# the columns are:
-# value, name, date, path
-#
-# for example
-#plasmidfinder_9002e7282dd0_2022-12-20	9002e7282dd0_2022-12-20	2022-12-20	plasmidfinder-db
-#plasmidfinder_1307168b1ce7_2022-12-20	2.1_2022-12-20	2022-12-20	plasmidfinder-db
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool-data/plasmidfinder_database.loc.sample	Fri Aug 25 23:34:04 2023 +0000
@@ -0,0 +1,7 @@
+# this is a tab separated file describing the location of plasmidfinder database
+# The name was obtained by merging date of download and commit number
+# the columns are:
+# value, name, date, path
+#
+# for example
+#plasmidfinder_1307168_2019_08_28	2.1_2019_08_28	2019_08_28	plasmidfinder-db
--- a/tool_data_table_conf.xml.sample	Thu Jun 15 09:14:08 2023 +0000
+++ b/tool_data_table_conf.xml.sample	Fri Aug 25 23:34:04 2023 +0000
@@ -3,6 +3,6 @@
     <!-- Locations of plasmidfinder database in the required format -->
     <table name="plasmidfinder_database" comment_char="#">
         <columns>value, name, date, path</columns>
-        <file path="tool-data/plasmidfinder.loc" />
+        <file path="tool-data/plasmidfinder_database.loc.sample" />
     </table>
 </tables>
--- a/tool_data_table_conf.xml.test	Thu Jun 15 09:14:08 2023 +0000
+++ b/tool_data_table_conf.xml.test	Fri Aug 25 23:34:04 2023 +0000
@@ -1,7 +1,7 @@
 <tables>
     <!-- Locations of plasmidfinder database in the required format -->
-    <table name="plasmidfinder_database" comment_char="#">
-        <columns>value, name, date,  path</columns>
+    <table name="plasmidfinder_database" comment_char="#" allow_duplicate_entries="False">
+        <columns>value, name, date, path</columns>
         <file path="${__HERE__}/test-data/plasmidfinder.loc.test"/>
     </table>
 </tables>