Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
650b97d
To v0.5.6
pgleeson Sep 22, 2023
ddd1ffb
chore: optimised -> optimized
sanjayankur31 Oct 4, 2023
4839474
fix(loader): test for absolute paths in includes
sanjayankur31 Oct 17, 2023
5b66349
ci(regenerate): try `apt-get update` to fix CI
sanjayankur31 Oct 17, 2023
c5ab31a
Merge branch 'development' into fix/182
sanjayankur31 Oct 17, 2023
412a340
docs(writers): document classes and methods
sanjayankur31 Dec 5, 2023
74c442f
chore(nml): add docstrings to hdf5 exporters
sanjayankur31 Dec 5, 2023
a7e13f8
Merge pull request #184 from NeuralEnsemble/feat/document-writers
sanjayankur31 Dec 5, 2023
ded3e28
to 0.5.7
sanjayankur31 Dec 5, 2023
2d81121
docs(readme): update changelog
sanjayankur31 Dec 5, 2023
9c3f9df
docs(writers): more documentation
sanjayankur31 Dec 5, 2023
8dff6c3
docs(loaders): document module
sanjayankur31 Dec 5, 2023
a201a2b
chore(writers): format imports
sanjayankur31 Dec 5, 2023
4fa0de7
fix(writers): correct import
sanjayankur31 Dec 5, 2023
4861b60
fix(writers): ensure variable is assigned before usage
sanjayankur31 Dec 5, 2023
14973f0
Merge pull request #185 from NeuralEnsemble/feat/more-docs
sanjayankur31 Dec 5, 2023
d22ea2f
feat: to 0.5.8
sanjayankur31 Dec 5, 2023
51813d9
feat: drop py37, add py312
sanjayankur31 Dec 12, 2023
23f009b
ci: drop py37, add py312
sanjayankur31 Dec 12, 2023
b4c3e4d
Merge pull request #183 from NeuralEnsemble/fix/182
pgleeson Dec 13, 2023
71c6924
Merge pull request #186 from NeuralEnsemble/feat/py312
pgleeson Dec 13, 2023
ee93b33
docs(nml): improve cell helper method docstrings
sanjayankur31 Dec 20, 2023
0f8ef51
ci: update actions to latest versions
sanjayankur31 Feb 20, 2024
87bc4a9
feat(cell): extend method to filter on unbranched/branched SegmentGroups
sanjayankur31 Mar 4, 2024
8a4cca1
feat(cell): extend method to match all strings also
sanjayankur31 Mar 4, 2024
fd2a445
chore: tweak some type hints
sanjayankur31 Mar 4, 2024
7098d90
chore(nml): regenerate
sanjayankur31 Mar 4, 2024
f268dc7
Merge pull request #187 from NeuralEnsemble/feat/get-unbranched-segme…
sanjayankur31 Mar 5, 2024
743ee47
chore(nml): update method docs and type hint
sanjayankur31 Mar 5, 2024
9dd1ef6
chore: update readme
sanjayankur31 Mar 5, 2024
bbc9cd1
chore: to 0.5.9
sanjayankur31 Mar 5, 2024
7e3cb3b
chore(readme): update changelog
sanjayankur31 Mar 5, 2024
057dc56
Test on macos-14
pgleeson Apr 11, 2024
d0fc7bf
Test src install tables
pgleeson Apr 11, 2024
790fd9d
Update ci.yml
pgleeson Apr 15, 2024
0b7a78c
Better test for macos-14 in GHA
pgleeson Apr 17, 2024
5810442
Tweak to trigger GHA on development branch
pgleeson Apr 17, 2024
9e745ee
Merge branch 'development' into experimental
pgleeson Apr 29, 2024
b406341
merge macos-latest and macos-14
pgleeson Apr 29, 2024
5dcc898
Merge pull request #188 from NeuralEnsemble/experimental
pgleeson Apr 29, 2024
6d3add6
feat!: regenerate for 2.3.1
sanjayankur31 May 8, 2024
5fecd24
test(nml): update tests to include spikeThresh
sanjayankur31 May 8, 2024
477fac7
To v0.6.0
pgleeson May 28, 2024
09fdbc5
feat(validation): enable global toggling of validation
sanjayankur31 May 30, 2024
d243bca
chore: add versionadded
sanjayankur31 May 30, 2024
16d2d91
chore: add contributing doc
sanjayankur31 May 30, 2024
a767b2b
Merge pull request #190 from NeuralEnsemble/feat/build-time-validation
sanjayankur31 May 30, 2024
6bc7046
feat(memb-pots): do not validate on addition
sanjayankur31 May 30, 2024
31041b3
Merge pull request #191 from NeuralEnsemble/feat/disable-memb-pot-val…
sanjayankur31 May 30, 2024
b6f606e
Add helper method fix_external_morphs_biophys_in_cell; use by default…
pgleeson May 31, 2024
259505c
Regenerated nml.py locally & updated readme for regen
pgleeson Jun 11, 2024
bcea5a4
To v0.6.1; Update schema to latest - require specCap & init memb pot
pgleeson Jun 11, 2024
9f78e71
Ran ruff on all files
pgleeson Jun 11, 2024
3ee1528
Merge pull request #189 from NeuralEnsemble/experimental
pgleeson Jun 11, 2024
b4d3e95
chore: bump dev release to 0.6.2
sanjayankur31 Jun 14, 2024
f27b896
chore: remove unneeded shebang
sanjayankur31 Jun 17, 2024
0d3cb1b
fix(py3.13): `logger.warn` -> `logger.warning`
sanjayankur31 Jun 17, 2024
46bcd6f
feat: use `numpy<=2.0.0` until other libraries have caught up
sanjayankur31 Jun 17, 2024
4db530d
Merge pull request #194 from NeuralEnsemble/feat/3.13-fixes-do-not-en…
sanjayankur31 Jun 17, 2024
7118fb6
chore: remove shebangs from modules that are not executable
sanjayankur31 Jun 17, 2024
c044eee
Merge branch 'master' into experimental
pgleeson Aug 7, 2024
0d473b8
chore: ignore xsd files from pre-commit
sanjayankur31 Aug 9, 2024
0ce6cc5
feat(fix-morph/bioph): allow creating a deep copy
sanjayankur31 Aug 9, 2024
c3f0343
wip
sanjayankur31 Aug 9, 2024
65f8521
feat(utils): improve loading of referenced morph/biophys
sanjayankur31 Aug 12, 2024
81df7eb
test(utils): test loading of referenced morph/biophs
sanjayankur31 Aug 12, 2024
2118502
Merge branch 'feat/fix-morphs-without-modifying-object' into experime…
pgleeson Aug 13, 2024
2e17bdc
Merge pull request #197 from NeuralEnsemble/feat/fix-morphs-without-m…
pgleeson Aug 13, 2024
bc1322c
Merge branch 'development' into experimental
pgleeson Aug 13, 2024
2661c58
To v0.6.3
pgleeson Aug 13, 2024
456bc69
fix(create-unbranched-groups): number in segment group id cannot be n…
sanjayankur31 Aug 14, 2024
bbe0fa7
chore: correct docstring
sanjayankur31 Aug 14, 2024
7d3be50
docs: split component type docs to different pages
sanjayankur31 Aug 14, 2024
a7c827f
docs: correctly populate "others"
sanjayankur31 Aug 14, 2024
5957a51
Merge branch 'development' into experimental
pgleeson Aug 19, 2024
8f60aca
Merge pull request #200 from NeuralEnsemble/experimental
pgleeson Aug 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,19 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
runs-on: [ubuntu-latest, windows-latest, macos-latest]
exclude:
- runs-on: macos-latest
python-version: "3.8"
- runs-on: macos-latest
python-version: "3.9"

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -30,6 +35,11 @@ jobs:
#sudo apt-get install libhdf5-serial-dev liblzo2-dev libgraphviz-dev -y
python -m pip install --upgrade pip

- name: Install HDF5 for pytables on macos-latest
if: ${{ matrix.runs-on == 'macos-latest' }}
run: |
brew install hdf5

- name: Build package
run: |
pip install .[full]
Expand All @@ -38,10 +48,9 @@ jobs:
if: ${{ matrix.runs-on == 'ubuntu-latest' }}
run: |
# Just test on linux for now...
pytest -vs
pytest -vs

- name: Run examples
if: ${{ matrix.python-version != '3.7' || matrix.runs-on != 'macos-latest' }} # issue with _bz2 module...
run: |
cd neuroml/examples
python run_all.py
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/regenerate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,19 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
sudo apt-get update -y
sudo apt-get install libhdf5-serial-dev liblzo2-dev libgraphviz-dev -y
python -m pip install --upgrade pip
pip install .[dev]
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,4 @@ neuroml/test/*.h5

sed-script.txt
/test.sh
/*ken.sh
17 changes: 17 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
exclude: NeuroML.*xsd
- id: end-of-file-fixer
exclude: NeuroML.*xsd
- id: check-added-large-files
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.1
hooks:
- id: ruff
args: [ "--select", "I", "--fix" ]
- id: ruff-format
112 changes: 112 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# Contributing

Please open issues to discuss enhancements and bugs that you may encounter with
libNeuroML. Pull requests with enhancements and bug fixes are welcome.

## Virtual environments and editable installs

It is best to use [virtual environments](https://docs.python.org/3/tutorial/venv.html) when developing Python packages.
This ensures that one uses a clean environment that includes the necessary
dependencies and does not affect the overall system installation.

For quick development, consider using [editable installs](https://setuptools.pypa.io/en/latest/userguide/development_mode.html).
The dependencies are broken down in the `setup.cfg` file. To get a complete development environment, one can run:


pip install -e .[dev] # an editable install with all development dependecies installed


## Code style

1. The source code uses spaces, and each tab is equivalent to 4 spaces.

2. We use the [reStructuredText (reST)
format](https://stackoverflow.com/a/24385103/375067) for Python docstrings.
Please document your code when opening pull requests.
All methods/functions/modules *must* include docstrings that explain the parameters.

3. We use [ruff](https://pypi.org/project/ruff/) to format and lint our code. (See the section on pre-commit below.)

4. Please use [type hints](https://docs.python.org/3/library/typing.html) wherever applicable.
You can set up type checkers such as [mypy](https://mypy.readthedocs.io/) to use type hints in your development environment/IDE.


pip install mypy


### Pre-commit

A number of [pre-commit](https://pre-commit.com/) hooks are used to improve code-quality.
Please run the following code to set up the pre-commit hooks:

$ pre-commit install

The hooks will be run at each `git commit`.
Please see `.pre-commit-config.yaml` for information on what hooks we run.


### Commit messages

Writing good commit messages makes things easy to follow.
Please see these posts:

- [How to write a Git commit message](https://cbea.ms/git-commit/)
- While not compulsory, we prefer [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/)


## Tests

Bug fixes and new features should include unit tests to test for correctness.
One can base new tests off the current ones included in the `tests/` directory.
To see how tests are run, please see the [GitHub Actions configuration file](https://github.com/NeuralEnsemble/libNeuroML/blob/development/.github/workflows/ci.yml).

We use [pytest](https://docs.pytest.org/) for unit testing.
One can run it from the root of the repository:

pytest


To run specific tests, one can use the `-k` flag:


pytest -k "..."


## Pull Request Process

1. Please contribute pull requests against the `development` branch.
2. Please ensure that the automated build for your pull request passes.
3. Please write good commit messages (see the section above).

### Updating your pull request branch

Over time, as pull requests are reviewed, the `development` branch continues to move on with other changes.
Sometimes, it can be useful/necessary to pull in these changes to the pull request branch, using the following steps.

Add the upstream libNeuroML repository as a remote:


git remote add upstream https://github.com/NeuralEnsemble/libNeuroML.git


Update your local copy of the `development` branch, and the remote copy in your fork:


git checkout development
git pull upstream development
git push


Pull in changes from development to your branch:


git checkout <feature branch being used for PR>
git merge development


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.
After any merge conflicts have been resolved (or if there aren't any), you can
push your branch to your fork to update the pull request:


git push
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ See https://docs.neuroml.org/ for an overview of the various NeuroML libraries.

## Changelog

See also https://github.com/NeuralEnsemble/libNeuroML/releases.

### version 0.5.8

- drop py3.7, add py3,12
Expand Down
1 change: 1 addition & 0 deletions doc/component-list.json
Original file line number Diff line number Diff line change
@@ -0,0 +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"]}
2 changes: 1 addition & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
# All configuration values have a default; values that are commented out
# serve to show the default.

import sys
import os
import sys

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
Expand Down
1 change: 0 additions & 1 deletion doc/devdocs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@ Contributing
implementation_of_bindings
meeting_june_2012
nodes_segments_sections

2 changes: 1 addition & 1 deletion doc/devdocs/meeting_june_2012.rst
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ Mike V was asked to add a clone method to a morphology.
It was decided that fraction_along should be a property of segment.

The syntax for segment groups should be as follows:
group=morph.segment_groups['axon_group']
group=morph.segment_groups['axon_group']
(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)

This was a subject of great debate and has not been completely settled.
Expand Down
6 changes: 3 additions & 3 deletions doc/devdocs/nodes_segments_sections.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ unbranched segmentGroups, which can be used as the basis for sections in any par
in them, or be ignored by any other application.

In libNeuroML, a section-like concept can be added at API level, to facilitate building cells, to facilitate import/export
to/from simulators supporting this concept, and to serve as a basis for recompartmentalisation of cells.
to/from simulators supporting this concept, and to serve as a basis for recompartmentalisation of cells.



Expand Down Expand Up @@ -96,7 +96,7 @@ to the **parent** element, i.e.
<parent segment="2" fractionAlong="0.5"/>

This is not possible in a node based format, but represents a logically consistent description of what the modeller
wants.
wants.


What to do?
Expand All @@ -108,4 +108,4 @@ enforce "best practice"?
PG: I'd argue for the first approach, as it retains as much as possible of what the original reconstructor/simulator specified.
An API which enforces a policy when it encounters a non optimal morphology (e.g. moving all dendrites to connection points,
inserting new nodes) will alter the original data in perhaps unintended ways, and that information will be lost by subsequent readers.
It should be up to each parsing application to decide what to do with the extra information when it reads in a file.
It should be up to each parsing application to decide what to do with the extra information when it reads in a file.
Loading