progress
progress copied to clipboard
IDEA/WISH: End user controlling progress output format - not developer?
Is there a way for the end user, rather than the developer, to control the progress output format? Could it be as simple as having the format argument default to getOption("progress.format", "[:bar] :percent")?
This can obviously be done as pb <- progress_bar(format = getOption("progress.format", "[:bar] :percent"), ...) by whatever code / package using {progress}, but it would be nice if there [cw]ould be one central standard. It could also result in a "good-practices" recommendation to the developer to avoid to/never specify the format and instead leave that to the end user.
The problem with that, is that we need to figure out what to do if the specified format does not match the progress data. E.g. if you have "[:bar] :percent" for an unknown-sized download. Or when pkgman is downloading x packages and building y at the same time.
The developer can anticipate these and have a proper format, but the user can't.
This is now supported in the progress bars of the cli package: https://cli.r-lib.org/reference/index.html#progress-bars