changeset 4:d6acd5cd497b 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 Mon, 06 Jul 2020 20:06:21 -0400
parents bdd8632fa9fb
children 9de2fb1ce1fb
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 19:32:35 2020 -0400
+++ b/data_manager/data_manager.py	Mon Jul 06 20:06:21 2020 -0400
@@ -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 19:32:35 2020 -0400
+++ b/data_manager/ncbi_taxonomy_fetcher.xml	Mon Jul 06 20:06:21 2020 -0400
@@ -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 19:32:35 2020 -0400
+++ /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 19:32:35 2020 -0400
+++ /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 19:32:35 2020 -0400
+++ b/tool-data/ncbi_taxonomy.loc.sample	Mon Jul 06 20:06:21 2020 -0400
@@ -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 19:32:35 2020 -0400
+++ /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>