changeset 15:ac4d5e1d1421 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_bakta commit b082e89a0090f9c4b2a257bb06b7c6f141b42650-dirty
author pimarin
date Wed, 02 Nov 2022 16:21:11 +0000
parents bcac3aa1f494
children 718080c30a76
files data_manager/bakta_build_database.py
diffstat 1 files changed, 4 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/data_manager/bakta_build_database.py	Wed Nov 02 16:14:09 2022 +0000
+++ b/data_manager/bakta_build_database.py	Wed Nov 02 16:21:11 2022 +0000
@@ -9,8 +9,6 @@
 from pathlib import Path
 
 import requests
-from alive_progress import alive_bar
-
 class GetBaktaDatabaseInfo:
     """
     Extract bakta database information to make a json file for data_manager
@@ -138,16 +136,11 @@
                     requests.get(self.db_url, stream=True) as resp:
                 total_length = resp.headers.get('content-length')
                 if total_length is None:  # no content length header
-                    with alive_bar() as bar:
-                        for data in resp.iter_content(chunk_size=1024 * 1024):
-                            fh_out.write(data)
-                            bar()
+                    for data in resp.iter_content(chunk_size=1024 * 1024):
+                        fh_out.write(data)
                 else:
-                    total_length = int(int(total_length) / 1024)
-                    with alive_bar(total=total_length) as bar:
-                        for data in resp.iter_content(chunk_size=1024 * 1024):
-                            fh_out.write(data)
-                            bar(incr=len(data) / 1024)
+                    for data in resp.iter_content(chunk_size=1024 * 1024):
+                        fh_out.write(data)
             print(f'Download bakta database {self.db_version}')
             self.tarball_path = bakta_path
         except IOError: