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)[source]

Check that a model is valid

Parameters
  • filename (str) – path to model

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

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(nml2_lems_file_name, max_memory='400M')[source]

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?)

Parameters
  • nml2_lems_file_name (str) – name of file to validate

  • max_memory (str) – memory to use for the Java virtual machine

Returns

True if valid, False if invalid