afdko
afdko copied to clipboard
[checkoutlinesufo] progress bar improvements
I am a big fan of the new progress bar in makeinstancesufo. Thanks for that @punchcutter ! :-)
A few cosmetic improvements would make it perfect:
- the
it/sindication is not very informative. Glyphs/s would be cooler, but perhaps those stats can just be left out - progress bar continuity breaks in
-v(verbose) mode - progress bar continuity breaks if another tool has something to say, e.g. here:

- it would be cool to indicate the instance name somewhere.
This is the checkoutlinesufo progress bar here. I haven't made a PR yet for the progress bar in makeinstancesufo which is actually in ufoProcessor. But the same things need to be handled.
A possible band-aid (until we're able to add better progress and wrangle individual tool output in makeinstancesufo itself) is to disable the refresh on checkoutlinesufo's progress bar here:
https://github.com/adobe-type-tools/afdko/blob/2956bf0db0aaff2a8dca09459fca73fdee616fc0/python/afdko/checkoutlinesufo.py#L1036-L1037
... basically add refresh=not(options.quiet_mode) to the set_description call. I have a branch with that change if you want to play around with it @frankrolf. See https://github.com/adobe-type-tools/afdko/tree/jh-checkoutlines-progress
I think part of the clutter (partial progress bars) is related to the adoption of multiprocessing in makeinstancesufo -- the individual processes are stepping on the output of others in the pool.
Also "quiet_mode" in checkoutlinesufo is not really very quiet (the progressbar still displays...) but that's probably a separate issue.
It seems the branch version does indeed create fewer broken progress bars.
It’s still possible to break them using -v (verbose) though.
(Side note here: the -v output is very overwhelming, and it’s impossible to see which instance a given error message belongs to.)
I think you are right about checkoutlinesufo’s quiet mode really needing to be quiet – no output.
That would also make it simpler to have a meaningful, single progress bar spanning all of the instances in makeinstancesufo.