Skip to content

Commit

Permalink
Merge 3843474 into c9489ab
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Wathen committed May 20, 2020
2 parents c9489ab + 3843474 commit a9c260d
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 6 deletions.
5 changes: 5 additions & 0 deletions docs/source/extending/controllers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ In order to add a new controller, you will need to:
Unless the new controller is more complicated than the currently available
controllers, this can be done by following the example of the others.

6. In the :ref:`Minimizers` page of the :ref:`how` page, update with the new
software and minimizers following the structure there. Note: make sure that
you use `<software_name>` in :ref:`Minimizers` so that the software links
in the HTML tables link correctly to the documentation.

.. note::
For ease of maintenance, please add new controllers to a list of software in alphabetical order.

Expand Down
8 changes: 8 additions & 0 deletions fitbenchmarking/results_processing/base_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,11 +217,19 @@ def to_html(self, table, colour, links, error):
:return: HTLM table output
:rtype: str
"""
link_template = '<a href="https://fitbenchmarking.readthedocs.io/en/'\
'latest/concept/how/Minimizers.html#{0}" target="_blank">{0}</a>'
table.apply(lambda x: self.enable_error(x, error, "<sup>{}</sup>"),
axis=1, result_type='expand')
table.apply(lambda x: self.enable_link(x, links), axis=1,
result_type='expand')

minimizers_list = [(link_template.format(s), m)
for s in self.options.software
for m in self.options.minimizers[s]]
columns = pd.MultiIndex.from_tuples(minimizers_list)
table.columns = columns

index = []
for b, i in zip(self.best_results, table.index):
rel_path = os.path.relpath(path=b.support_page_link,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
background-color: #b30000;
} #T_318813df_7fe8_11ea_870a_fb713d9c56e2row1_col3 {
background-color: #fef0d9;
}</style><table id="T_318813df_7fe8_11ea_870a_fb713d9c56e2" ><thead> <tr> <th class="blank level0" ></th> <th class="col_heading level0 col0" colspan=4>scipy</th> </tr> <tr> <th class="blank level1" ></th> <th class="col_heading level1 col0" >lm-scipy-no-jac</th> <th class="col_heading level1 col1" >lm-scipy</th> <th class="col_heading level1 col2" >trf</th> <th class="col_heading level1 col3" >dogbox</th> </tr></thead><tbody>
}</style><table id="T_318813df_7fe8_11ea_870a_fb713d9c56e2" ><thead> <tr> <th class="blank level0" ></th> <th class="col_heading level0 col0" colspan=4><a href="https://fitbenchmarking.readthedocs.io/en/latest/concept/how/Minimizers.html#scipy" target="_blank">scipy</a></th> </tr> <tr> <th class="blank level1" ></th> <th class="col_heading level1 col0" >lm-scipy-no-jac</th> <th class="col_heading level1 col1" >lm-scipy</th> <th class="col_heading level1 col2" >trf</th> <th class="col_heading level1 col3" >dogbox</th> </tr></thead><tbody>
<tr>
<th id="T_318813df_7fe8_11ea_870a_fb713d9c56e2level0_row0" class="row_heading level0 row0" ><a href="../link1">prob_0</a></th>
<td id="T_318813df_7fe8_11ea_870a_fb713d9c56e2row0_col0" class="data row0 col0" ><a href="../link1">1 (1)<sup>1</sup></a></td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
background-image: linear-gradient(#b30000,#b30000,#b30000,#b30000);
} #T_318813de_7fe8_11ea_870a_fb713d9c56e2row1_col3 {
background-image: linear-gradient(#fef0d9,#fef0d9,#b30000,#b30000);
}</style><table id="T_318813de_7fe8_11ea_870a_fb713d9c56e2" ><thead> <tr> <th class="blank level0" ></th> <th class="col_heading level0 col0" colspan=4>scipy</th> </tr> <tr> <th class="blank level1" ></th> <th class="col_heading level1 col0" >lm-scipy-no-jac</th> <th class="col_heading level1 col1" >lm-scipy</th> <th class="col_heading level1 col2" >trf</th> <th class="col_heading level1 col3" >dogbox</th> </tr></thead><tbody>
}</style><table id="T_318813de_7fe8_11ea_870a_fb713d9c56e2" ><thead> <tr> <th class="blank level0" ></th> <th class="col_heading level0 col0" colspan=4><a href="https://fitbenchmarking.readthedocs.io/en/latest/concept/how/Minimizers.html#scipy" target="_blank">scipy</a></th> </tr> <tr> <th class="blank level1" ></th> <th class="col_heading level1 col0" >lm-scipy-no-jac</th> <th class="col_heading level1 col1" >lm-scipy</th> <th class="col_heading level1 col2" >trf</th> <th class="col_heading level1 col3" >dogbox</th> </tr></thead><tbody>
<tr>
<th id="T_318813de_7fe8_11ea_870a_fb713d9c56e2level0_row0" class="row_heading level0 row0" ><a href="../link1">prob_0</a></th>
<td id="T_318813de_7fe8_11ea_870a_fb713d9c56e2row0_col0" class="data row0 col0" ><a href="../link1">1 (1)<br>0.01 (238.1)<sup>1</sup></a></td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
background-color: #b30000;
} #T_318813e1_7fe8_11ea_870a_fb713d9c56e2row1_col3 {
background-color: #b30000;
}</style><table id="T_318813e1_7fe8_11ea_870a_fb713d9c56e2" ><thead> <tr> <th class="blank level0" ></th> <th class="col_heading level0 col0" colspan=4>scipy</th> </tr> <tr> <th class="blank level1" ></th> <th class="col_heading level1 col0" >lm-scipy-no-jac</th> <th class="col_heading level1 col1" >lm-scipy</th> <th class="col_heading level1 col2" >trf</th> <th class="col_heading level1 col3" >dogbox</th> </tr></thead><tbody>
}</style><table id="T_318813e1_7fe8_11ea_870a_fb713d9c56e2" ><thead> <tr> <th class="blank level0" ></th> <th class="col_heading level0 col0" colspan=4><a href="https://fitbenchmarking.readthedocs.io/en/latest/concept/how/Minimizers.html#scipy" target="_blank">scipy</a></th> </tr> <tr> <th class="blank level1" ></th> <th class="col_heading level1 col0" >lm-scipy-no-jac</th> <th class="col_heading level1 col1" >lm-scipy</th> <th class="col_heading level1 col2" >trf</th> <th class="col_heading level1 col3" >dogbox</th> </tr></thead><tbody>
<tr>
<th id="T_318813e1_7fe8_11ea_870a_fb713d9c56e2level0_row0" class="row_heading level0 row0" ><a href="../link1">prob_0</a></th>
<td id="T_318813e1_7fe8_11ea_870a_fb713d9c56e2row0_col0" class="data row0 col0" ><a href="../link1">False (0.5174)<sup>1</sup></a></td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
background-color: #b30000;
} #T_318813e0_7fe8_11ea_870a_fb713d9c56e2row1_col3 {
background-color: #b30000;
}</style><table id="T_318813e0_7fe8_11ea_870a_fb713d9c56e2" ><thead> <tr> <th class="blank level0" ></th> <th class="col_heading level0 col0" colspan=4>scipy</th> </tr> <tr> <th class="blank level1" ></th> <th class="col_heading level1 col0" >lm-scipy-no-jac</th> <th class="col_heading level1 col1" >lm-scipy</th> <th class="col_heading level1 col2" >trf</th> <th class="col_heading level1 col3" >dogbox</th> </tr></thead><tbody>
}</style><table id="T_318813e0_7fe8_11ea_870a_fb713d9c56e2" ><thead> <tr> <th class="blank level0" ></th> <th class="col_heading level0 col0" colspan=4><a href="https://fitbenchmarking.readthedocs.io/en/latest/concept/how/Minimizers.html#scipy" target="_blank">scipy</a></th> </tr> <tr> <th class="blank level1" ></th> <th class="col_heading level1 col0" >lm-scipy-no-jac</th> <th class="col_heading level1 col1" >lm-scipy</th> <th class="col_heading level1 col2" >trf</th> <th class="col_heading level1 col3" >dogbox</th> </tr></thead><tbody>
<tr>
<th id="T_318813e0_7fe8_11ea_870a_fb713d9c56e2level0_row0" class="row_heading level0 row0" ><a href="../link1">prob_0</a></th>
<td id="T_318813e0_7fe8_11ea_870a_fb713d9c56e2row0_col0" class="data row0 col0" ><a href="../link1">0.01 (238.1)<sup>1</sup></a></td>
Expand Down
7 changes: 5 additions & 2 deletions fitbenchmarking/templates/table_template.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<link rel="stylesheet" type="text/css" href="{{ table_style }}" />
<link rel="stylesheet" type="text/css" href="{{ custom_style }}" />
<link rel="stylesheet" type="text/css" href="{{ maths_style }}" />

<head>
<title>Fitbenchmark Results Table</title>
</head>
Expand All @@ -23,7 +23,7 @@ <h1>{{ result_name }}</h1>
</div>
{% endif %}
<section class="accordion">

<input type="checkbox" name="collapse" id="handle2" checked="checked">
<h2 class="handle">
<label for="handle2">Table</label>
Expand All @@ -46,6 +46,9 @@ <h2 class="handle">
<p>
Clicking the problem names will take you to details of the best minimizer.
</p>
<p>
Clicking the software name will take you to FitBenchmarking Read the Docs documentation for the selected software.
</p>
<h3>Errors</h3>
<p>
The superscripts in the tables denote current error handling within FitBenchmarking.
Expand Down

0 comments on commit a9c260d

Please sign in to comment.