:mod:`memote.suite.api` ======================= .. py:module:: memote.suite.api .. autoapi-nested-parse:: Programmatically interact with the memote test suite. .. !! processed by numpydoc !! Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: memote.suite.api.validate_model memote.suite.api.test_model memote.suite.api.snapshot_report memote.suite.api.history_report memote.suite.api.diff_report .. function:: validate_model(path) Validate a model structurally and optionally store results as JSON. :Parameters: **path** Path to model file. :Returns: tuple cobra.Model The metabolic model under investigation. tuple A tuple reporting on the SBML level, version, and FBC package version used (if any) in the SBML document. dict A simple dictionary containing a list of errors and warnings. .. !! processed by numpydoc !! .. function:: test_model(model, sbml_version=None, results=False, pytest_args=None, exclusive=None, skip=None, experimental=None, solver_timeout=10) Test a model and optionally store results as JSON. :Parameters: **model** : cobra.Model The metabolic model under investigation. **sbml_version: tuple, optional** A tuple reporting on the level, version, and FBC use of the SBML file. **results** : bool, optional Whether to return the results in addition to the return code. **pytest_args** : list, optional Additional arguments for the pytest suite. **exclusive** : iterable, optional Names of test cases or modules to run and exclude all others. Takes precedence over ``skip``. **skip** : iterable, optional Names of test cases or modules to skip. **solver_timeout: int, optional** Timeout in seconds to set on the mathematical optimization solver (default 10). :Returns: int The return code of the pytest suite. memote.Result, optional A nested dictionary structure that contains the complete test results. .. !! processed by numpydoc !! .. function:: snapshot_report(result, config=None, html=True) Generate a snapshot report from a result set and configuration. :Parameters: **result** : memote.MemoteResult Nested dictionary structure as returned from the test suite. **config** : dict, optional The final test report configuration (default None). **html** : bool, optional Whether to render the report as full HTML or JSON (default True). .. !! processed by numpydoc !! .. function:: history_report(history, config=None, html=True) Test a model and save a history report. :Parameters: **history** : memote.HistoryManager The manager grants access to previous results. **config** : dict, optional The final test report configuration. **html** : bool, optional Whether to render the report as full HTML or JSON (default True). .. !! processed by numpydoc !! .. function:: diff_report(diff_results, config=None, html=True) Generate a diff report from a result set and configuration. :Parameters: **diff_results** : iterable of memote.MemoteResult Nested dictionary structure as returned from the test suite. **config** : dict, optional The final test report configuration (default None). **html** : bool, optional Whether to render the report as full HTML or JSON (default True). .. !! processed by numpydoc !!