Skip to content

A suite of CellML files used to test validation methods

License

Notifications You must be signed in to change notification settings

biosimulations/cellml-validation

 
 

Repository files navigation

CellML Validation tools

This repository hosts:

  • A large set of CellML models that each either exemplify or break a rule in the CellML 1.0 specification
  • XML validation tools (DTD, Schema, RelaxNG) for CellML 1.0
  • Code to apply each validation method to each model file, and generate a report showing the results.

Please note that this repo is still under development, meaning the validation tools have not yet been fully tested.

The goal is to extend the 1.0 tests and tools to 1.1, and then 2.0.

The full suite of tests have been run on several validation and simulation tools. Reports of the test results can be viewed here.

CellML 2.0

CellML 1.1

Older files:

CellML 1.0

Older files:

The check utility

The check directory contains a Python module that can validate or convert CellML files, and which contains unit tests for various tools.

Installation

  1. Create a virtual environment for python 3: $ virtualenv venv -p python3 and activate it with $ source venv/bin/activate
  2. Install the requirements using pip: $ pip install -r requirements.txt

To add validation tools:

  • Use pip to install Myokit
  • Use pip to install cellmlmanip
  • Download and install OpenCOR, and update check/opencor_validation.py with the path to your OpenCOR installation.

Command-line use

To validate a single file use e.g.

python -m check schema_1_0 path/to/file.cellml

To convert a CellML file using XSLT use e.g.

python -m check xslt_1_to_2 original.cellml converted.cellml

For a full list of options use

python -m check

Unit tests

The check/tests directory contains pytest tests that run all the test files through the supported validation tools, check the result, and generate reports (see below). Dependening on how you look at it, this constitutes a test of the test files, of the tools, or both.

To run the full test suite type

pytest

To get more test output, use $ pytest -v or even $ pytest -v -s --log-cli-level=INFO.

Test output should consist of passes (the validator is correct, and we expected this) and xfails (the validator is wrong, and we expected this). An error or fail result indicates the test is behaving in an unexpected way (suggesting that the check module should be updated). For a full guide to interpreting the results, see the docstrings for assert_valid and assert_invalid in check/tests/shared.py.

Licensing

For details of licensing, see the file LICENSE.

In short:

  • The CellML test files included in this repository are all available under a BSD Zero Clause License (no attribution required).
  • Files by other authors (e.g. the CellML spec, related documents like the MathML schema, some validation methods) are either not copyrighted or contain a statement explaining their copyright.
  • All remaining files are covered by a BSD 3-Clause License.

About

A suite of CellML files used to test validation methods

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 98.2%
  • XSLT 1.8%