changeset 4:cef5c909ccb8 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_fetch_ncbi_taxonomy/ commit 79946a95eb9a4c98fde04fa2cb3bc6a31a28e407"
author iuc
date Tue, 07 Jul 2020 00:05:59 +0000
parents f7b443a73374
children eaca3e270bf6
files data_manager/data_manager.py data_manager/ncbi_taxonomy_fetcher.xml test-data/ncbi_taxonomy.loc test-data/taxonomy.json tool-data/ncbi_taxonomy.loc.sample tool_data_table_conf.xml.test
diffstat 6 files changed, 8 insertions(+), 31 deletions(-) [+]
line wrap: on
line diff
--- a/data_manager/data_manager.py	Mon Jul 06 23:29:44 2020 +0000
+++ b/data_manager/data_manager.py	Tue Jul 07 00:05:59 2020 +0000
@@ -5,7 +5,12 @@
 import shutil
 import tarfile
 import zipfile
-from urllib.request import Request, urlopen
+try:
+    # For Python 3.0 and later
+    from urllib.request import Request, urlopen
+except ImportError:
+    # Fall back to Python 2 imports
+    from urllib2 import Request, urlopen
 
 
 def url_download(url, workdir):
--- a/data_manager/ncbi_taxonomy_fetcher.xml	Mon Jul 06 23:29:44 2020 +0000
+++ b/data_manager/ncbi_taxonomy_fetcher.xml	Tue Jul 07 00:05:59 2020 +0000
@@ -1,9 +1,6 @@
 <?xml version="1.0"?>
-<tool id="ncbi_taxonomy_fetcher" name="NCBI" tool_type="manage_data" version="1.0.2">
+<tool id="ncbi_taxonomy_fetcher" name="NCBI" tool_type="manage_data" version="1.0.1">
     <description>taxonomy downloader</description>
-    <requirements>
-        <requirement type="package" version="3.7">python</requirement>
-    </requirements>
     <command detect_errors="exit_code">
     <![CDATA[
         python '$__tool_directory__/data_manager.py' --out '${out_file}'
@@ -22,15 +19,4 @@
     <outputs>
         <data name="out_file" format="data_manager_json" />
     </outputs>
-    <tests>
-        <test>
-            <param name="database_name" value="tax_name"/>
-            <param name="database_id" value="tax_id"/>
-            <output name="out_file" value="taxonomy.json"/>
-        </test>
-    </tests>
-    <help>
-        Download a taxonomy dump from a provided URL.
-        The default URL is the latest dump from NCBI taxonomy.
-    </help>
 </tool>
--- a/test-data/ncbi_taxonomy.loc	Mon Jul 06 23:29:44 2020 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-# Tab separated fields where
-# value is unique key
-# name is descriptive name
-# path is path to directory containing names.dmp and nodes.dmp files
-#value	name	path
--- a/test-data/taxonomy.json	Mon Jul 06 23:29:44 2020 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-{"data_tables": {"ncbi_taxonomy": {"name": "tax_name", "path": ".", "value": "tax_name"}}}
\ No newline at end of file
--- a/tool-data/ncbi_taxonomy.loc.sample	Mon Jul 06 23:29:44 2020 +0000
+++ b/tool-data/ncbi_taxonomy.loc.sample	Tue Jul 07 00:05:59 2020 +0000
@@ -2,4 +2,4 @@
 # value is unique key
 # name is descriptive name
 # path is path to directory containing names.dmp and nodes.dmp files
-#value	name	path
+#value	name		path
--- a/tool_data_table_conf.xml.test	Mon Jul 06 23:29:44 2020 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-<?xml version="1.0"?>
-<tables>
-    <!-- Locations of taxonomy data downloaded from NCBI -->
-    <table name="ncbi_taxonomy" comment_char="#">
-        <columns>value, name, path</columns>
-        <file path="${__HERE__}/test-data/ncbi_taxonomy.loc" />
-    </table>
-</tables>