Tweak the Progress class to be simpler. Given that progress does not need to support arbitrary depth but only has a single level the class now just exposes "sub_progress" to the caller. When the main progress is advanced the sub_progress is now fully deleted instead of just reset. The rational is that when the main progress is done and advances a step it is very likely that a new sub_progress is required and it's most likely an error if the same sub_progress will get re-used. This means that `reset()` can be removed as it's not used anymore (and YAGNI). We can add it back when we have a use-case. It also change the code so that "total" starts with 0 instead of `None` (principle of least surprise). This means that now `progress.incr()` is called in the JSONSeqMonitor() for `finish()` and `result()` to indicate that the pipeline/stage is finished. |
||
|---|---|---|
| .. | ||
| cases | ||
| data | ||
| mod | ||
| run | ||
| stages | ||
| .gitignore | ||
| __init__.py | ||
| conftest.py | ||
| initrd.py | ||
| test.py | ||