memote.suite.reporting
¶
Subpackage for creating visually pleasing reports of test results.
There are three types of reports that we support:
1. Snapshot Report
: A one-time report of a model giving a good insight
into its current state.
2. History Report
: A more elaborate report that makes use of the model
development over time (aka git history).
3. Diff Report
: A comparison report between two different versions of the
same model or across different models (similar to a diff).
Submodules¶
Package Contents¶
Classes¶
ReportConfiguration |
Collect the metabolic model test suite results. |
Report |
Determine the abstract report interface. |
SnapshotReport |
Render a one-time report from the given model results. |
Report |
Determine the abstract report interface. |
HistoryReport |
Render a rich report using the git repository history. |
Report |
Determine the abstract report interface. |
DiffReport |
Render a report displaying the results of two or more models side-by-side. |
-
class
memote.suite.reporting.
ReportConfiguration
(*args, **kwargs)[source]¶ Bases:
dict
Collect the metabolic model test suite results.
-
classmethod
load
(cls, filename=None)¶ Load a test report configuration.
-
merge
(self, other)¶ Merge a custom configuration.
-
classmethod
-
class
memote.suite.reporting.
Report
(result, configuration, **kwargs)¶ Bases:
object
Determine the abstract report interface.
Attributes: - result : memote.MemoteResult
The dictionary structure of results.
- configuration : memote.MemoteConfiguration
A memote configuration structure.
-
render_json
(self, pretty=False)¶ Render the report results as JSON.
Parameters: - pretty : bool, optional
Whether to format the resulting JSON in a more legible way ( default False).
-
render_html
(self)¶ Render an HTML report.
-
get_configured_tests
(self)¶ Get tests explicitly configured.
-
determine_miscellaneous_tests
(self)¶ Identify tests not explicitly configured in test organization.
List them as an additional card called Misc, which is where they will now appear in the report.
-
compute_score
(self)¶ Calculate the overall test score using the configuration.
-
class
memote.suite.reporting.
SnapshotReport
(**kwargs)[source]¶ Bases:
memote.suite.reporting.report.Report
Render a one-time report from the given model results.
Attributes: - result : memote.MemoteResult
The dictionary structure of results.
- configuration : memote.MemoteConfiguration
A memote configuration structure.
-
class
memote.suite.reporting.
Report
(result, configuration, **kwargs) Bases:
object
Determine the abstract report interface.
Attributes: - result : memote.MemoteResult
The dictionary structure of results.
- configuration : memote.MemoteConfiguration
A memote configuration structure.
-
render_json
(self, pretty=False) Render the report results as JSON.
Parameters: - pretty : bool, optional
Whether to format the resulting JSON in a more legible way ( default False).
-
render_html
(self) Render an HTML report.
-
get_configured_tests
(self) Get tests explicitly configured.
-
determine_miscellaneous_tests
(self) Identify tests not explicitly configured in test organization.
List them as an additional card called Misc, which is where they will now appear in the report.
-
compute_score
(self) Calculate the overall test score using the configuration.
-
memote.suite.reporting.
LOGGER
[source]
-
class
memote.suite.reporting.
HistoryReport
(history, configuration, **kwargs)[source]¶ Bases:
memote.suite.reporting.report.Report
Render a rich report using the git repository history.
Attributes: - configuration : memote.MemoteConfiguration
A memote configuration structure.
-
collect_history
(self)¶ Build the structure of results in terms of a commit history.
-
class
memote.suite.reporting.
Report
(result, configuration, **kwargs) Bases:
object
Determine the abstract report interface.
Attributes: - result : memote.MemoteResult
The dictionary structure of results.
- configuration : memote.MemoteConfiguration
A memote configuration structure.
-
render_json
(self, pretty=False) Render the report results as JSON.
Parameters: - pretty : bool, optional
Whether to format the resulting JSON in a more legible way ( default False).
-
render_html
(self) Render an HTML report.
-
get_configured_tests
(self) Get tests explicitly configured.
-
determine_miscellaneous_tests
(self) Identify tests not explicitly configured in test organization.
List them as an additional card called Misc, which is where they will now appear in the report.
-
compute_score
(self) Calculate the overall test score using the configuration.
-
class
memote.suite.reporting.
DiffReport
(diff_results, configuration, **kwargs)[source]¶ Bases:
memote.suite.reporting.report.Report
Render a report displaying the results of two or more models side-by-side.
Attributes: - diff_results : python.Dictionary
The dictionary structure of memote.MemoteResult objects.
- configuration : memote.MemoteConfiguration
A memote configuration structure.
-
format_and_score_diff_data
(self, diff_results)¶ Reformat the api results to work with the front-end.