Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #222: Set auto width on html tables #274

Merged
merged 4 commits into from
Nov 5, 2019
Merged

Conversation

AndrewLister-STFC
Copy link
Contributor

Description of Work

Fixes #222

Adds title to html tables and sets the size of columns in the html table to auto.

Testing Instructions

  1. Run fitbenchmarking with only 1 minimizer
  2. Compare resulting table with master

Function: Does the change do what it's supposed to?

Tests: Does it pass? Is there adequate coverage for new code?

Style: Is the coding style consistent? Is anything overly confusing?

Documentation: Is there a suitable change to documentation for this change?

@wathen
Copy link
Collaborator

wathen commented Oct 29, 2019

Auto formatting the columns in the table of results changes the size of all the columns, see below. Personally I don't think this is a problem. What do you think @tyronerees and @Anders-Markvardsen?

Auto_format_table

@tyronerees
Copy link
Member

This fails for me:

Producing output for the short_neutron problem set

<string>:3: (ERROR/3) Error in "table" directive:
unknown option: "widths".

.. table:: FitBenchmarking Results
   :widths: auto

   +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------+-----------------------------------------+-----------------------------------------+-----------------------------------------+-----------------------------------------+-----------------------------------------+-----------------------------------------+-----------------------------------------+-----------------------------------------+
   |                                                                                                                                                                                                                   |BFGS                                     |Conjugate gradient (Fletcher-Reeves imp.)|Conjugate gradient (Polak-Ribiere imp.)  |Damped GaussNewton                       |Levenberg-Marquardt                      |Levenberg-MarquardtMD                    |Simplex                                  |SteepestDescent                          |Trust Region                             |
   +===================================================================================================================================================================================================================+=========================================+=========================================+=========================================+=========================================+=========================================+=========================================+=========================================+=========================================+=========================================+
   |`ENGINX 193749 calibration, spectrum 651, peak 19 1 </home/dgk98065/fitbenchmarking/results/short_neutron/support_pages/short_neutron_enginx_193749_calibration_spectrum_651_peak_19_1.html>`__                    | :ranking-top-1:`388.4 (1.005)`          | :ranking-top-1:`390.6 (1.011)`          | :ranking-top-1:`391 (1.012)`            | :ranking-low-5:`inf (inf)`              | :ranking-top-1:`388.8 (1.006)`          | :ranking-top-1:`388.9 (1.006)`          | :ranking-top-1:`421.1 (1.089)`          | :ranking-med-3:`518.8 (1.342)`          | :ranking-top-1:`386.6 (1)`              |
   +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------+-----------------------------------------+-----------------------------------------+-----------------------------------------+-----------------------------------------+-----------------------------------------+-----------------------------------------+-----------------------------------------+-----------------------------------------+
   |`WISH17701 panel 103 tube 3 calibration, peak 1 1 </home/dgk98065/fitbenchmarking/results/short_neutron/support_pages/short_neutron_wish17701_panel_103_tube_3_calibration_peak_1_1.html>`__                       | :ranking-low-5:`7.221e+07 (3.162)`      | :ranking-low-5:`7.084e+07 (3.103)`      | :ranking-low-5:`8.855e+07 (3.878)`      | :ranking-top-1:`2.283e+07 (1)`          | :ranking-low-5:`2.585e+08 (11.32)`      | :ranking-top-1:`2.283e+07 (1)`          | :ranking-low-5:`8.813e+07 (3.86)`       | :ranking-low-5:`1.216e+08 (5.325)`      | :ranking-top-1:`2.283e+07 (1)`          |
   +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------+-----------------------------------------+-----------------------------------------+-----------------------------------------+-----------------------------------------+-----------------------------------------+-----------------------------------------+-----------------------------------------+-----------------------------------------+


<string>:3: (ERROR/3) Error in "table" directive:
unknown option: "widths".

.. table:: FitBenchmarking Results
   :widths: auto

   +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------+-----------------------------------------+-----------------------------------------+-----------------------------------------+-----------------------------------------+-----------------------------------------+-----------------------------------------+-----------------------------------------+-----------------------------------------+
   |                                                                                                                                                                                                                   |BFGS                                     |Conjugate gradient (Fletcher-Reeves imp.)|Conjugate gradient (Polak-Ribiere imp.)  |Damped GaussNewton                       |Levenberg-Marquardt                      |Levenberg-MarquardtMD                    |Simplex                                  |SteepestDescent                          |Trust Region                             |
   +===================================================================================================================================================================================================================+=========================================+=========================================+=========================================+=========================================+=========================================+=========================================+=========================================+=========================================+=========================================+
   |`ENGINX 193749 calibration, spectrum 651, peak 19 1 </home/dgk98065/fitbenchmarking/results/short_neutron/support_pages/short_neutron_enginx_193749_calibration_spectrum_651_peak_19_1.html>`__                    | :ranking-low-5:`0.05259 (7.071)`        | :ranking-low-5:`0.08863 (11.92)`        | :ranking-low-5:`0.1199 (16.12)`         | :ranking-top-1:`0.007438 (1)`           | :ranking-low-5:`0.06209 (8.348)`        | :ranking-low-5:`0.02951 (3.967)`        | :ranking-low-5:`0.0737 (9.908)`         | :ranking-low-5:`0.3361 (45.19)`         | :ranking-low-5:`0.404 (54.32)`          |
   +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------+-----------------------------------------+-----------------------------------------+-----------------------------------------+-----------------------------------------+-----------------------------------------+-----------------------------------------+-----------------------------------------+-----------------------------------------+
   |`WISH17701 panel 103 tube 3 calibration, peak 1 1 </home/dgk98065/fitbenchmarking/results/short_neutron/support_pages/short_neutron_wish17701_panel_103_tube_3_calibration_peak_1_1.html>`__                       | :ranking-low-5:`0.1254 (14.39)`         | :ranking-low-5:`0.05936 (6.813)`        | :ranking-low-5:`0.05916 (6.791)`        | :ranking-top-2:`0.01014 (1.164)`        | :ranking-top-1:`0.008712 (1)`           | :ranking-top-2:`0.01006 (1.155)`        | :ranking-med-3:`0.01496 (1.717)`        | :ranking-low-5:`0.03498 (4.015)`        | :ranking-top-2:`0.01028 (1.18)`         |
   +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------+-----------------------------------------+-----------------------------------------+-----------------------------------------+-----------------------------------------+-----------------------------------------+-----------------------------------------+-----------------------------------------+-----------------------------------------+



Completed benchmarking for short_neutron problem set

@AndrewLister-STFC
Copy link
Contributor Author

AndrewLister-STFC commented Oct 29, 2019

This fails for me:

@tyronerees can you check your verson of docutils? I've just spotted that the table directive is from ver 0.3.1

@tyronerees
Copy link
Member

This fails for me:

@tyronerees can you check the verson of docutils? I've just spotted that the table directive is from ver 0.3.1

docultils.__version__ gives 0.12, so I would have thought this should be fine(?)

@tyronerees
Copy link
Member

@AndrewLister-STFC just looking at the docutils release notes -- did you mean 0.13.1? I see that release added "tables accept widths, a list and align", which I guess is what you've used here.

0.13.1 is from 2016, so hardly bleeding edge -- I'll add a minimum of 0.13.1 to the setup.py

The ability to control the width in tables was added in
docutils version 0.13.1
@AndrewLister-STFC
Copy link
Contributor Author

I was looking at the ref docs which say (New in Docutils 0.3.1) for the tables directive, but doesn't mention anything on widths. Found the release history just before you commented it

@wathen wathen merged commit 5e0b8c2 into master Nov 5, 2019
@wathen wathen deleted the 222-first_column_too_long branch November 5, 2019 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Review column formatting
3 participants