Closed
Description
- I'd like to check and make sure that it was purposeful that
cli_progress_set()
usesi
rather thani + 1
here in the loopLine 40 in 8b2c3cf
- I'd also like to see if we should consider putting
cli_progress_set()
after the call to.f
(brought about by thinking about Vignette: Increment progressor after iteration futureverse/furrr#248)
In particular, this example has two quirks:
library(purrr)
x <- 1:5
map(x, .progress = TRUE, function(elt) {
Sys.sleep(4)
})
- The progress bar doesn't show up at all until after the first iteration (i.e. about 4 seconds in). I don't know if this is a consequence of
show_after
or the fact that we are settingi = 0
on the first iteration. - The progress bar never actually hits 100%. On the last iteration we set
i = 4
, which corresponds to 80% which does show up, but then we do the last iteration and exit the loop. I assume that callingcli_progress_done()
will mark it as 100%, and that does seem to be the case if you setclear = FALSE
, but I still wonder if we should be usingi + 1
in the loop.
CC @gaborcsardi
Metadata
Metadata
Assignees
Labels
No labels