Skip to content

Commit 29c8ccc

Browse files
authored
Merge pull request #50 from mqnifestkelvin/feature_xml_3
Testing XML
2 parents df78735 + 75796ed commit 29c8ccc

18 files changed

+135
-273
lines changed

examples/document.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
from modelspec import field, instance_of, optional
33
from modelspec.base_types import Base
44
from typing import List
5-
from modelspec.utils import save_to_xml_file
65

76
# Example showing how to create a model of a document and use it to create/serialize instances
87

@@ -109,5 +108,3 @@ class Document(Base):
109108

110109
with open("document.specification.bson", "wb") as d:
111110
d.write(bson.encode(doc_dict))
112-
113-
save_to_xml_file(doc, "document.specification.xml")

examples/document.specification.xml

Lines changed: 0 additions & 10 deletions
This file was deleted.

examples/neuroml2/NeuroML2.md

Lines changed: 13 additions & 13 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>
1414
<td><b>version</b></td>
1515
<td>str</td>
16-
<td><i>NeuroML version used</i></td>
16+
<td><i>neuroML version used</i></td>
1717
</tr>
1818

1919

@@ -23,28 +23,28 @@ Some description...
2323
<table>
2424
<tr>
2525
<td><b>izhikevich2007Cells</b></td>
26-
<td><a href="#izhikevich2007cell">Izhikevich2007Cell</a></td>
26+
<td><a href="#izhikevich2007cell">izhikevich2007Cell</a></td>
2727
<td><i></i></td>
2828
</tr>
2929

3030

3131
<tr>
3232
<td><b>pulseGenerators</b></td>
33-
<td><a href="#pulsegenerator">PulseGenerator</a></td>
33+
<td><a href="#pulsegenerator">pulseGenerator</a></td>
3434
<td><i></i></td>
3535
</tr>
3636

3737

3838
<tr>
3939
<td><b>networks</b></td>
40-
<td><a href="#network">Network</a></td>
40+
<td><a href="#network">network</a></td>
4141
<td><i>The networks present</i></td>
4242
</tr>
4343

4444

4545
</table>
4646

47-
## Izhikevich2007Cell
47+
## izhikevich2007Cell
4848
Some description...
4949

5050
### Allowed parameters
@@ -128,7 +128,7 @@ Some description...
128128

129129
</table>
130130

131-
## PulseGenerator
131+
## pulseGenerator
132132
Some description...
133133

134134
### Allowed parameters
@@ -163,7 +163,7 @@ Some description...
163163

164164
</table>
165165

166-
## Network
166+
## network
167167
Some description...
168168

169169
### Allowed parameters
@@ -181,21 +181,21 @@ Some description...
181181
<table>
182182
<tr>
183183
<td><b>populations</b></td>
184-
<td><a href="#population">Population</a></td>
184+
<td><a href="#population">population</a></td>
185185
<td><i>the pops in the net</i></td>
186186
</tr>
187187

188188

189189
<tr>
190190
<td><b>explicitInputs</b></td>
191-
<td><a href="#explicitinput">ExplicitInput</a></td>
191+
<td><a href="#explicitinput">explicitInput</a></td>
192192
<td><i></i></td>
193193
</tr>
194194

195195

196196
</table>
197197

198-
## Population
198+
## population
199199
Some description...
200200

201201
### Allowed parameters
@@ -223,7 +223,7 @@ Some description...
223223

224224
</table>
225225

226-
## ExplicitInput
226+
## explicitInput
227227
Some description...
228228

229229
### Allowed parameters

examples/neuroml2/NeuroML2.rst

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

@@ -8,22 +8,22 @@ Some description...
88
=============== =========== ================================
99
Allowed field Data Type Description
1010
=============== =========== ================================
11-
**id** str The id of the NeuroML 2 document
12-
**version** str NeuroML version used
11+
**id** str The id of the neuroML 2 document
12+
**version** str neuroML version used
1313
=============== =========== ================================
1414

1515
**Allowed children**
1616

1717
======================= ============================================ ====================
1818
Allowed child Data Type Description
1919
======================= ============================================ ====================
20-
**izhikevich2007Cells** `Izhikevich2007Cell <#izhikevich2007cell>`__
21-
**pulseGenerators** `PulseGenerator <#pulsegenerator>`__
22-
**networks** `Network <#network>`__ The networks present
20+
**izhikevich2007Cells** `izhikevich2007Cell <#izhikevich2007cell>`__
21+
**pulseGenerators** `pulseGenerator <#pulsegenerator>`__
22+
**networks** `network <#network>`__ The networks present
2323
======================= ============================================ ====================
2424

2525
==================
26-
Izhikevich2007Cell
26+
izhikevich2007Cell
2727
==================
2828
Some description...
2929

@@ -46,7 +46,7 @@ Allowed field Data Type Description
4646
=============== =========== =====================
4747

4848
==============
49-
PulseGenerator
49+
pulseGenerator
5050
==============
5151
Some description...
5252

@@ -62,7 +62,7 @@ Allowed field Data Type Description
6262
=============== =========== ============================
6363

6464
=======
65-
Network
65+
network
6666
=======
6767
Some description...
6868

@@ -79,12 +79,12 @@ Allowed field Data Type Description
7979
================== ================================== ===================
8080
Allowed child Data Type Description
8181
================== ================================== ===================
82-
**populations** `Population <#population>`__ the pops in the net
83-
**explicitInputs** `ExplicitInput <#explicitinput>`__
82+
**populations** `population <#population>`__ the pops in the net
83+
**explicitInputs** `explicitInput <#explicitinput>`__
8484
================== ================================== ===================
8585

8686
==========
87-
Population
87+
population
8888
==========
8989
Some description...
9090

@@ -99,7 +99,7 @@ Allowed field Data Type Description
9999
=============== =========== ======================================
100100

101101
=============
102-
ExplicitInput
102+
explicitInput
103103
=============
104104
Some description...
105105

examples/neuroml2/NeuroML2.specification.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
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
},
99
"version": {
1010
"type": "str",
11-
"description": "NeuroML version used"
11+
"description": "neuroML version used"
1212
}
1313
},
1414
"allowed_children": {
1515
"izhikevich2007Cells": {
16-
"type": "Izhikevich2007Cell",
16+
"type": "izhikevich2007Cell",
1717
"description": ""
1818
},
1919
"pulseGenerators": {
20-
"type": "PulseGenerator",
20+
"type": "pulseGenerator",
2121
"description": ""
2222
},
2323
"networks": {
24-
"type": "Network",
24+
"type": "network",
2525
"description": "The networks present"
2626
}
2727
}
2828
},
29-
"Izhikevich2007Cell": {
29+
"izhikevich2007Cell": {
3030
"definition": "Some description...",
3131
"allowed_parameters": {
3232
"id": {
@@ -75,7 +75,7 @@
7575
}
7676
}
7777
},
78-
"PulseGenerator": {
78+
"pulseGenerator": {
7979
"definition": "Some description...",
8080
"allowed_parameters": {
8181
"id": {
@@ -96,7 +96,7 @@
9696
}
9797
}
9898
},
99-
"Network": {
99+
"network": {
100100
"definition": "Some description...",
101101
"allowed_parameters": {
102102
"id": {
@@ -106,16 +106,16 @@
106106
},
107107
"allowed_children": {
108108
"populations": {
109-
"type": "Population",
109+
"type": "population",
110110
"description": "the pops in the net"
111111
},
112112
"explicitInputs": {
113-
"type": "ExplicitInput",
113+
"type": "explicitInput",
114114
"description": ""
115115
}
116116
}
117117
},
118-
"Population": {
118+
"population": {
119119
"definition": "Some description...",
120120
"allowed_parameters": {
121121
"id": {
@@ -132,7 +132,7 @@
132132
}
133133
}
134134
},
135-
"ExplicitInput": {
135+
"explicitInput": {
136136
"definition": "Some description...",
137137
"allowed_parameters": {
138138
"target": {

examples/neuroml2/NeuroML2.specification.xml

Lines changed: 0 additions & 9 deletions
This file was deleted.

examples/neuroml2/NeuroML2.specification.yaml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
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
6+
description: The id of the neuroML 2 document
77
version:
88
type: str
9-
description: NeuroML version used
9+
description: neuroML version used
1010
allowed_children:
1111
izhikevich2007Cells:
12-
type: Izhikevich2007Cell
12+
type: izhikevich2007Cell
1313
description: ''
1414
pulseGenerators:
15-
type: PulseGenerator
15+
type: pulseGenerator
1616
description: ''
1717
networks:
18-
type: Network
18+
type: network
1919
description: The networks present
20-
Izhikevich2007Cell:
20+
izhikevich2007Cell:
2121
definition: Some description...
2222
allowed_parameters:
2323
id:
@@ -53,7 +53,7 @@ Izhikevich2007Cell:
5353
d:
5454
type: str
5555
description: ''
56-
PulseGenerator:
56+
pulseGenerator:
5757
definition: Some description...
5858
allowed_parameters:
5959
id:
@@ -68,20 +68,20 @@ PulseGenerator:
6868
amplitude:
6969
type: str
7070
description: the amplitude
71-
Network:
71+
network:
7272
definition: Some description...
7373
allowed_parameters:
7474
id:
7575
type: str
7676
description: The id of the network
7777
allowed_children:
7878
populations:
79-
type: Population
79+
type: population
8080
description: the pops in the net
8181
explicitInputs:
82-
type: ExplicitInput
82+
type: explicitInput
8383
description: ''
84-
Population:
84+
population:
8585
definition: Some description...
8686
allowed_parameters:
8787
id:
@@ -93,7 +93,7 @@ Population:
9393
size:
9494
type: int
9595
description: the size of the population
96-
ExplicitInput:
96+
explicitInput:
9797
definition: Some description...
9898
allowed_parameters:
9999
target:

0 commit comments

Comments
 (0)