Skip to content

Commit 837a1e1

Browse files
authored
Merge pull request #15 from OpenSourceBrain/feat-validate
Update files and test config to ensure that CI passes
2 parents 3b822e6 + 1db31d7 commit 837a1e1

35 files changed

+217
-201
lines changed

.pre-commit-config.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# See https://pre-commit.com for more information
2+
# See https://pre-commit.com/hooks.html for more hooks
3+
repos:
4+
- repo: https://github.com/pre-commit/pre-commit-hooks
5+
rev: v5.0.0
6+
hooks:
7+
- id: trailing-whitespace
8+
- id: end-of-file-fixer
9+
- repo: https://github.com/astral-sh/ruff-pre-commit
10+
rev: v0.12.3
11+
hooks:
12+
- id: ruff
13+
args: [ "--select", "I", "--fix" ]
14+
- id: ruff-format
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Script for running automated tests on OSB, see https://github.com/OpenSourceBrain/osb-model-validation
2-
# exclude a few that use new component types and are so not valid against the schema
3-
target: "*.channel.nml"
2+
# - exclude a few that use new component types and are so not valid against the schema
3+
# - exclude new concentration models
4+
target: "ch_CavN.channel.nml; ch_KCaS.channel.nml; ch_Kdrfastngf.channel.nml; ch_KvAngf.channel.nml; ch_KvCaB.channel.nml; ch_Navngf.channel.nml; k*.channel.nml; hin.channel.nml; h_kole.channel.nml; h_migliore.channel.nml; I*channel.nml; i*channel.nml; n*channel.nml; N*channel.nml; p*channel.nml; t*channel.nml"
45
engine: jNeuroML_validate

NeuroML2/channels/IKsin.channel.nml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
<ionChannel id="IKsin" conductance="10pS" type="ionChannelHH" species="k">
55

66
<gate id="a" type="gateHHtauInf" instances="1">
7-
<steadyState type="HHSigmoidVariable" rate="1" midpoint="-34mV" scale="6.5mV"/>
87
<timeCourse type="fixedTimeCourse" tau="10 ms"/>
8+
<steadyState type="HHSigmoidVariable" rate="1" midpoint="-34mV" scale="6.5mV"/>
99
</gate>
1010

1111
<gate id="b" type="gateHHtauInf" instances="1">
12-
<steadyState type="HHSigmoidVariable" rate="1" midpoint="-65mV" scale="-6.6mV"/>
1312
<timeCourse type="IKsin_b_tau"/>
13+
<steadyState type="HHSigmoidVariable" rate="1" midpoint="-65mV" scale="-6.6mV"/>
1414
</gate>
15-
15+
1616
</ionChannel>
1717

1818
<ComponentType name="IKsin_b_tau" extends="baseVoltageDepTime">
@@ -26,4 +26,4 @@
2626

2727
</ComponentType>
2828

29-
</neuroml>
29+
</neuroml>

NeuroML2/channels/IL.channel.nml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
<forwardRate type="HHSigmoidRate" rate="1.6per_ms" scale="13.888888889mV" midpoint="-5.0mV"/>
99
<reverseRate type="HHExpLinearRate" rate="0.1072per_ms" scale="-5.36mV" midpoint="1.31mV"/>
1010
</gate>
11-
1211
</ionChannel>
1312

14-
</neuroml>
13+
</neuroml>

NeuroML2/channels/IT.channel.nml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
<?xml version="1.0" encoding="ISO-8859-1"?>
22
<neuroml xmlns="http://www.neuroml.org/schema/neuroml2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.neuroml.org/schema/neuroml2 https://raw.github.com/NeuroML/NeuroML2/development/Schemas/NeuroML2/NeuroML_v2beta4.xsd" id="ittc">
3-
3+
44
<ionChannel id="ittc" conductance="10pS" type="ionChannelHH" species="ca">
5-
5+
66
<gate id="m" type="gateHHtauInf" instances="2">
77
<q10Settings type="q10ExpTemp" q10Factor="3" experimentalTemp="24degC"/>
8-
<steadyState type="HHSigmoidVariable" rate="1" midpoint="-59mV" scale="6.2mV"/>
98
<timeCourse type="ittc_m_tau"/>
9+
<steadyState type="HHSigmoidVariable" rate="1" midpoint="-59mV" scale="6.2mV"/>
1010
</gate>
1111

1212
<gate id="h" type="gateHHtauInf" instances="1">
1313
<q10Settings type="q10ExpTemp" q10Factor="3" experimentalTemp="24degC"/>
14-
<steadyState type="HHSigmoidVariable" rate="1" midpoint="-83mV" scale="-4mV"/>
1514
<timeCourse type="ittc_h_tau"/>
15+
<steadyState type="HHSigmoidVariable" rate="1" midpoint="-83mV" scale="-4mV"/>
1616
</gate>
1717
</ionChannel>
1818

1919
<ComponentType name="ittc_m_tau" extends="baseVoltageDepTime">
2020
<Constant name="TIME_SCALE" dimension="time" value="1 ms"/>
2121
<Constant name="VOLT_SCALE" dimension="voltage" value="1 mV"/>
22-
<Constant name="shift" dimension="none" value="2"/>
22+
<Constant name="shift" dimension="none" value="2"/>
2323

2424
<Dynamics>
2525
<DerivedVariable name="V" dimension="none" value="v / VOLT_SCALE"/>
26-
<DerivedVariable name="t" exposure="t" dimension="time" value="(1 / (exp(-(V + shift + 129.6) / 16.7)
26+
<DerivedVariable name="t" exposure="t" dimension="time" value="(1 / (exp(-(V + shift + 129.6) / 16.7)
2727
+ exp((V + shift + 14.8) / 18.2)) + 0.612) * TIME_SCALE"/>
2828
</Dynamics>
2929

@@ -33,14 +33,14 @@
3333
<ComponentType name="ittc_h_tau" extends="baseVoltageDepTime">
3434
<Constant name="TIME_SCALE" dimension="time" value="1 ms"/>
3535
<Constant name="VOLT_SCALE" dimension="voltage" value="1 mV"/>
36-
<Constant name="shift" dimension="none" value="2"/>
36+
<Constant name="shift" dimension="none" value="2"/>
3737

3838
<Dynamics>
3939
<DerivedVariable name="V" dimension="none" value="v / VOLT_SCALE"/>
40-
<DerivedVariable name="t" exposure="t" dimension="time" value="(30.8 + (211.4 + exp((V + shift + 113.2) / 5))
40+
<DerivedVariable name="t" exposure="t" dimension="time" value="(30.8 + (211.4 + exp((V + shift + 113.2) / 5))
4141
/ (1+exp((V + shift + 84) / 3.2))) * TIME_SCALE"/>
4242
</Dynamics>
4343

4444
</ComponentType>
4545
</neuroml>
46-
46+

NeuroML2/channels/IT2.channel.nml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,24 @@
22
<neuroml xmlns="http://www.neuroml.org/schema/neuroml2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.neuroml.org/schema/neuroml2 https://raw.github.com/NeuroML/NeuroML2/development/Schemas/NeuroML2/NeuroML_v2beta4.xsd" id="itre">
33
<notes>GHK</notes>
44
<ionChannel id="itre" conductance="10pS" type="ionChannelHH" species="ca">
5-
5+
66
<gate id="m" type="gateHHtauInf" instances="2">
77
<q10Settings type="q10ExpTemp" q10Factor="2.5" experimentalTemp="24degC"/>
8-
<steadyState type="HHSigmoidVariable" rate="1" midpoint="-52mV" scale="7.4mV"/>
98
<timeCourse type="itre_m_tau"/>
9+
<steadyState type="HHSigmoidVariable" rate="1" midpoint="-52mV" scale="7.4mV"/>
1010
</gate>
1111

1212
<gate id="h" type="gateHHtauInf" instances="1">
1313
<q10Settings type="q10ExpTemp" q10Factor="2.5" experimentalTemp="24degC"/>
14-
<steadyState type="HHSigmoidVariable" rate="1" midpoint="-80mV" scale="-5mV"/>
1514
<timeCourse type="itre_h_tau"/>
15+
<steadyState type="HHSigmoidVariable" rate="1" midpoint="-80mV" scale="-5mV"/>
1616
</gate>
1717
</ionChannel>
1818

1919
<ComponentType name="itre_m_tau" extends="baseVoltageDepTime">
2020
<Constant name="TIME_SCALE" dimension="time" value="1 ms"/>
2121
<Constant name="VOLT_SCALE" dimension="voltage" value="1 mV"/>
22-
<Constant name="shift" dimension="none" value="2"/>
22+
<Constant name="shift" dimension="none" value="2"/>
2323
<Constant name="phim" dimension="none" value="2"/>
2424
<Dynamics>
2525
<DerivedVariable name="V" dimension="none" value="v / VOLT_SCALE"/>
@@ -32,7 +32,7 @@
3232
<ComponentType name="itre_h_tau" extends="baseVoltageDepTime">
3333
<Constant name="TIME_SCALE" dimension="time" value="1 ms"/>
3434
<Constant name="VOLT_SCALE" dimension="voltage" value="1 mV"/>
35-
<Constant name="shift" dimension="none" value="2"/>
35+
<Constant name="shift" dimension="none" value="2"/>
3636

3737
<Dynamics>
3838
<DerivedVariable name="V" dimension="none" value="v / VOLT_SCALE"/>
@@ -41,4 +41,4 @@
4141

4242
</ComponentType>
4343

44-
</neuroml>
44+
</neuroml>

NeuroML2/channels/Iahp.channel.nml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
<neuroml xmlns="http://www.neuroml.org/schema/neuroml2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.neuroml.org/schema/neuroml2 https://raw.github.com/NeuroML/NeuroML2/development/Schemas/NeuroML2/NeuroML_v2beta4.xsd" id="iahp">
33

44
<ionChannel id="iahp" conductance="10pS" type="ionChannelHH" species="k2">
5-
5+
66
<gate id="m" type="gateHHtauInf" instances="2">
77
<q10Settings type="q10ExpTemp" q10Factor="3" experimentalTemp="22degC"/>
8-
<steadyState type="iahp_m_inf"/>
98
<timeCourse type="iahp_m_tau"/>
9+
<steadyState type="iahp_m_inf"/>
1010
</gate>
1111

1212
</ionChannel>
@@ -18,7 +18,7 @@
1818
<Dynamics>
1919
<DerivedVariable name="ca_conc" dimension="none" value="caConc / CONC_SCALE"/>
2020
<DerivedVariable name="x" exposure="x" dimension="none" value="car / ( 1 + car )"/>
21-
21+
2222
</Dynamics>
2323

2424
</ComponentType>
@@ -42,5 +42,5 @@
4242
</Dynamics>
4343

4444
</ComponentType>
45-
45+
4646
</neuroml>

NeuroML2/channels/Nafx.channel.nml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@
66
<gate id="m" type="gateHHrates" instances="3">
77
<forwardRate type="Nafx_m_alpha_rate"/>
88
<reverseRate type="Nafx_m_beta_rate"/>
9-
</gate>
9+
</gate>
1010

1111
<gate id="h" type="gateHHrates" instances="1">
1212
<forwardRate type="Nafx_h_alpha_rate"/>
1313
<reverseRate type="Nafx_h_beta_rate"/>
14-
</gate>
14+
</gate>
1515

1616
<gate id="s" type="gateHHtauInf" instances="1">
17-
<steadyState type="Nafx_s_inf"/>
1817
<timeCourse type="Nafx_s_tau"/>
18+
<steadyState type="Nafx_s_inf"/>
1919
</gate>
2020

2121
</ionChannel>
@@ -26,13 +26,13 @@
2626
<Constant name="VOLT_SCALE" dimension="voltage" value="1 mV"/>
2727
<Dynamics>
2828
<DerivedVariable name="V" dimension="none" value="v / VOLT_SCALE"/>
29-
29+
3030
<ConditionalDerivedVariable name="r" exposure="r" dimension="per_time">
3131
<Case condition=" (V+28) .gt. 1e-4" value="-0.2816*(V+28)/(-1+exp(-(V+28)/9.3)) / TIME_SCALE"/>
3232
<Case condition=" (V+28) .lt. -1e-4" value="-0.2816*(V+28)/(-1+exp(-(V+28)/9.3)) / TIME_SCALE"/>
3333
<Case value="-0.2816*(V+28)/(-1+exp(-(V+28)/9.3)) / TIME_SCALE"/>
3434
</ConditionalDerivedVariable>
35-
35+
3636
</Dynamics>
3737

3838
</ComponentType>
@@ -45,13 +45,13 @@
4545

4646
<Dynamics>
4747
<DerivedVariable name="V" dimension="none" value="v / VOLT_SCALE"/>
48-
48+
4949
<ConditionalDerivedVariable name="r" exposure="r" dimension="per_time">
5050
<Case condition=" (V+1) .gt. 1e-4" value="0.2464*(V+1)/(-1+exp((V+1)/6)) / TIME_SCALE"/>
5151
<Case condition=" (V+1) .lt. -1e-4" value="0.2464*(V+1)/(-1+exp((V+1)/6)) / TIME_SCALE"/>
5252
<Case value="0.2464*(V+1)/(-1+exp((V+1)/6)) / TIME_SCALE"/>
5353
</ConditionalDerivedVariable>
54-
54+
5555
</Dynamics>
5656

5757
</ComponentType>
@@ -76,13 +76,13 @@
7676
<Constant name="VOLT_SCALE" dimension="voltage" value="1 mV"/>
7777
<Dynamics>
7878
<DerivedVariable name="V" dimension="none" value="v / VOLT_SCALE"/>
79-
79+
8080
<ConditionalDerivedVariable name="r" exposure="r" dimension="per_time">
8181
<Case condition=" (V+40.1) .gt. 1e-4" value="0.098/exp((V+40.1+43.1)/20) / TIME_SCALE"/>
8282
<Case condition=" (V+40.1) .lt. -1e-4" value="0.098/exp((V+40.1+43.1)/20) / TIME_SCALE"/>
8383
<Case value="0.098/exp((V+40.1+43.1)/20) / TIME_SCALE"/>
8484
</ConditionalDerivedVariable>
85-
85+
8686

8787
</Dynamics>
8888

@@ -91,7 +91,7 @@
9191

9292
<ComponentType name="Nafx_s_inf" extends="baseVoltageDepVariable">
9393
<Constant name="VOLT_SCALE" dimension="voltage" value="1 mV"/>
94-
94+
9595
<Constant name="zetan" dimension="none" value="-3"/>
9696
<Constant name="vvh" dimension="none" value="-58"/>
9797
<Constant name="vvs" dimension="none" value="2"/>
@@ -110,7 +110,7 @@
110110
<Constant name="TIME_SCALE" dimension="time" value="1 ms"/>
111111
<Constant name="VOLT_SCALE" dimension="voltage" value="1 mV"/>
112112

113-
<Constant name="taumin" dimension="time" value="30 ms"/>
113+
<Constant name="taumin" dimension="time" value="30 ms"/>
114114
<Constant name="a0r" dimension="none" value="0.0003"/>
115115
<Constant name="zetar" dimension="none" value="12"/>
116116
<Constant name="vhalfr" dimension="none" value="-60"/>
@@ -134,4 +134,4 @@
134134
</neuroml>
135135

136136

137-
137+
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
<?xml version="1.0" encoding="ISO-8859-1"?>
2-
<neuroml xmlns="http://www.neuroml.org/schema/neuroml2"
3-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xsi:schemaLocation="http://www.neuroml.org/schema/neuroml2 https://raw.github.com/NeuroML/NeuroML2/development/Schemas/NeuroML2/NeuroML_v2beta3.xsd"
2+
<neuroml xmlns="http://www.neuroml.org/schema/neuroml2"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://www.neuroml.org/schema/neuroml2 https://raw.github.com/NeuroML/NeuroML2/development/Schemas/NeuroML2/NeuroML_v2beta3.xsd"
55
id="cadad">
66

7-
<concentrationModel id="cadad_IT2_dend_all" ion="ca" type="cadad" cainf="2.4e-4 mM" taur="99.1146852282 ms" depth="0.119408607923 um"/>
8-
<concentrationModel id="cadad_IT2_somatic" ion="ca" type="cadad" cainf="2.4e-4 mM" taur="99.1146852282 ms" depth="0.119408607923 um"/>
7+
<concentrationModel id="cadad_IT2_dend_all" ion="ca" type="cadad" cainf="2.4e-4 mM" taur="99.1146852282 ms" depth="0.119408607923 um"/>
8+
<concentrationModel id="cadad_IT2_somatic" ion="ca" type="cadad" cainf="2.4e-4 mM" taur="99.1146852282 ms" depth="0.119408607923 um"/>
99

1010
<ComponentType name="cadad" extends="concentrationModel">
1111

1212
<Parameter name="cainf" dimension="concentration"/>
1313
<Parameter name="taur" dimension="time"/>
1414
<Parameter name="depth" dimension="length"/>
15-
15+
1616

1717
<Constant name="Faraday" dimension="charge_per_mole" value="96485.3C_per_mol"/>
1818
<Constant name="AREA_SCALE" dimension="area" value="1m2"/>
@@ -28,7 +28,7 @@
2828
<StateVariable name="extConcentration" exposure="extConcentration" dimension="concentration"/>
2929

3030
<DerivedVariable name="currDensCa" dimension="currentDensity" value="iCa / surfaceArea"/>
31-
31+
3232

3333
<TimeDerivative variable="concentration" value="(currDensCa/(2*Faraday*depth)) - ((concentration - cainf) / taur)"/>
3434

@@ -42,4 +42,4 @@
4242
</ComponentType>
4343

4444

45-
</neuroml>
45+
</neuroml>
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
<?xml version="1.0" encoding="ISO-8859-1"?>
2-
<neuroml xmlns="http://www.neuroml.org/schema/neuroml2"
3-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xsi:schemaLocation="http://www.neuroml.org/schema/neuroml2 https://raw.github.com/NeuroML/NeuroML2/development/Schemas/NeuroML2/NeuroML_v2beta3.xsd"
2+
<neuroml xmlns="http://www.neuroml.org/schema/neuroml2"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://www.neuroml.org/schema/neuroml2 https://raw.github.com/NeuroML/NeuroML2/development/Schemas/NeuroML2/NeuroML_v2beta3.xsd"
55
id="cadyn">
66

7-
<concentrationModel id="cadyn_" ion="ca" type="cadyn" cainf="5e-5 mM" taur="200 ms" depth="0.1 um"/>
7+
<concentrationModel id="cadyn_" ion="ca" type="cadyn" cainf="5e-5 mM" taur="200 ms" depth="0.1 um"/>
88

99
<ComponentType name="cadyn" extends="concentrationModel">
1010

1111
<Parameter name="cainf" dimension="concentration"/>
1212
<Parameter name="taur" dimension="time"/>
1313
<Parameter name="depth" dimension="length"/>
14-
14+
1515

1616
<Constant name="Faraday" dimension="charge_per_mole" value="96485.3C_per_mol"/>
1717
<Constant name="AREA_SCALE" dimension="area" value="1m2"/>
@@ -27,7 +27,7 @@
2727
<StateVariable name="extConcentration" exposure="extConcentration" dimension="concentration"/>
2828

2929
<DerivedVariable name="currDensCa" dimension="currentDensity" value="iCa / surfaceArea"/>
30-
30+
3131

3232
<TimeDerivative variable="concentration" value="(currDensCa/(2*Faraday*depth)) / 18 - ((concentration - cainf) / taur * 11)"/>
3333

@@ -41,4 +41,4 @@
4141
</ComponentType>
4242

4343

44-
</neuroml>
44+
</neuroml>

0 commit comments

Comments
 (0)