Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support tar.bz2 format for dumpers' "uncompress" feature #226

Open
erikyao opened this issue Jun 1, 2022 · 1 comment
Open

Support tar.bz2 format for dumpers' "uncompress" feature #226

erikyao opened this issue Jun 1, 2022 · 1 comment
Assignees

Comments

@erikyao
Copy link
Contributor

erikyao commented Jun 1, 2022

Quote from Manifest-based data plugins:

uncompress: once data is downloaded, this flag, if set to true, will uncompress all supported archives found in the data folder. Currently supported formats are: *.zip, *.gz, *.tar.gz (includes untar step)

However, there exist plugins relying on tar.bz2 data files, and uncompressing is feasible though tarfile module. E.g.

import tarfile
tar = tarfile.open("foobar.tar.bz2", "r:bz2")
tar.extractall()
tar.close()

Related python module is biothings/utils/common.py. Note that tarfile module is already installed.

@erikyao erikyao self-assigned this Jun 1, 2022
@erikyao
Copy link
Contributor Author

erikyao commented Jun 2, 2022

Also consider supporting bz2 in anyfile function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant