a-r-j / graphein

Protein Graph Library
https://graphein.ai/
MIT License
994 stars 125 forks source link

[fix] change progressbar for pdb download #394

Closed kierandidi closed 1 month ago

kierandidi commented 2 months ago

What does this implement/fix? Explain your changes

When using the download_pdb_multiprocessing function, a progress bar for each individual download would be created. This was quite confusing since the progress bars change to quickly to see anything; at the same time one does not know how far the download process is in practice

https://github.com/a-r-j/graphein/assets/58345129/b4dacaef-de0b-4e38-ae90-1f0670c17a1e

In this MR, this is changed so that the process instead is monitored by one overall progress bar that gives more informative information about the progress. It does this via the imap_unordered function that returns the requests async; every download request that returns increments the bar so that we have a more realistic idea of how far the download process is.

What testing did you do to verify the changes in this PR?

I downloaded several pdbs, either just a few or a few thousand.

Pull Request Checklist

sonarcloud[bot] commented 2 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud