Skip to content

Commit a3b5be8

Browse files
authored
Merge pull request #120 from OpenSourceBrain/test_gha
Tests OMV install & core functionality across multiple Py versions & linux/mac; to v0.2.20
2 parents 2b184d3 + 75ed306 commit a3b5be8

File tree

5 files changed

+67
-4
lines changed

5 files changed

+67
-4
lines changed

.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

.github/workflows/python-publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
steps:
1414
- uses: actions/checkout@v4
1515
- name: Set up Python
16-
uses: actions/setup-python@v4
16+
uses: actions/setup-python@v5
1717
with:
1818
python-version: "3.x"
1919
- name: Install pypa/build
@@ -25,7 +25,7 @@ jobs:
2525
- name: Build a binary wheel and a source tarball
2626
run: python3 -m build
2727
- name: Store the distribution packages
28-
uses: actions/upload-artifact@v3
28+
uses: actions/upload-artifact@v4
2929
with:
3030
name: python-package-distributions
3131
path: dist/
@@ -43,7 +43,7 @@ jobs:
4343
id-token: write
4444
steps:
4545
- name: Download all the dists
46-
uses: actions/download-artifact@v3
46+
uses: actions/download-artifact@v4
4747
with:
4848
name: python-package-distributions
4949
path: dist/

omv/engines/jneuroml.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ def install(version):
8181
inform("Will fetch and install jNeuroML jar", indent=2)
8282
install_jnml(version)
8383

84+
if not JNeuroMLEngine.is_installed():
85+
inform("Failure to install, exiting", indent=1)
86+
exit(1)
87+
8488
def run(self):
8589
try:
8690
inform(

omv/engines/pyneuroml_.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ def install(version):
3838
inform("Will fetch and install the latest pyNeuroML", indent=2)
3939
install_pynml(version)
4040

41+
if not PyNeuroMLEngine.is_installed():
42+
inform("Failure to install, exiting", indent=1)
43+
exit(1)
44+
45+
4146
def run(self):
4247
try:
4348
inform(

setup.cfg

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = OSBModelValidation
3-
version = 0.2.19
3+
version = 0.2.20
44
author = Boris Marin, Padraig Gleeson
55
author_email = [email protected]
66
url = https://github.com/OpenSourceBrain/osb-model-validation
@@ -28,6 +28,7 @@ install_requires =
2828
pathlib; python_version<'3.4'
2929
docopt
3030
importlib-metadata; python_version<'3.8'
31+
setuptools
3132

3233
packages = find:
3334

0 commit comments

Comments
 (0)