cloud-oak/ProgressBars.jl

Use Base logging for progress bars?

ChrisRackauckas opened this issue · 3 comments

Base has a way to log progress information. Juno is using:

@logmsg -1 "making progress" progress=0.5 # or progress=NaN, or progress="done"

This means that the standard logging setup can generate the logging information. It would be good if ProgressBars.jl becomes simply a way of displaying this logging information. This way every package can natively support progress meters and how it is displayed just becomes a user-preference or IDE side issue.

This should be done in coordination with @pfitzseb and his work on Juno.

Xref: SciML/DifferentialEquations.jl#424

khdlr commented

Hi Chris, I'd be happy to work on this.

Let me know, if I understood this correctly:

The long-running process (e.g. the ODE solver) emits it's progress updates via the @logmsg macro, and Juno currently has a way of displaying the progress nicely. You would like the terminal progress bar to also implement this interface for command line use?

I'll try and come up with an implementation for that.

Cheers,
Konrad

Yes exactly. It's a common logging format set by Julia Base and it would be really nice if a console progress meter supported that similarly to Juno, since then it would make the logging data be complete on our side and the display format would then just be user choice.

Also relevant: JunoLab/Juno.jl#400.