malariagen / malariagen-data-python

Analyse MalariaGEN data from Python
https://malariagen.github.io/malariagen-data-python/latest/
MIT License
13 stars 23 forks source link

Add spinners for long-running computations where we can't show progress #454

Closed alimanfoo closed 9 months ago

alimanfoo commented 9 months ago

Wherever possible we'd like to give some visual feedback to users when longer-running computations are occurring, so they can be reassured that computations are still running, understand a bit better what's happening behind the scenes, and begin to build some intuitions for how long things take.

We currently use tqdm to show progress wherever we are able to monitor progress of a longer-running computation. However, in some cases we cannot easily get information on the progress of a computation. Examples include computation of the SVD step within PCA, and computation of pairwise distances. In these cases, propose to show a spinner instead.

The yaspin package looks like a good candidate for this.

We'd need to make sure it plays well with tqdm in notebooks, i.e., if a function has multiple tqdm progress bars and yaspin spinners for different parts of the internal computation, these would need to appear in the correct order.

alimanfoo commented 9 months ago

Peek 2023-11-30 10-17

alimanfoo commented 9 months ago

Peek 2023-11-30 10-35