Optional progress bar for intensive incremental operations

Aperta
#183 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
30/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
python
Ambito
cli, data

Direzione di ricerca

Inizia tracciando il percorso di aggregazione utilizzato da cfa e i corrispondenti punti di ingresso interattivi Python; l’issue non indica file né test. Definisci l’ambito delle barre di avanzamento, degli spinner o dei contatori e il comportamento della configurazione globale, quindi verifica i casi abilitati e disabilitati per impostazione predefinita attraverso questi punti di ingresso.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement

For select operations that may take a non-negligible time to complete (from the perspective of a user), it could be useful to display small indicators of the progression of the operation whilst it is running in either interactive Python or on the command-line (i.e. for cfa, since aggregation is one of the main operations I have in mind that can necessarily be time-consuming for specifically inputs).

Notably, this could be:

  • a progress bar for operations that can be broken into incremental steps of progression, e.g. each of the known and registered numbers of iterations through a core loop;
  • perhaps a spinner or counter in the case that there is no simple or accurate way to indicate a proportion of progress having been made;

so that the user can know roughly how long they can expect or wait for the completion, or in the latter case at least see visually and be more confident that the operation hasn't stalled.

(As we have seen, Dask has a similar feature for diagnostics etc.:

dask_progress_bar
)

There may be some users that don't want this feature so I suggest we have a global configuration option to disable it, but enable by default.

Implementation options

It wouldn't be difficult to code up a primitive progress bar and spinner, but for something available out-of-the-box and with more options and support, I think it would be better to use a dedicated progress bar library.

There are various such options for Python (there's a good summary here) but I think tqdm seems the best choice at the present time for features, low overhead, support available etc.

Lingua principale
Python
Stelle
150
Fork
23
Merge medio
1g 11h
PR unite (30g)
2

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di NCAS-CMS/cf-python

Tutte le issue di NCAS-CMS/cf-python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.