Abstract progress bars
- Dominant language
- C++
- Stars
- 607
- Forks
- 67
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 1
Description
I think it might be possible to turn bits of code like:
```r
if (verbose) {
pb_warmup <- create_progress_bar(
phase = "warmup",
iter = c(self$warmup, n_samples),
pb_update = pb_update,
width = self$pb_width
)
iterate_progress_bar(
pb = pb_warmup,
it = 0,
rejects = 0,
chains = self$n_chains,
file = self$pb_file
)
} else {
```
into something like
```r
pb_warmup <- create_progress_bar_warmup()
iterate_progress_bar(pb_warmup, 0, 0)
```
Perhaps by putting a couple of objects into the slots of R6 objects? It's a small change, but it happens in a couple of places and it might just be another small thing to improve clarity when viewing the code
Contributor guide
Assessment
This issue has not been assessed yet.