Skip to content

Commit ecd1e49

Browse files
authored
Merge pull request #152 from NeuroML/development
NeuroML 2.2 release
2 parents 9e07046 + df20297 commit ecd1e49

File tree

88 files changed

+8346
-3967
lines changed

Some content is hidden

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

88 files changed

+8346
-3967
lines changed

.github/workflows/ci.yml

Lines changed: 37 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: Continuous builds
22

33
on:
44
push:
5-
branches: [ master, development ]
5+
branches: [ master, development, experimental, test* ]
66
pull_request:
7-
branches: [ master, development ]
7+
branches: [ master, development, experimental, test* ]
88

99
jobs:
1010
build:
@@ -13,22 +13,52 @@ jobs:
1313
strategy:
1414
matrix:
1515
python-version: [2.7, 3.7, 3.8, 3.9]
16+
fail-fast: false
1617

1718
steps:
19+
1820
- uses: actions/checkout@v2
1921
- name: Set up Python ${{ matrix.python-version }}
2022
uses: actions/setup-python@v2
2123
with:
2224
python-version: ${{ matrix.python-version }}
25+
26+
- name: Print refs
27+
run: |
28+
echo "github.ref is: ${{ github.ref }}"
29+
echo "github.base_ref is: ${{ github.base_ref }}"
30+
31+
- name: Install deps from development
32+
if: ${{ github.ref == 'refs/heads/development' || github.base_ref == 'development' }}
33+
run: |
34+
echo "Using deps from development for our repos"
35+
sed -E -i 's/((libNeuroML|NeuroMLlite|pylems|pyelectro|neurotune).git)@master/\1@development/' requirements-dev.txt
36+
sed -E -i 's/((modelspec).git)@main/\1@development/' requirements-dev.txt
37+
38+
- name: Install deps from experimental
39+
if: ${{ github.ref == 'refs/heads/experimental' || github.base_ref == 'experimental' }}
40+
run: |
41+
echo "Using deps from experimental - assuming development in others"
42+
sed -E -i 's/((libNeuroML|NeuroMLlite|pylems|pyelectro|neurotune).git)@master/\1@development/' requirements-dev.txt
43+
sed -E -i 's/((modelspec).git)@main/\1@development/' requirements-dev.txt
44+
2345
- name: Install package
2446
run: |
2547
python -m pip install --upgrade pip
26-
pip install flake8
48+
pip install -r requirements-dev.txt
49+
pip install pytest
2750
pip install .
28-
- name: Lint with flake8
29-
run: |
30-
flake8 . --count --exit-zero --show-source --max-line-length=127 --statistics
51+
3152
- name: Run tests
3253
run: |
54+
pytest .
3355
pynml -h
34-
./test-ghactions.sh
56+
57+
# For now, only test neuron related examples on py3
58+
if [[ ${{ matrix.python-version }} == "3."* ]]; then argnrn=-neuron ; fi
59+
./test-ghactions.sh $argnrn
60+
61+
- name: Lint with flake8
62+
run: |
63+
pip install flake8
64+
flake8 . --count --exit-zero --show-source --max-line-length=127 --statistics

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,3 +121,4 @@ examples/results/*.dat
121121
/examples/test_data/ca1/*.mod
122122
/examples/test_data/ca1/*.hoc
123123
.venv/
124+
/examples/LEMS_NML2_Ex5_DetCell_brian2.py

.mypy.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[mypy]
2+
ignore_missing_imports = True

CONTRIBUTING.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ pyNeuroML. Pull requests with enhancements and bug fixes are welcome.
1111

1212
2. The source code uses spaces, and each tab is equivalent to 4 spaces.
1313

14+
3. We use the [reStructuredText (reST)
15+
format](https://stackoverflow.com/a/24385103/375067) for Python docstrings.
16+
Please document your code when opening pull requests.
17+
1418
## Pull Request Process
1519

1620
1. Please ensure that the automated build for your pull request passes.

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@ pyNeuroML
22
=========
33

44
[![GitHub CI](https://github.com/NeuroML/pyNeuroML/actions/workflows/ci.yml/badge.svg)](https://github.com/NeuroML/pyNeuroML/actions/workflows/ci.yml)
5-
[![Travis CI](https://travis-ci.com/NeuroML/pyNeuroML.svg?branch=master)](https://travis-ci.com/NeuroML/pyNeuroML)
65
[![PyPI](https://img.shields.io/pypi/v/pyNeuroML)](https://pypi.org/project/pyNeuroML/)
76
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pyNeuroML)](https://pypi.org/project/pyNeuroML/)
87
[![GitHub](https://img.shields.io/github/license/NeuroML/pyNeuroML)](https://github.com/NeuroML/pyNeuroML/blob/master/LICENSE.lesser)
98
[![GitHub pull requests](https://img.shields.io/github/issues-pr/NeuroML/pyNeuroML)](https://github.com/NeuroML/pyNeuroML/pulls)
109
[![GitHub issues](https://img.shields.io/github/issues/NeuroML/pyNeuroML)](https://github.com/NeuroML/pyNeuroML/issues)
10+
[![Documentation Status](https://readthedocs.org/projects/pyneuroml/badge/?version=latest)](https://pyneuroml.readthedocs.io/en/latest/?badge=latest)
1111
[![GitHub Org's stars](https://img.shields.io/github/stars/NeuroML?style=social)](https://github.com/NeuroML)
1212
[![Twitter Follow](https://img.shields.io/twitter/follow/NeuroML?style=social)](https://twitter.com/NeuroML)
13+
[![Gitter](https://badges.gitter.im/NeuroML/community.svg)](https://gitter.im/NeuroML/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
1314

1415
A single package in Python unifying scripts and modules for reading, writing, simulating and analysing NeuroML2/LEMS models.
1516

docs/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = source
9+
BUILDDIR = build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/extras/Readme.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Extras
2+
3+
These make the doc generation fail, so we leave them out for the moment.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
pyneuroml.neuron.analysis package
2+
=================================
3+
4+
Submodules
5+
----------
6+
7+
pyneuroml.neuron.analysis.HHanalyse module
8+
------------------------------------------
9+
10+
.. automodule:: pyneuroml.neuron.analysis.HHanalyse
11+
:members:
12+
:undoc-members:
13+
:show-inheritance:
14+
15+
Module contents
16+
---------------
17+
18+
.. automodule:: pyneuroml.neuron.analysis
19+
:members:
20+
:undoc-members:
21+
:show-inheritance:

docs/extras/pyneuroml.neuron.rst

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
pyneuroml.neuron package
2+
========================
3+
4+
Subpackages
5+
-----------
6+
7+
.. toctree::
8+
:maxdepth: 4
9+
10+
pyneuroml.neuron.analysis
11+
12+
Submodules
13+
----------
14+
15+
pyneuroml.neuron.nrn\_export\_utils module
16+
------------------------------------------
17+
18+
.. automodule:: pyneuroml.neuron.nrn_export_utils
19+
:members:
20+
:undoc-members:
21+
:show-inheritance:
22+
23+
Module contents
24+
---------------
25+
26+
.. automodule:: pyneuroml.neuron
27+
:members:
28+
:undoc-members:
29+
:show-inheritance:

docs/make.bat

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
@ECHO OFF
2+
3+
pushd %~dp0
4+
5+
REM Command file for Sphinx documentation
6+
7+
if "%SPHINXBUILD%" == "" (
8+
set SPHINXBUILD=sphinx-build
9+
)
10+
set SOURCEDIR=source
11+
set BUILDDIR=build
12+
13+
if "%1" == "" goto help
14+
15+
%SPHINXBUILD% >NUL 2>NUL
16+
if errorlevel 9009 (
17+
echo.
18+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
19+
echo.installed, then set the SPHINXBUILD environment variable to point
20+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
21+
echo.may add the Sphinx directory to PATH.
22+
echo.
23+
echo.If you don't have Sphinx installed, grab it from
24+
echo.http://sphinx-doc.org/
25+
exit /b 1
26+
)
27+
28+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
29+
goto end
30+
31+
:help
32+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
33+
34+
:end
35+
popd

0 commit comments

Comments
 (0)