Skip to content

Commit a7ab3f3

Browse files
committed
Merge branch 'master' into test_mac
2 parents 7c6cc8c + 991f7cd commit a7ab3f3

32 files changed

+1174
-90
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,15 @@ jobs:
4848
- jNeuroML_validatev1
4949
- Py_neuroConstruct
5050
- pyNeuroML
51+
- pyNeuroML_validate_sbml
5152
- jNeuroML_Moose
52-
- MOOSE
53+
- MOOSE:3.1.5
54+
- XPP
5355

5456
steps:
55-
- uses: actions/checkout@v3
57+
- uses: actions/checkout@v4
5658
- name: Set up Python ${{ matrix.python-version }}
57-
uses: actions/setup-python@v3
59+
uses: actions/setup-python@v5
5860
with:
5961
python-version: ${{ matrix.python-version }}
6062

.github/workflows/ci_versions.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Test across versions
2+
3+
on:
4+
push:
5+
branches: [ master, development, experimental, test* ]
6+
pull_request:
7+
branches: [ master, development, experimental, test* ]
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ${{ matrix.runs-on }}
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
python-version: ["3.9", "3.10", "3.11", "3.12"]
17+
runs-on: [ubuntu-latest, macos-latest, macos-14]
18+
exclude:
19+
- runs-on: macos-14
20+
python-version: "3.9"
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
- name: Set up Python ${{ matrix.python-version }}
26+
uses: actions/setup-python@v5
27+
with:
28+
python-version: ${{ matrix.python-version }}
29+
30+
31+
- name: Install HDF5 for pytables on macos-14
32+
run: |
33+
# if [[ ${{ matrix.python-version }} == "3.11" ]] || [[ ${{ matrix.python-version }} == "3.12" ]]; then
34+
if [[ ${{ matrix.runs-on }} == "macos-14" ]]; then brew install hdf5 ; fi;
35+
#fi;
36+
37+
38+
- name: Install OMV
39+
run: |
40+
pip install .
41+
pip list
42+
43+
- name: Run simple OMV tests
44+
run: |
45+
omv install pyNeuroML
46+
omv test -V utilities/tests/.test.ex9.jnmlbrian2.omt
47+
48+
49+
- name: OMV final version info
50+
run: |
51+
omv list -V # list installed engines
52+
env
53+
pip list
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
2+
name: Publish on PyPi
3+
4+
on:
5+
release:
6+
types: [published]
7+
8+
jobs:
9+
build:
10+
name: Build distribution 📦
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Set up Python
16+
uses: actions/setup-python@v5
17+
with:
18+
python-version: "3.x"
19+
- name: Install pypa/build
20+
run: >-
21+
python3 -m
22+
pip install
23+
build
24+
--user
25+
- name: Build a binary wheel and a source tarball
26+
run: python3 -m build
27+
- name: Store the distribution packages
28+
uses: actions/upload-artifact@v4
29+
with:
30+
name: python-package-distributions
31+
path: dist/
32+
33+
publish-to-pypi:
34+
name: >-
35+
Publish Python 🐍 distribution 📦 to PyPI
36+
needs:
37+
- build
38+
runs-on: ubuntu-latest
39+
environment:
40+
name: pypi
41+
url: https://pypi.org/p/OSBModelValidation
42+
permissions:
43+
id-token: write
44+
steps:
45+
- name: Download all the dists
46+
uses: actions/download-artifact@v4
47+
with:
48+
name: python-package-distributions
49+
path: dist/
50+
- name: Publish distribution 📦 to PyPI
51+
uses: pypa/gh-action-pypi-publish@release/v1

LICENSE.lesser

Lines changed: 166 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,166 @@
1+
GNU LESSER GENERAL PUBLIC LICENSE
2+
Version 3, 29 June 2007
3+
4+
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
5+
Everyone is permitted to copy and distribute verbatim copies
6+
of this license document, but changing it is not allowed.
7+
8+
9+
This version of the GNU Lesser General Public License incorporates
10+
the terms and conditions of version 3 of the GNU General Public
11+
License, supplemented by the additional permissions listed below.
12+
13+
0. Additional Definitions.
14+
15+
As used herein, "this License" refers to version 3 of the GNU Lesser
16+
General Public License, and the "GNU GPL" refers to version 3 of the GNU
17+
General Public License.
18+
19+
"The Library" refers to a covered work governed by this License,
20+
other than an Application or a Combined Work as defined below.
21+
22+
An "Application" is any work that makes use of an interface provided
23+
by the Library, but which is not otherwise based on the Library.
24+
Defining a subclass of a class defined by the Library is deemed a mode
25+
of using an interface provided by the Library.
26+
27+
A "Combined Work" is a work produced by combining or linking an
28+
Application with the Library. The particular version of the Library
29+
with which the Combined Work was made is also called the "Linked
30+
Version".
31+
32+
The "Minimal Corresponding Source" for a Combined Work means the
33+
Corresponding Source for the Combined Work, excluding any source code
34+
for portions of the Combined Work that, considered in isolation, are
35+
based on the Application, and not on the Linked Version.
36+
37+
The "Corresponding Application Code" for a Combined Work means the
38+
object code and/or source code for the Application, including any data
39+
and utility programs needed for reproducing the Combined Work from the
40+
Application, but excluding the System Libraries of the Combined Work.
41+
42+
1. Exception to Section 3 of the GNU GPL.
43+
44+
You may convey a covered work under sections 3 and 4 of this License
45+
without being bound by section 3 of the GNU GPL.
46+
47+
2. Conveying Modified Versions.
48+
49+
If you modify a copy of the Library, and, in your modifications, a
50+
facility refers to a function or data to be supplied by an Application
51+
that uses the facility (other than as an argument passed when the
52+
facility is invoked), then you may convey a copy of the modified
53+
version:
54+
55+
a) under this License, provided that you make a good faith effort to
56+
ensure that, in the event an Application does not supply the
57+
function or data, the facility still operates, and performs
58+
whatever part of its purpose remains meaningful, or
59+
60+
b) under the GNU GPL, with none of the additional permissions of
61+
this License applicable to that copy.
62+
63+
3. Object Code Incorporating Material from Library Header Files.
64+
65+
The object code form of an Application may incorporate material from
66+
a header file that is part of the Library. You may convey such object
67+
code under terms of your choice, provided that, if the incorporated
68+
material is not limited to numerical parameters, data structure
69+
layouts and accessors, or small macros, inline functions and templates
70+
(ten or fewer lines in length), you do both of the following:
71+
72+
a) Give prominent notice with each copy of the object code that the
73+
Library is used in it and that the Library and its use are
74+
covered by this License.
75+
76+
b) Accompany the object code with a copy of the GNU GPL and this license
77+
document.
78+
79+
4. Combined Works.
80+
81+
You may convey a Combined Work under terms of your choice that,
82+
taken together, effectively do not restrict modification of the
83+
portions of the Library contained in the Combined Work and reverse
84+
engineering for debugging such modifications, if you also do each of
85+
the following:
86+
87+
a) Give prominent notice with each copy of the Combined Work that
88+
the Library is used in it and that the Library and its use are
89+
covered by this License.
90+
91+
b) Accompany the Combined Work with a copy of the GNU GPL and this license
92+
document.
93+
94+
c) For a Combined Work that displays copyright notices during
95+
execution, include the copyright notice for the Library among
96+
these notices, as well as a reference directing the user to the
97+
copies of the GNU GPL and this license document.
98+
99+
d) Do one of the following:
100+
101+
0) Convey the Minimal Corresponding Source under the terms of this
102+
License, and the Corresponding Application Code in a form
103+
suitable for, and under terms that permit, the user to
104+
recombine or relink the Application with a modified version of
105+
the Linked Version to produce a modified Combined Work, in the
106+
manner specified by section 6 of the GNU GPL for conveying
107+
Corresponding Source.
108+
109+
1) Use a suitable shared library mechanism for linking with the
110+
Library. A suitable mechanism is one that (a) uses at run time
111+
a copy of the Library already present on the user's computer
112+
system, and (b) will operate properly with a modified version
113+
of the Library that is interface-compatible with the Linked
114+
Version.
115+
116+
e) Provide Installation Information, but only if you would otherwise
117+
be required to provide such information under section 6 of the
118+
GNU GPL, and only to the extent that such information is
119+
necessary to install and execute a modified version of the
120+
Combined Work produced by recombining or relinking the
121+
Application with a modified version of the Linked Version. (If
122+
you use option 4d0, the Installation Information must accompany
123+
the Minimal Corresponding Source and Corresponding Application
124+
Code. If you use option 4d1, you must provide the Installation
125+
Information in the manner specified by section 6 of the GNU GPL
126+
for conveying Corresponding Source.)
127+
128+
5. Combined Libraries.
129+
130+
You may place library facilities that are a work based on the
131+
Library side by side in a single library together with other library
132+
facilities that are not Applications and are not covered by this
133+
License, and convey such a combined library under terms of your
134+
choice, if you do both of the following:
135+
136+
a) Accompany the combined library with a copy of the same work based
137+
on the Library, uncombined with any other library facilities,
138+
conveyed under the terms of this License.
139+
140+
b) Give prominent notice with the combined library that part of it
141+
is a work based on the Library, and explaining where to find the
142+
accompanying uncombined form of the same work.
143+
144+
6. Revised Versions of the GNU Lesser General Public License.
145+
146+
The Free Software Foundation may publish revised and/or new versions
147+
of the GNU Lesser General Public License from time to time. Such new
148+
versions will be similar in spirit to the present version, but may
149+
differ in detail to address new problems or concerns.
150+
151+
Each version is given a distinguishing version number. If the
152+
Library as you received it specifies that a certain numbered version
153+
of the GNU Lesser General Public License "or any later version"
154+
applies to it, you have the option of following the terms and
155+
conditions either of that published version or of any later version
156+
published by the Free Software Foundation. If the Library as you
157+
received it does not specify a version number of the GNU Lesser
158+
General Public License, you may choose any version of the GNU Lesser
159+
General Public License ever published by the Free Software Foundation.
160+
161+
If the Library as you received it specifies that a proxy can decide
162+
whether future versions of the GNU Lesser General Public License shall
163+
apply, that proxy's public statement of acceptance of any version is
164+
permanent authorization for you to choose that version for the
165+
Library.
166+

README.md

Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
[![Continuous builds](https://github.com/OpenSourceBrain/osb-model-validation/actions/workflows/ci.yml/badge.svg)](https://github.com/OpenSourceBrain/osb-model-validation/actions/workflows/ci.yml)
2+
[![PyPI](https://img.shields.io/pypi/v/OSBModelValidation)](https://pypi.org/project/OSBModelValidation/)
3+
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/OSBModelValidation)](https://pypi.org/project/OSBModelValidation/)
4+
[![GitHub](https://img.shields.io/github/license/OpenSourceBrain/osb-model-validation)](https://github.com/OpenSourceBrain/osb-model-validation/blob/master/LICENSE.lesser)
5+
[![GitHub pull requests](https://img.shields.io/github/issues-pr/OpenSourceBrain/osb-model-validation)](https://github.com/OpenSourceBrain/osb-model-validation/pulls)
6+
[![GitHub issues](https://img.shields.io/github/issues/OpenSourceBrain/osb-model-validation)](https://github.com/OpenSourceBrain/osb-model-validation/issues)
7+
[![Gitter](https://badges.gitter.im/NeuroML/community.svg)](https://gitter.im/NeuroML/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
28
------------------------------------------
39

410
# OSB Model Validation
@@ -18,38 +24,20 @@ To see this framework in action, click on some of the green buttons below:
1824

1925
This framework has been used to test the 30+ NeuroML and PyNN models described in the [Open Source Brain paper (Gleeson et al. 2019)](https://www.cell.com/neuron/fulltext/S0896-6273(19)30444-1), and [many more](https://github.com/OpenSourceBrain/.github/blob/main/testsheet/README.md).
2026

21-
Note: [Travis-CI](https://travis-ci.com) is no longer the preferred testing platform due to limitations with number of free test runs, all CI testing has been migrated to [GitHub Actions](https://github.com/features/actions).
22-
2327
## Installation
2428

2529
Quick system-wide install:
2630

2731
``` bash
28-
pip install git+https://github.com/OpenSourceBrain/osb-model-validation
32+
pip install osb-model-validation
2933
```
3034

31-
System-wide install from cloned repository:
35+
Or you can install from cloned repository (preferably in a virtual environment):
3236

3337
``` bash
3438
git clone https://github.com/OpenSourceBrain/osb-model-validation.git
3539
cd osb-model-validation
36-
sudo python setup.py install
37-
```
38-
39-
If you'd like to install only in a virtual environment in the `.venv` directory:
40-
41-
``` bash
42-
git clone https://github.com/OpenSourceBrain/osb-model-validation.git
43-
cd osb-model-validation
44-
45-
# Create the virtual environment
46-
python -m venv .venv
47-
# Activate the virtual environment
48-
source .venv/bin/activate
49-
python setup.py install
50-
51-
# To deactivate the virtual environment:
52-
deactivate
40+
pip install .
5341
```
5442

5543
## Instructions
@@ -165,6 +153,6 @@ Running validation tests locally ensures that you can quickly check if any chang
165153
Since you can run the validation with different [engines](https://github.com/OpenSourceBrain/osb-model-validation/tree/master/omv/engines) to use different simulators, this also allows you to quickly verify that your model gives similar results using these different tools.
166154

167155

168-
### Running tests automatically on ~~Travis-CI~~
156+
### Running tests automatically on GitHub Actions
169157

170-
**Note: Travis-CI is no longer the preferred platform for testing, [GitHub Actions](https://github.com/features/actions) is. To use OMV with GHA, copy an existing configuration file, e.g. https://github.com/OpenSourceBrain/ACnet2/blob/master/.github/workflows/omv-ci.yml**
158+
To use OMV with GHA, copy an existing configuration file, e.g. https://github.com/OpenSourceBrain/ACnet2/blob/master/.github/workflows/omv-ci.yml and place it in the required repository.

omv/common/inout.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,8 @@ def check_output(cmds, cwd=".", shell=False, verbosity=0, env=None):
121121

122122
except sp.CalledProcessError as err:
123123
inform(
124-
"Error running commands: %s in %s (return code: %s)"
125-
% (cmds, cwd, err.returncode),
124+
"CalledProcessError running commands: %s in %s (return code: %s), output:\n%s"
125+
% (cmds, cwd, err.returncode, err.output),
126126
indent=2,
127127
verbosity=verbosity,
128128
)

omv/engines/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
# from omv.engines.brian1 import Brian1Engine
2424
from omv.engines.brian2_ import Brian2Engine
2525
from omv.engines.arbor_ import ArborEngine
26+
from omv.engines.xpp import XppEngine
2627
from omv.engines.eden_ import EdenEngine
2728
from omv.engines.nestsli import NestEngine
2829
from omv.engines.pynest import PyNestEngine
@@ -41,6 +42,7 @@
4142
from omv.engines.netpyne__np2 import NetPyNENP2Engine
4243
from omv.engines.pyneuroconstruct import PyneuroConstructEngine
4344
from omv.engines.pyneuroml_ import PyNeuroMLEngine
45+
from omv.engines.pyneuromlvalidatesbml import PyNeuroMLValidateSBMLEngine
4446

4547

4648
OMVEngines = {

omv/engines/brian2_.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def is_installed():
1717
inform(
1818
"Brian2 version %s is correctly installed..." % brian2.__version__,
1919
indent=2,
20-
verbosity=2,
20+
verbosity=1,
2121
)
2222

2323
ret = "v%s" % brian2.__version__

omv/engines/getarbor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
def install_arbor(version=None):
55
if not version:
6-
version = "0.8.1"
6+
version = "0.9.0"
77
try:
88
pip_install("arbor==%s" % version)
99
import arbor

0 commit comments

Comments
 (0)