Adding a progress bar by default in a package
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 20/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- r
- Ambito
- developer-experience
Direzione di ricerca
Inizia dalla sezione della documentazione che descrive with_progress() e rivedi la discussione dell'issue sui gestori dell'avanzamento controllati dai package. Il lavoro è completato quando è stata raggiunta una decisione documentata sul fatto che i package debbano invocare with_progress() per impostazione predefinita e sono stati chiariti i comportamenti consigliati per gli utenti.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Hi,
I'm slightly confused by this part of the documentation about with_progress():
IMPORTANT: This function is meant for end users only. It should not be used by R packages, which only task is to signal progress updates, not to decide if, when, and how progress should be reported.
I don't know whether it's because I don't fully understand everything about progressr or if it's a design choice where we may disagree.
Here is my use case:
I have a function that may take some time to run (couple dozens of minutes in most cases) and I would like to signal progress by default to users. Previously we were using the pbmcapply package but we moved away from it to get the flexibility from future (especially parallel processing on windows machines). In order to achieve this, we wrapped our future_lapply() loop with with_progress() in the function provided by our package.
Now my understanding is that if users don't like the progress bar, they can disable it by using handlers("void"). We even added a note in the function documentation to inform them of this option. (This is also a nice improvement compared to the previous pbmcapply solution.)
My issue with the approach you describe for progressr (the user should be in charge of using with_progress()) is that most users won't look into the docs and probably never bother adding the progress bar, even though they may enjoy it if they knew.
TL;DR: does it make sense to use with_progress() in a package to choose sensible defaults for the user?
- Lingua principale
- R
- Stelle
- 299
- Fork
- 11
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di futureverse/progressr
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 63/100
futureverse/progressr#198 · 1 commento ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
futureverse/progressr#197 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
futureverse/progressr#195 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 28/100
futureverse/progressr#191 ·
-
question
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
futureverse/progressr#155 · 5 commenti ·
Tutte le issue di futureverse/progressr
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 95/100
tidymodels/textrecipes#332 ·