Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A version of the
csv-reports
branch that isn't tangled up in #1062 (sorry about that! 😊)This PR is mainly about making more extensive use of Python's CSV writing module. The aim of that is to make more of our reported information easily readable from within Jupyter; that already renders CSV files much more nicely than plain text and many of our reports were distinctly tabular. The PR tames the Python code (which has some nasty internal aspects) using a context manager.
The old reports are not removed. And some of our reports are very bad fits for tabular reporting as they're much more tree structured in the information they're presenting. (I looked at reports produced by other parts of the stack, but these seemed to be the most convertible ones anyway.)
Also:
FecDataView.get_run_dir_file_name()
which does a pretty common pattern in one place instead of scattering it all over. (I've left the type annotations on that one; they're trivial and harmless.)