Skip to content

Commit

Permalink
Merge pull request #61 from NeuroML/development
Browse files Browse the repository at this point in the history
 Changes for NML v2.3 release
  • Loading branch information
pgleeson authored Sep 20, 2023
2 parents 924a6ee + ac205ae commit 7ca95b5
Show file tree
Hide file tree
Showing 86 changed files with 15,001 additions and 14,589 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.7,3.9]
python-version: ["3.8", "3.9", "3.10", "3.11"]
env:
JNML_HOME: "/home/runner/work/NeuroMLlite/NeuroMLlite/jNeuroML"
HDF5_DISABLE_VERSION_CHECK: 1
Expand Down Expand Up @@ -58,9 +58,9 @@ jobs:
cd pyNeuroML
git checkout $pynml_branch
pip install pandas==1.3.5
pip install NEURON==7.8.2 # Specify version of neuron - 8.2.1 fails
pip install NEURON==8.2.2 # Specify version of neuron - 8.2.1 fails
#pip install -r requirements-dev.txt
python setup.py install
pip install .
cd -
# Install latest jnml...
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Upload Python Package

on:
release:
types: [published]

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -202,3 +202,11 @@ docs/_build
/examples/pyr_4_sym.cell.nml
*_eden.py
arm64
/examples/Example4_PyNN.mdf
*.mdf.json
*.mdf.yaml
/examples/Example6_PyNN.mdf
/examples/Example7_Brunel2000.mdf
/examples/Example3_Network.yaml
/examples/SimExample3.yaml
/examples/Example4_PyNN.mdf.1
20 changes: 10 additions & 10 deletions docs/NeuroMLlite_specification.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "NeuroMLlite v0.5.3",
"version": "NeuroMLlite v0.5.7",
"specification": {
"Network": {
"definition": "A Network containing multiple Population's, connected by Projection's and receiving Input's",
Expand Down Expand Up @@ -237,7 +237,7 @@
"description": "Unique identifier for this Population"
},
"size": {
"type": "Union[EvaluableExpression, T, VT, ndarray, int, float, str]",
"type": "Union[EvaluableExpression, List, Dict, ndarray, int, float, str]",
"description": "The size of the population."
},
"component": {
Expand Down Expand Up @@ -366,11 +366,11 @@
"description": "type of projection: projection (default; standard chemical, event triggered), electricalProjection\n(for gap junctions) or continuousProjection (for analogue/graded synapses)"
},
"delay": {
"type": "Union[EvaluableExpression, T, VT, ndarray, int, float, str]",
"type": "Union[EvaluableExpression, List, Dict, ndarray, int, float, str]",
"description": "Delay to use (default: 0)"
},
"weight": {
"type": "Union[EvaluableExpression, T, VT, ndarray, int, float, str]",
"type": "Union[EvaluableExpression, List, Dict, ndarray, int, float, str]",
"description": "Weight to use (default: 1)"
},
"random_connectivity": {
Expand All @@ -395,7 +395,7 @@
"description": ""
},
"probability": {
"type": "Union[EvaluableExpression, T, VT, ndarray, int, float, str]",
"type": "Union[EvaluableExpression, List, Dict, ndarray, int, float, str]",
"description": "Random probability of connection."
}
}
Expand Down Expand Up @@ -442,23 +442,23 @@
"description": "Population to target"
},
"cell_ids": {
"type": "Union[EvaluableExpression, T, VT, ndarray, int, float, str]",
"type": "Union[EvaluableExpression, List, Dict, ndarray, int, float, str]",
"description": "Specific ids of _Cell_s to apply this input to (cannot be used with percentage"
},
"percentage": {
"type": "float",
"type": "Union[EvaluableExpression, List, Dict, ndarray, int, float, str]",
"description": "Percentage of Cells to apply input to"
},
"number_per_cell": {
"type": "Union[EvaluableExpression, T, VT, ndarray, int, float, str]",
"type": "Union[EvaluableExpression, List, Dict, ndarray, int, float, str]",
"description": "Number of individual inputs per selected Cell (default: 1)"
},
"segment_ids": {
"type": "Union[EvaluableExpression, T, VT, ndarray, int, float, str]",
"type": "Union[EvaluableExpression, List, Dict, ndarray, int, float, str]",
"description": "Which segments to target (default: [0])"
},
"weight": {
"type": "Union[EvaluableExpression, T, VT, ndarray, int, float, str]",
"type": "Union[EvaluableExpression, List, Dict, ndarray, int, float, str]",
"description": "Weight to use (default: 1)"
}
}
Expand Down
29 changes: 19 additions & 10 deletions docs/NeuroMLlite_specification.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: NeuroMLlite v0.5.3
version: NeuroMLlite v0.5.7
specification:
Network:
definition: A Network containing multiple Population's, connected by Projection's
Expand Down Expand Up @@ -178,7 +178,8 @@ specification:
type: str
description: Unique identifier for this Population
size:
type: Union[EvaluableExpression, T, VT, ndarray, int, float, str]
type: Union[EvaluableExpression, List, Dict, ndarray, int, float,
str]
description: The size of the population.
component:
type: str
Expand Down Expand Up @@ -276,10 +277,12 @@ specification:
(for gap junctions) or continuousProjection (for analogue/graded
synapses)'
delay:
type: Union[EvaluableExpression, T, VT, ndarray, int, float, str]
type: Union[EvaluableExpression, List, Dict, ndarray, int, float,
str]
description: 'Delay to use (default: 0)'
weight:
type: Union[EvaluableExpression, T, VT, ndarray, int, float, str]
type: Union[EvaluableExpression, List, Dict, ndarray, int, float,
str]
description: 'Weight to use (default: 1)'
random_connectivity:
type: RandomConnectivity
Expand All @@ -298,7 +301,8 @@ specification:
type: str
description: ''
probability:
type: Union[EvaluableExpression, T, VT, ndarray, int, float, str]
type: Union[EvaluableExpression, List, Dict, ndarray, int, float,
str]
description: Random probability of connection.
ConvergentConnectivity:
definition: A ConvergentConnectivity definition.
Expand Down Expand Up @@ -331,19 +335,24 @@ specification:
type: str
description: Population to target
cell_ids:
type: Union[EvaluableExpression, T, VT, ndarray, int, float, str]
type: Union[EvaluableExpression, List, Dict, ndarray, int, float,
str]
description: Specific ids of _Cell_s to apply this input to (cannot
be used with percentage
percentage:
type: float
type: Union[EvaluableExpression, List, Dict, ndarray, int, float,
str]
description: Percentage of Cells to apply input to
number_per_cell:
type: Union[EvaluableExpression, T, VT, ndarray, int, float, str]
type: Union[EvaluableExpression, List, Dict, ndarray, int, float,
str]
description: 'Number of individual inputs per selected Cell (default:
1)'
segment_ids:
type: Union[EvaluableExpression, T, VT, ndarray, int, float, str]
type: Union[EvaluableExpression, List, Dict, ndarray, int, float,
str]
description: 'Which segments to target (default: [0])'
weight:
type: Union[EvaluableExpression, T, VT, ndarray, int, float, str]
type: Union[EvaluableExpression, List, Dict, ndarray, int, float,
str]
description: 'Weight to use (default: 1)'
20 changes: 10 additions & 10 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Specification of NeuroMLlite v0.5.3
# Specification of NeuroMLlite v0.5.7
**Note: the NeuroMLlite specification is still in development! Subject to change...**

## Network
Expand Down Expand Up @@ -404,7 +404,7 @@ A Population definition.

<tr>
<td><b>size</b></td>
<td>Union[EvaluableExpression, T, VT, ndarray, int, float, str]</td>
<td>Union[EvaluableExpression, List, Dict, ndarray, int, float, str]</td>
<td><i>The size of the population.</i></td>
</tr>

Expand Down Expand Up @@ -622,14 +622,14 @@ A Projection definition.

<tr>
<td><b>delay</b></td>
<td>Union[EvaluableExpression, T, VT, ndarray, int, float, str]</td>
<td>Union[EvaluableExpression, List, Dict, ndarray, int, float, str]</td>
<td><i>Delay to use (default: 0)</i></td>
</tr>


<tr>
<td><b>weight</b></td>
<td>Union[EvaluableExpression, T, VT, ndarray, int, float, str]</td>
<td>Union[EvaluableExpression, List, Dict, ndarray, int, float, str]</td>
<td><i>Weight to use (default: 1)</i></td>
</tr>

Expand Down Expand Up @@ -671,7 +671,7 @@ A RandomConnectivity definition.

<tr>
<td><b>probability</b></td>
<td>Union[EvaluableExpression, T, VT, ndarray, int, float, str]</td>
<td>Union[EvaluableExpression, List, Dict, ndarray, int, float, str]</td>
<td><i>Random probability of connection.</i></td>
</tr>

Expand Down Expand Up @@ -748,35 +748,35 @@ An Input definition.

<tr>
<td><b>cell_ids</b></td>
<td>Union[EvaluableExpression, T, VT, ndarray, int, float, str]</td>
<td>Union[EvaluableExpression, List, Dict, ndarray, int, float, str]</td>
<td><i>Specific ids of <a href="#cell">Cell</a>s to apply this input to (cannot be used with percentage</i></td>
</tr>


<tr>
<td><b>percentage</b></td>
<td>float</td>
<td>Union[EvaluableExpression, List, Dict, ndarray, int, float, str]</td>
<td><i>Percentage of Cells to apply input to</i></td>
</tr>


<tr>
<td><b>number_per_cell</b></td>
<td>Union[EvaluableExpression, T, VT, ndarray, int, float, str]</td>
<td>Union[EvaluableExpression, List, Dict, ndarray, int, float, str]</td>
<td><i>Number of individual inputs per selected Cell (default: 1)</i></td>
</tr>


<tr>
<td><b>segment_ids</b></td>
<td>Union[EvaluableExpression, T, VT, ndarray, int, float, str]</td>
<td>Union[EvaluableExpression, List, Dict, ndarray, int, float, str]</td>
<td><i>Which segments to target (default: [0])</i></td>
</tr>


<tr>
<td><b>weight</b></td>
<td>Union[EvaluableExpression, T, VT, ndarray, int, float, str]</td>
<td>Union[EvaluableExpression, List, Dict, ndarray, int, float, str]</td>
<td><i>Weight to use (default: 1)</i></td>
</tr>

Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
# space here is important since __version__ is used in generation of
# version_info also
if "__version__ =" in aline:
version = aline.split("\"")[1]
version = aline.split('"')[1]
# The full version, including alpha/beta/rc tags.
release = version

Expand Down
1 change: 0 additions & 1 deletion docs/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


if __name__ == "__main__":

net = neuromllite.Network(id="net")
doc = net.generate_documentation(format="markdown")
print(doc)
Expand Down
2 changes: 1 addition & 1 deletion examples/Example10_Lorenz.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"Example10_Lorenz": {
"version": "NeuroMLlite v0.5.3",
"version": "NeuroMLlite v0.5.7",
"notes": "Example 10: Lorenz",
"parameters": {
"N": 1,
Expand Down
25 changes: 16 additions & 9 deletions examples/Example10_Lorenz.mdf.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,32 @@
Example10_Lorenz:
format: ModECI MDF v0.3
format: ModECI MDF v0.4
graphs:
Example10_Lorenz:
notes: 'Example 10: Lorenz'
nodes:
lorenzPop_0:
lorenzPop:
parameters:
sigma:
value: 10.0
value:
- 10.0
b:
value: 2.67
value:
- 2.67
r:
value: 28.0
value:
- 28.0
x0:
value: 1.0
value:
- 1.0
y0:
value: 1.0
value:
- 1.0
z0:
value: 1.0
value:
- 1.0
sec:
value: 1.0
value:
- 1.0
x:
default_initial_value: x0
time_derivative: ( sigma * (y - x) ) / sec
Expand Down
4 changes: 2 additions & 2 deletions examples/Example11_Synapses.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"Example11_Synapses": {
"version": "NeuroMLlite v0.5.3",
"version": "NeuroMLlite v0.5.7",
"notes": "Example 11: synaptic properties",
"parameters": {
"input_amp": 0.23,
Expand Down Expand Up @@ -87,7 +87,7 @@
"stim": {
"input_source": "i_clamp",
"population": "pop0",
"percentage": 100.0
"percentage": 100
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion examples/Example11_Synapses.net.nml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<neuroml xmlns="http://www.neuroml.org/schema/neuroml2" xmlns:xs="http://www.w3.org/2001/XMLSchema" 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_v2.3.xsd" id="Example11_Synapses">
<notes>Generated by NeuroMLlite v0.5.3
<notes>Generated by NeuroMLlite v0.5.7
Generated network: Example11_Synapses
Generation seed: 1234
NeuroMLlite parameters:
Expand Down
Loading

0 comments on commit 7ca95b5

Please sign in to comment.