:mod:`memote.suite.reporting` ============================= .. py:module:: memote.suite.reporting .. autoapi-nested-parse:: 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). .. !! processed by numpydoc !! Submodules ---------- .. toctree:: :titlesonly: :maxdepth: 1 config/index.rst diff/index.rst history/index.rst report/index.rst snapshot/index.rst Package Contents ---------------- Classes ~~~~~~~ .. autoapisummary:: memote.suite.reporting.ReportConfiguration memote.suite.reporting.Report memote.suite.reporting.SnapshotReport memote.suite.reporting.Report memote.suite.reporting.HistoryReport memote.suite.reporting.Report memote.suite.reporting.DiffReport .. py:class:: ReportConfiguration(*args, **kwargs) Bases: :class:`dict` Collect the metabolic model test suite results. .. !! processed by numpydoc !! .. classmethod:: load(cls, filename=None) Load a test report configuration. .. !! processed by numpydoc !! .. method:: merge(self, other) Merge a custom configuration. .. !! processed by numpydoc !! .. py:class:: Report(result, configuration, **kwargs) Bases: :class:`object` Determine the abstract report interface. :Attributes: **result** : memote.MemoteResult The dictionary structure of results. **configuration** : memote.MemoteConfiguration A memote configuration structure. .. !! processed by numpydoc !! .. method:: 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). .. !! processed by numpydoc !! .. method:: render_html(self) Render an HTML report. .. !! processed by numpydoc !! .. method:: get_configured_tests(self) Get tests explicitly configured. .. !! processed by numpydoc !! .. method:: 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. .. !! processed by numpydoc !! .. method:: compute_score(self) Calculate the overall test score using the configuration. .. !! processed by numpydoc !! .. data:: LOGGER .. py:class:: SnapshotReport(**kwargs) Bases: :class:`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. .. !! processed by numpydoc !! .. py:class:: Report(result, configuration, **kwargs) Bases: :class:`object` Determine the abstract report interface. :Attributes: **result** : memote.MemoteResult The dictionary structure of results. **configuration** : memote.MemoteConfiguration A memote configuration structure. .. !! processed by numpydoc !! .. method:: 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). .. !! processed by numpydoc !! .. method:: render_html(self) Render an HTML report. .. !! processed by numpydoc !! .. method:: get_configured_tests(self) Get tests explicitly configured. .. !! processed by numpydoc !! .. method:: 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. .. !! processed by numpydoc !! .. method:: compute_score(self) Calculate the overall test score using the configuration. .. !! processed by numpydoc !! .. data:: LOGGER .. py:class:: HistoryReport(history, configuration, **kwargs) Bases: :class:`memote.suite.reporting.report.Report` Render a rich report using the git repository history. :Attributes: **configuration** : memote.MemoteConfiguration A memote configuration structure. .. !! processed by numpydoc !! .. method:: collect_history(self) Build the structure of results in terms of a commit history. .. !! processed by numpydoc !! .. py:class:: Report(result, configuration, **kwargs) Bases: :class:`object` Determine the abstract report interface. :Attributes: **result** : memote.MemoteResult The dictionary structure of results. **configuration** : memote.MemoteConfiguration A memote configuration structure. .. !! processed by numpydoc !! .. method:: 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). .. !! processed by numpydoc !! .. method:: render_html(self) Render an HTML report. .. !! processed by numpydoc !! .. method:: get_configured_tests(self) Get tests explicitly configured. .. !! processed by numpydoc !! .. method:: 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. .. !! processed by numpydoc !! .. method:: compute_score(self) Calculate the overall test score using the configuration. .. !! processed by numpydoc !! .. py:class:: DiffReport(diff_results, configuration, **kwargs) Bases: :class:`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. .. !! processed by numpydoc !! .. method:: format_and_score_diff_data(self, diff_results) Reformat the api results to work with the front-end. .. !! processed by numpydoc !!