[ENHANCEMENT] Job progress reporting (in command line)
Is your feature request related to a problem? Please describe. Users running the jobs without the GUI would like to receive more information about the progress of their jobs.
This could be combined with timing information https://github.com/ISISNeutronMuon/MDANSE/issues/559
Describe the solution you'd like We can:
- write information to standard output (for interactive sessions),
- rely on the log files for progress information (for batch jobs).
Describe alternatives you've considered N/A
Additional context This subject is still open for discussion.
There're several tools available for reporting progress, particularly in CLI environments which provide e.g. progress bars, timing estimates, etc.
-
tqdmis probably the most commonly used. Provides both simple wrappers on iterators and context managers. -
rich- A more recent entry which is primarily a rich-text engine, but provides progress bars as part of its core features. -
alive-progress- A primarily decorative progress bar library with spinners which always update to ensure that progress isn't frozen.
I would probably advise on using tqdm, injecting it into the init, run_step and finalise components of MDANSE.Framework.Jobs.IJob.IJob. It may be possible to even use it to provide regular information on progress to the GUI (such as time/iteration and estimated time remaining) automatically which may be useful. tqdm also has plugins which allow it to interface with QTConsole environments and possibly others.