Skip to content

Commit c971569

Browse files
Merge pull request #6 from ModECI/test_xml3
Updated NeuroML generated & add tests that it's valid
2 parents c634375 + 6339fd0 commit c971569

12 files changed

+42
-28
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,17 @@ jobs:
5555
cd test
5656
python test.py
5757
58+
## Test NeuroML example
59+
60+
cd ../neuroml2
61+
python neuroml2_spec.py
62+
63+
pip install pyneuroml
64+
65+
# Requires: pip install pyneuroml
66+
pynml -validate hello_world_neuroml.net.nml
67+
pynml -validate TestNeuroML.xml
68+
5869
- name: Run pytest
5970
run: |
6071
pytest tests

examples/neuroml2/NeuroML2.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
## neuroML
1+
## neuroml
22
Some description...
33

44
### Allowed parameters
55
<table>
66
<tr>
77
<td><b>id</b></td>
88
<td>str</td>
9-
<td><i>The id of the neuroML 2 document</i></td>
9+
<td><i>The id of the NeuroML 2 document</i></td>
1010
</tr>
1111

1212

1313
<tr>
14-
<td><b>version</b></td>
14+
<td><b>xmlns</b></td>
1515
<td>str</td>
16-
<td><i>neuroML version used</i></td>
16+
<td><i>Schema for NeuroML 2, usually http://www.neuroml.org/schema/neuroml2</i></td>
1717
</tr>
1818

1919

examples/neuroml2/NeuroML2.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
=======
2-
neuroML
2+
neuroml
33
=======
44
Some description...
55

66
**Allowed parameters**
77

8-
=============== =========== ================================
8+
=============== =========== ====================================================================
99
Allowed field Data Type Description
10-
=============== =========== ================================
11-
**id** str The id of the neuroML 2 document
12-
**version** str neuroML version used
13-
=============== =========== ================================
10+
=============== =========== ====================================================================
11+
**id** str The id of the NeuroML 2 document
12+
**xmlns** str Schema for NeuroML 2, usually http://www.neuroml.org/schema/neuroml2
13+
=============== =========== ====================================================================
1414

1515
**Allowed children**
1616

examples/neuroml2/NeuroML2.specification.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
2-
"neuroML": {
2+
"neuroml": {
33
"definition": "Some description...",
44
"allowed_parameters": {
55
"id": {
66
"type": "str",
7-
"description": "The id of the neuroML 2 document"
7+
"description": "The id of the NeuroML 2 document"
88
},
9-
"version": {
9+
"xmlns": {
1010
"type": "str",
11-
"description": "neuroML version used"
11+
"description": "Schema for NeuroML 2, usually http://www.neuroml.org/schema/neuroml2"
1212
}
1313
},
1414
"allowed_children": {

examples/neuroml2/NeuroML2.specification.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
neuroML:
1+
neuroml:
22
definition: Some description...
33
allowed_parameters:
44
id:
55
type: str
6-
description: The id of the neuroML 2 document
7-
version:
6+
description: The id of the NeuroML 2 document
7+
xmlns:
88
type: str
9-
description: neuroML version used
9+
description: Schema for NeuroML 2, usually http://www.neuroml.org/schema/neuroml2
1010
allowed_children:
1111
izhikevich2007Cells:
1212
type: izhikevich2007Cell

examples/neuroml2/TestNeuroML.bson

-26 Bytes
Binary file not shown.

examples/neuroml2/TestNeuroML.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"TestNeuroML": {
3-
"version": "NeuroML_v2.3",
43
"izhikevich2007Cells": {
54
"izh2007RS0": {
65
"C": "100pF",

examples/neuroml2/TestNeuroML.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?xml version="1.0" ?>
2-
<neuroML id="TestNeuroML" version="NeuroML_v2.3">
2+
<neuroml xmlns="http://www.neuroml.org/schema/neuroml2" id="TestNeuroML">
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"/>
55
<network id="IzNet">
66
<population id="IzhPop0" component="izh2007RS0" size="1"/>
77
<explicitInput target="IzhPop0[0]" input="pulseGen_0"/>
88
</network>
9-
</neuroML>
9+
</neuroml>

examples/neuroml2/TestNeuroML.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
TestNeuroML:
2-
version: NeuroML_v2.3
32
izhikevich2007Cells:
43
izh2007RS0:
54
C: 100pF

examples/neuroml2/hello_world_neuroml.net.nml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<neuroml
22
xmlns="http://www.neuroml.org/schema/neuroml2"
3-
xmlns:xs="http://www.w3.org/2001/XMLSchema"
43
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
54
xsi:schemaLocation="http://www.neuroml.org/schema/neuroml2 https://raw.github.com/NeuroML/NeuroML2/development/Schemas/NeuroML2/NeuroML_v2.3.xsd"
65
id="IzhNeuron">

0 commit comments

Comments
 (0)