Mercurial > repos > iuc > data_manager_gtdbtk_database_installer
comparison data_manager/gtdbtk_database_installer.py @ 6:df84aaed4769 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit a7a73e892ade5f3cb5207c411b8ac27b684316ff
| author | iuc |
|---|---|
| date | Mon, 09 Sep 2024 09:01:39 +0000 |
| parents | 10232d2b5062 |
| children | 3b1d503c6260 |
comparison
equal
deleted
inserted
replaced
| 5:e7b39a7e0024 | 6:df84aaed4769 |
|---|---|
| 102 os.remove(tarball) | 102 os.remove(tarball) |
| 103 else: | 103 else: |
| 104 # handle the test case for the DB | 104 # handle the test case for the DB |
| 105 return tarball | 105 return tarball |
| 106 | 106 |
| 107 fh.extractall(target_directory) | |
| 108 fh.close() | |
| 109 os.remove(tarball) | |
| 110 # The tarball extraction will create a directory named | 107 # The tarball extraction will create a directory named |
| 111 # something like release202 in the target_directory, so | 108 # something like release202 in the target_directory, so |
| 112 # we need to move the items in that directory to the | 109 # we need to move the items in that directory to the |
| 113 # target directory. | 110 # target directory. |
| 114 subdir = next(os.walk(target_directory))[1][0] | 111 subdir = next(os.walk(target_directory))[1][0] |
| 131 | 128 |
| 132 if test: | 129 if test: |
| 133 # switch the DB to use the test case | 130 # switch the DB to use the test case |
| 134 urls[release][ | 131 urls[release][ |
| 135 "full" | 132 "full" |
| 136 ] = "https://data.gtdb.ecogenomic.org/releases/release220/220.0/VERSION.txt" | 133 ] = "https://zenodo.org/records/13734217/files/release220-test.tar.gz" |
| 137 | 134 |
| 138 # make use of the test to check if all urls exists | 135 # make use of the test to check if all urls exists |
| 139 for _version, items in urls.items(): | 136 for _version, items in urls.items(): |
| 140 for url in items.values(): | 137 for url in items.values(): |
| 141 assert is_urlfile(url) | 138 assert is_urlfile(url) |
