biosimulators_utils.model_lang.lems package — BioSimulators utils 0.1.154 documentation

# biosimulators_utils.model_lang.lems package

## Submodules

## biosimulators_utils.model_lang.lems.validation module

Utilities for validating LEMS models

Author

  Jonathan Karr <karr@mssm.edu>

Date

  2021-06-03

Copyright

  2021, Center for Reproducible Biomedical Modeling

License

  MIT

biosimulators_utils.model_lang.lems.validation.validate_model(filename, name=None, config=None)

  Check that a model is valid

  Parameters

    - filename (`str`) – path to model

    - name (`str`, optional) – name of model for use in error messages

    - config (`Config`, optional) – whether to fail on missing includes

  Returns

    - nested `list` of `str`: nested list of errors (e.g., required ids missing or ids not unique)

    - nested `list` of `str`: nested list of errors (e.g., required ids missing or ids not unique)

    - `Model`: model

  Return type

    `tuple`

biosimulators_utils.model_lang.lems.validation.validate_neuroml2_lems_file()

  Validate a NeuroML 2 LEMS file using jNeuroML. Note that this uses jNeuroML and so is aware of the standard NeuroML LEMS definitions. TODO: allow inclusion of other paths for user-defined LEMS definitions (does the -norun option allow the use of -I?) :param nml2_lems_file_name: name of file to validate :type nml2_lems_file_name: str :param max_memory: memory to use for the Java virtual machine :type max_memory: str :param exit_on_fail: toggle whether command should exit if jnml fails :type exit_on_fail: bool :param return_string: toggle whether the output string should be returned :type return_string: bool :returns: Either a bool, or a tuple (bool, str): True if jnml ran without errors, false if jnml fails; along with the message returned by jnml