Skip to content

Commit 09be14e

Browse files
authored
Merge pull request #196 from NeuralEnsemble/development
Changes for NeuroML v2.3.1 release
2 parents 4c5ffef + 8f60aca commit 09be14e

File tree

101 files changed

+37600
-32681
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+37600
-32681
lines changed

.github/workflows/ci.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,19 @@ jobs:
1414
strategy:
1515
fail-fast: false
1616
matrix:
17-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
17+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
1818
runs-on: [ubuntu-latest, windows-latest, macos-latest]
19+
exclude:
20+
- runs-on: macos-latest
21+
python-version: "3.8"
22+
- runs-on: macos-latest
23+
python-version: "3.9"
1924

2025
steps:
21-
- uses: actions/checkout@v3
26+
- uses: actions/checkout@v4
2227

2328
- name: Set up Python ${{ matrix.python-version }}
24-
uses: actions/setup-python@v4
29+
uses: actions/setup-python@v5
2530
with:
2631
python-version: ${{ matrix.python-version }}
2732

@@ -30,6 +35,11 @@ jobs:
3035
#sudo apt-get install libhdf5-serial-dev liblzo2-dev libgraphviz-dev -y
3136
python -m pip install --upgrade pip
3237
38+
- name: Install HDF5 for pytables on macos-latest
39+
if: ${{ matrix.runs-on == 'macos-latest' }}
40+
run: |
41+
brew install hdf5
42+
3343
- name: Build package
3444
run: |
3545
pip install .[full]
@@ -38,10 +48,9 @@ jobs:
3848
if: ${{ matrix.runs-on == 'ubuntu-latest' }}
3949
run: |
4050
# Just test on linux for now...
41-
pytest -vs
51+
pytest -vs
4252
4353
- name: Run examples
44-
if: ${{ matrix.python-version != '3.7' || matrix.runs-on != 'macos-latest' }} # issue with _bz2 module...
4554
run: |
4655
cd neuroml/examples
4756
python run_all.py

.github/workflows/regenerate.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,19 @@ jobs:
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
15+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
1616

1717
steps:
18-
- uses: actions/checkout@v3
18+
- uses: actions/checkout@v4
1919

2020
- name: Set up Python ${{ matrix.python-version }}
21-
uses: actions/setup-python@v4
21+
uses: actions/setup-python@v5
2222
with:
2323
python-version: ${{ matrix.python-version }}
2424

2525
- name: Install dependencies
2626
run: |
27+
sudo apt-get update -y
2728
sudo apt-get install libhdf5-serial-dev liblzo2-dev libgraphviz-dev -y
2829
python -m pip install --upgrade pip
2930
pip install .[dev]

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,4 @@ neuroml/test/*.h5
5555

5656
sed-script.txt
5757
/test.sh
58+
/*ken.sh

.pre-commit-config.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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: v4.4.0
6+
hooks:
7+
- id: trailing-whitespace
8+
exclude: NeuroML.*xsd
9+
- id: end-of-file-fixer
10+
exclude: NeuroML.*xsd
11+
- id: check-added-large-files
12+
- repo: https://github.com/astral-sh/ruff-pre-commit
13+
rev: v0.4.1
14+
hooks:
15+
- id: ruff
16+
args: [ "--select", "I", "--fix" ]
17+
- id: ruff-format

CONTRIBUTING.md

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
# Contributing
2+
3+
Please open issues to discuss enhancements and bugs that you may encounter with
4+
libNeuroML. Pull requests with enhancements and bug fixes are welcome.
5+
6+
## Virtual environments and editable installs
7+
8+
It is best to use [virtual environments](https://docs.python.org/3/tutorial/venv.html) when developing Python packages.
9+
This ensures that one uses a clean environment that includes the necessary
10+
dependencies and does not affect the overall system installation.
11+
12+
For quick development, consider using [editable installs](https://setuptools.pypa.io/en/latest/userguide/development_mode.html).
13+
The dependencies are broken down in the `setup.cfg` file. To get a complete development environment, one can run:
14+
15+
16+
pip install -e .[dev] # an editable install with all development dependecies installed
17+
18+
19+
## Code style
20+
21+
1. The source code uses spaces, and each tab is equivalent to 4 spaces.
22+
23+
2. We use the [reStructuredText (reST)
24+
format](https://stackoverflow.com/a/24385103/375067) for Python docstrings.
25+
Please document your code when opening pull requests.
26+
All methods/functions/modules *must* include docstrings that explain the parameters.
27+
28+
3. We use [ruff](https://pypi.org/project/ruff/) to format and lint our code. (See the section on pre-commit below.)
29+
30+
4. Please use [type hints](https://docs.python.org/3/library/typing.html) wherever applicable.
31+
You can set up type checkers such as [mypy](https://mypy.readthedocs.io/) to use type hints in your development environment/IDE.
32+
33+
34+
pip install mypy
35+
36+
37+
### Pre-commit
38+
39+
A number of [pre-commit](https://pre-commit.com/) hooks are used to improve code-quality.
40+
Please run the following code to set up the pre-commit hooks:
41+
42+
$ pre-commit install
43+
44+
The hooks will be run at each `git commit`.
45+
Please see `.pre-commit-config.yaml` for information on what hooks we run.
46+
47+
48+
### Commit messages
49+
50+
Writing good commit messages makes things easy to follow.
51+
Please see these posts:
52+
53+
- [How to write a Git commit message](https://cbea.ms/git-commit/)
54+
- While not compulsory, we prefer [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/)
55+
56+
57+
## Tests
58+
59+
Bug fixes and new features should include unit tests to test for correctness.
60+
One can base new tests off the current ones included in the `tests/` directory.
61+
To see how tests are run, please see the [GitHub Actions configuration file](https://github.com/NeuralEnsemble/libNeuroML/blob/development/.github/workflows/ci.yml).
62+
63+
We use [pytest](https://docs.pytest.org/) for unit testing.
64+
One can run it from the root of the repository:
65+
66+
pytest
67+
68+
69+
To run specific tests, one can use the `-k` flag:
70+
71+
72+
pytest -k "..."
73+
74+
75+
## Pull Request Process
76+
77+
1. Please contribute pull requests against the `development` branch.
78+
2. Please ensure that the automated build for your pull request passes.
79+
3. Please write good commit messages (see the section above).
80+
81+
### Updating your pull request branch
82+
83+
Over time, as pull requests are reviewed, the `development` branch continues to move on with other changes.
84+
Sometimes, it can be useful/necessary to pull in these changes to the pull request branch, using the following steps.
85+
86+
Add the upstream libNeuroML repository as a remote:
87+
88+
89+
git remote add upstream https://github.com/NeuralEnsemble/libNeuroML.git
90+
91+
92+
Update your local copy of the `development` branch, and the remote copy in your fork:
93+
94+
95+
git checkout development
96+
git pull upstream development
97+
git push
98+
99+
100+
Pull in changes from development to your branch:
101+
102+
103+
git checkout <feature branch being used for PR>
104+
git merge development
105+
106+
107+
If there are merge conflicts, you will need to [resolve these](https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging#_basic_merge_conflicts), since merging the feature branch in the pull request will also result in these.
108+
After any merge conflicts have been resolved (or if there aren't any), you can
109+
push your branch to your fork to update the pull request:
110+
111+
112+
git push

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ See https://docs.neuroml.org/ for an overview of the various NeuroML libraries.
4141

4242
## Changelog
4343

44+
See also https://github.com/NeuralEnsemble/libNeuroML/releases.
45+
4446
### version 0.5.8
4547

4648
- drop py3.7, add py3,12

doc/component-list.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"Cells": ["baseCell", "baseSpikingCell", "baseCellMembPot", "baseCellMembPotDL", "baseChannelPopulation", "channelPopulation", "channelPopulationNernst", "baseChannelDensity", "baseChannelDensityCond", "variableParameter", "inhomogeneousValue", "channelDensityNonUniform", "channelDensityNonUniformNernst", "channelDensityNonUniformGHK", "channelDensity", "channelDensityVShift", "channelDensityNernst", "channelDensityNernstCa2", "channelDensityGHK", "channelDensityGHK2", "pointCellCondBased", "pointCellCondBasedCa", "distal", "proximal", "parent", "segment", "segmentGroup", "member", "from", "to", "include", "path", "subTree", "inhomogeneousParameter", "proximalDetails", "distalDetails", "morphology", "specificCapacitance", "initMembPotential", "spikeThresh", "membraneProperties", "membraneProperties2CaPools", "biophysicalProperties", "biophysicalProperties2CaPools", "intracellularProperties", "intracellularProperties2CaPools", "resistivity", "concentrationModel", "decayingPoolConcentrationModel", "fixedFactorConcentrationModel", "fixedFactorConcentrationModelTraub", "species", "cell", "cell2CaPools", "baseCellMembPotCap", "baseIaf", "iafTauCell", "iafTauRefCell", "baseIafCapCell", "iafCell", "iafRefCell", "izhikevichCell", "izhikevich2007Cell", "adExIaFCell", "fitzHughNagumoCell", "pinskyRinzelCA3Cell", "hindmarshRose1984Cell"], "Synapses": ["baseSynapse", "baseVoltageDepSynapse", "baseSynapseDL", "baseCurrentBasedSynapse", "alphaCurrentSynapse", "baseConductanceBasedSynapse", "baseConductanceBasedSynapseTwo", "expOneSynapse", "alphaSynapse", "expTwoSynapse", "expThreeSynapse", "baseBlockMechanism", "voltageConcDepBlockMechanism", "basePlasticityMechanism", "tsodyksMarkramDepMechanism", "tsodyksMarkramDepFacMechanism", "blockingPlasticSynapse", "doubleSynapse", "stdpSynapse", "gapJunction", "baseGradedSynapse", "silentSynapse", "linearGradedSynapse", "gradedSynapse"], "Channels": ["baseVoltageDepRate", "baseVoltageConcDepRate", "baseHHRate", "HHExpRate", "HHSigmoidRate", "HHExpLinearRate", "baseVoltageDepVariable", "baseVoltageConcDepVariable", "baseHHVariable", "HHExpVariable", "HHSigmoidVariable", "HHExpLinearVariable", "baseVoltageDepTime", "baseVoltageConcDepTime", "fixedTimeCourse", "baseQ10Settings", "q10Fixed", "q10ExpTemp", "baseConductanceScaling", "q10ConductanceScaling", "baseConductanceScalingCaDependent", "baseGate", "gate", "gateHHrates", "gateHHtauInf", "gateHHInstantaneous", "gateHHratesTau", "gateHHratesInf", "gateHHratesTauInf", "gateFractional", "subGate", "baseIonChannel", "ionChannelPassive", "ionChannelHH", "ionChannel", "ionChannelVShift", "KSState", "closedState", "openState", "ionChannelKS", "KSTransition", "forwardTransition", "reverseTransition", "vHalfTransition", "tauInfTransition", "gateKS"], "Inputs": ["basePointCurrent", "baseVoltageDepPointCurrent", "baseVoltageDepPointCurrentSpiking", "basePointCurrentDL", "baseVoltageDepPointCurrentDL", "baseSpikeSource", "spikeGenerator", "spikeGeneratorRandom", "spikeGeneratorPoisson", "spikeGeneratorRefPoisson", "poissonFiringSynapse", "transientPoissonFiringSynapse", "timedSynapticInput", "spikeArray", "spike", "pulseGenerator", "compoundInput", "compoundInputDL", "pulseGeneratorDL", "sineGenerator", "sineGeneratorDL", "rampGenerator", "rampGeneratorDL", "voltageClamp", "voltageClampTriple"], "Networks": ["network", "networkWithTemperature", "basePopulation", "population", "populationList", "instance", "location", "region", "rectangularExtent", "projection", "explicitConnection", "connection", "synapticConnection", "synapticConnectionWD", "connectionWD", "electricalConnection", "electricalConnectionInstance", "electricalConnectionInstanceW", "electricalProjection", "continuousConnection", "continuousConnectionInstance", "continuousConnectionInstanceW", "continuousProjection", "explicitInput", "inputList", "input", "inputW"], "PyNN": ["basePyNNCell", "basePyNNIaFCell", "basePyNNIaFCondCell", "IF_curr_alpha", "IF_curr_exp", "IF_cond_alpha", "IF_cond_exp", "EIF_cond_exp_isfa_ista", "EIF_cond_alpha_isfa_ista", "HH_cond_exp", "basePynnSynapse", "expCondSynapse", "expCurrSynapse", "alphaCondSynapse", "alphaCurrSynapse", "SpikeSourcePoisson"], "NeuroMLCoreDimensions": [], "NeuroMLCoreCompTypes": ["notes", "annotation", "property", "baseStandalone", "rdf_RDF", "rdf_Description", "baseBqbiol", "bqbiol_encodes", "bqbiol_hasPart", "bqbiol_hasProperty", "bqbiol_hasVersion", "bqbiol_is", "bqbiol_isDescribedBy", "bqbiol_isEncodedBy", "bqbiol_isHomologTo", "bqbiol_isPartOf", "bqbiol_isPropertyOf", "bqbiol_isVersionOf", "bqbiol_occursIn", "bqbiol_hasTaxon", "bqmodel_is", "bqmodel_isDescribedBy", "bqmodel_isDerivedFrom", "rdf_Bag", "rdf:li", "point3DWithDiam"], "Simulation": ["Simulation", "Display", "Line", "OutputFile", "OutputColumn", "EventOutputFile", "EventSelection", "Meta"]}

doc/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
# All configuration values have a default; values that are commented out
1212
# serve to show the default.
1313

14-
import sys
1514
import os
15+
import sys
1616

1717
# If extensions (or modules to document with autodoc) are in another directory,
1818
# add these directories to sys.path here. If the directory is relative to the

doc/devdocs/index.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,3 @@ Contributing
99
implementation_of_bindings
1010
meeting_june_2012
1111
nodes_segments_sections
12-

doc/devdocs/meeting_june_2012.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ Mike V was asked to add a clone method to a morphology.
109109
It was decided that fraction_along should be a property of segment.
110110

111111
The syntax for segment groups should be as follows:
112-
group=morph.segment_groups['axon_group']
112+
group=morph.segment_groups['axon_group']
113113
(in connect merge groups should be false by default - throw an exception, tell the user setting merge_groups = True or rename group will fix this)
114114

115115
This was a subject of great debate and has not been completely settled.

0 commit comments

Comments
 (0)