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.
Description
In this PR I demonstrate how the report table code can be updated using
tabulate
. The major advantage oftabulate
is that the person writing the code to present the table doesn't need to think about whitespace at all*. They simply make a data array acceptable totabulate
(e.g list of lists or list of dicts) and pass it into thetabulate
function with nice user options available.For demonstration purposes I drop usage of
gformat
to show how the table would look without strict lining up of the left- and right-most decimal places across rows. I also useuncertainties
ufloat
to format the value/uncertainty pairs describing the variable values.printfuncs.py
was not totally reworked. Only enough code was reworked to affect theexample_fit_with_bounds.py
example script.*Strictly speaking I did need to include an
indent_string_block
function to allow me to have the tables be "nested" under their respective heading. It would be nice iftabulate
had a "left pad" feature that did this internally.Type of Changes
Tested on
Verification
Have you