biosimulators / Biosimulators_utils

Utilities for building standardized command-line interfaces for biosimulation software packages
https://docs.biosimulators.org/Biosimulators_utils
MIT License
4 stars 6 forks source link

Incorporate validation of CellML files #36

Closed jonrkarr closed 3 years ago

jonrkarr commented 3 years ago

Can be done once there's a libCellML distribution for Python3.9/Linux (could also be done by compiling from source, but a precompiled distribution is easier).

jonrkarr commented 3 years ago
# read model
parser = libcellml.Parser()
with open(filename, 'r') as file:
    model = parser.parseModel(file.read())
parser.errorCount()
parser.warningCount()

# validate model
validator = libcellml.Validator()
validator.validate(model)
validator.errorCount()
validator.warningCount()
jonrkarr commented 3 years ago

Incorporated validation for CellML 2.0 into 0.1.70. Note, libCellML only supports CellML 2.0 and few, if any, 2.0 models use this version yet.