WIP: Add progress reporting functionality
Description
There are some tasks which can run for a very long time without printing any kind of output to indicate they're still going. This adds a way of reporting progress during that time.
Note: This is very rough around the edges at the moment, and I'd appreciate suggestions on how to make it better.
Changes proposed in this merge request:
- A new
Progress
object, which keeps track of the progress made in a task - Context is able to generate
Progress
es in a context manager, and has a single point of entry for outputting progress messages. - When loading elements, it keeps a track of the current number of elements loaded, and the current total number of elements to load.
- Because loading elements involves recursively discovering which elements need to be loaded, the total is not very helpful at the moment.
- When resolving elements (turning them from a
MetaElement
into anElement
), it keeps track of the number of elements resolved.
This merge request, when approved, will close: #1029