Skip to content

Commit 02de41a

Browse files
authored
Merge pull request #64 from ModECI/test_sbml
Adds SBML API generation example
2 parents c2317e5 + 37a9da1 commit 02de41a

34 files changed

+5990
-94
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,21 +47,30 @@ jobs:
4747
run: |
4848
pip list
4949
50-
- name: Run some examples
50+
- name: Run simple examples
5151
run: |
5252
cd examples
5353
python document.py
5454
5555
cd test
5656
python test.py
5757
58-
## Test NeuroML example
58+
- name: Test NeuroML examples
59+
if: ${{ matrix.python-version != '3.7'}}
60+
run: |
5961
60-
cd ../neuroml2
62+
cd examples/neuroml2
6163
python neuroml2_spec.py
6264
6365
# Note: NeuroML files will be validated with OMV below
6466
67+
- name: Test SBML examples
68+
if: ${{ matrix.python-version != '3.7'}}
69+
run: |
70+
71+
cd examples/sbml
72+
./regenerateAndTest.sh
73+
6574
- name: Run pytest
6675
run: |
6776
pytest tests

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,3 +163,4 @@ cython_debug/
163163
.idea/
164164
/examples/document.specification.bson
165165
/examples/neuroml2/hello_world.v.dat
166+
/examples/sbml/example_sbml_test.xml

docs/sphinx/source/api/Contributors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Modelspec contributors
44

55
This page list names and Github profiles of contributors to Modelspec, listed in no particular order.
6-
This page is generated periodically, most recently on 2023-09-13.
6+
This page is generated periodically, most recently on 2023-09-19.
77

88
- Padraig Gleeson ([@pgleeson](https://github.com/pgleeson))
99
- Manifest Chakalov ([@mqnifestkelvin](https://github.com/mqnifestkelvin))

docs/sphinx/source/api/examples/document.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
<?xml version="1.0" ?>
2-
<Document id="MyBook" title="My life in Python" ISBN="None">
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Document id="MyBook" title="My life in Python">
33
<Section id="Abstract">
44
<Paragraph contents="Blah blah blah"/>
55
<Paragraph contents="Blah2"/>

examples/COMBINE.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# COMBINE standards in modelspec
2+
3+
![combine](images/combine.png)
4+
5+
To illustrate the utility of modelspec, and to create a uniform, compatible set of APIs across a diverse range of model specification formats, we are investigating the [COMBINE set of standards in computational biology](https://co.mbine.org/standards/), and attempting to express these formats in modelspec.
6+
7+
## NeuroML
8+
9+
![neuroml](images/neuroml.png)
10+
11+
A preliminary version of an API for [NeuroML2](https://docs.neuroml.org/Userdocs/NeuroMLv2.html) can be found [here](neuroml2). This allows generation of NeuroML2 models using the modelspec based API, saving as valid XML, as well as JSON, YAML and BSON equivalents. See [neuroml2_spec.py](neuroml2/neuroml2_spec.py).
12+
13+
[NeuroMLlite](https://github.com/NeuroML/NeuroMLlite) already uses modelspec as its primary specification format. See [here](https://github.com/NeuroML/NeuroMLlite/blob/master/neuromllite/__init__.py).
14+
15+
## SBML
16+
17+
![combine](images/sbml.png)
18+
19+
Work towards an API for [SBML](https://www.sbml.org/) can be found [here](sbml).
20+
21+
An example of an SBML file generated from this is [here](sbml/test_minimal_example.xml).
22+
23+
## CellML
24+
25+
TODO...
26+
27+
## SED-ML
28+
29+
TODO...

examples/document.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
<?xml version="1.0" ?>
2-
<Document id="MyBook" title="My life in Python" ISBN="None">
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Document id="MyBook" title="My life in Python">
33
<Section id="Abstract">
44
<Paragraph contents="Blah blah blah"/>
55
<Paragraph contents="Blah2"/>

examples/images/combine.png

165 KB
Loading

examples/images/neuroml.png

3.8 KB
Loading

examples/images/sbml.png

17.9 KB
Loading

examples/neuroml2/TestNeuroML.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version="1.0" ?>
1+
<?xml version="1.0" encoding="UTF-8"?>
22
<neuroml xmlns="http://www.neuroml.org/schema/neuroml2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="TestNeuroML" xsi:schemaLocation="http://www.neuroml.org/schema/neuroml2 https://raw.github.com/NeuroML/NeuroML2/development/Schemas/NeuroML2/NeuroML_v2.3.xsd">
33
<izhikevich2007Cell id="izh2007RS0" C="100pF" v0="-60mV" k="0.7nS_per_mV" vr="-60mV" vt="-40mV" vpeak="35mV" a="0.03per_ms" b="-2nS" c="-50.0mV" d="100pA"/>
44
<pulseGenerator id="pulseGen_0" delay="100ms" duration="800ms" amplitude="0.07 nA"/>

0 commit comments

Comments
 (0)