Skip to content

Commit c304185

Browse files
committed
Merge branch 'test_neuroml' into test_sbml
2 parents e82058b + d03ffb2 commit c304185

File tree

6 files changed

+100
-8
lines changed

6 files changed

+100
-8
lines changed

.github/workflows/ci.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,7 @@ jobs:
6060
cd ../neuroml2
6161
python neuroml2_spec.py
6262
63-
pip install pyneuroml
64-
65-
# Requires: pip install pyneuroml
66-
pynml -validate hello_world_neuroml.net.nml
67-
pynml -validate TestNeuroML.xml
63+
# Note: NeuroML files will be validated with OMV below
6864
6965
- name: Run pytest
7066
run: |
@@ -78,7 +74,6 @@ jobs:
7874
cd examples
7975
python Example1.py
8076
81-
8277
- name: Install MDF
8378
run: |
8479
@@ -100,6 +95,20 @@ jobs:
10095
make clean
10196
make html
10297
98+
- name: Install and test with OMV
99+
if: ${{ matrix.runs-on != 'windows-latest' }}
100+
run: |
101+
# Note: OMV not well tested on Windows...
102+
103+
pip install git+https://github.com/OpenSourceBrain/osb-model-validation
104+
pip install scipy sympy matplotlib cython pandas tables
105+
106+
# Run OMV tests on all engines
107+
cd examples
108+
omv all -V
109+
110+
omv list -V # list installed engines
111+
103112
- name: Final version info
104113
run: |
105114
pip list

.github/workflows/static.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Simple workflow for deploying static content to GitHub Pages
2+
name: Deploy static content to Pages
3+
4+
on:
5+
# Runs on pushes targeting the default branch
6+
push:
7+
branches: ["main"]
8+
9+
# Allows you to run this workflow manually from the Actions tab
10+
workflow_dispatch:
11+
12+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
13+
permissions:
14+
contents: read
15+
pages: write
16+
id-token: write
17+
18+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
19+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
20+
concurrency:
21+
group: "pages"
22+
cancel-in-progress: false
23+
24+
jobs:
25+
# Single deploy job since we're just deploying
26+
deploy:
27+
environment:
28+
name: github-pages
29+
url: ${{ steps.deployment.outputs.page_url }}
30+
runs-on: ubuntu-latest
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@v3
34+
35+
- name: Set up Python
36+
uses: actions/setup-python@v4
37+
with:
38+
python-version: 3.9
39+
40+
- name: Install package
41+
run: |
42+
python -m pip install --upgrade pip
43+
pip install .[dev]
44+
45+
- name: List packages so far
46+
run: |
47+
pip list
48+
49+
- name: Build Documentation
50+
run: |
51+
52+
pip install .[docs]
53+
cd docs
54+
python generate.py
55+
python contributors.py
56+
cd sphinx
57+
make clean
58+
make html
59+
60+
- name: Setup Pages
61+
uses: actions/configure-pages@v3
62+
63+
- name: Upload artifact
64+
uses: actions/upload-pages-artifact@v2
65+
with:
66+
# Upload just docs
67+
path: 'docs/sphinx/build/html'
68+
69+
- name: Deploy to GitHub Pages
70+
id: deployment
71+
uses: actions/deploy-pages@v2

docs/sphinx/source/api/Contributors.md

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

55
This page list names and Github profiles of contributors to Modelspec, listed in no particular order.
6-
This page is generated periodically, most recently on 2023-08-23.
6+
This page is generated periodically, most recently on 2023-09-13.
77

88
- Padraig Gleeson ([@pgleeson](https://github.com/pgleeson))
99
- Manifest Chakalov ([@mqnifestkelvin](https://github.com/mqnifestkelvin))

examples/neuroml2/.test.validate.omt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Script for running automated tests on OSB using Travis-CI, see https://github.com/OpenSourceBrain/osb-model-validation
2+
3+
# This test will validate NeuroML 2 files in the current directory using: jnml -validate *.nml
4+
target: "*.nml TestNeuroML.xml"
5+
engine: jNeuroML_validate

src/modelspec/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "0.3.2"
1+
__version__ = "0.3.3"
22

33
from .base_types import Base, define, has, field, fields, optional, instance_of, in_
44

test_all.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ cd ../..
3131

3232
pytest tests -v
3333

34+
## Run OMV tests
35+
36+
# See https://github.com/OpenSourceBrain/osb-model-validation
37+
omv all -V
38+
3439

3540
## Generate the docs
3641

@@ -42,4 +47,6 @@ make clean
4247
make html
4348
cd ..
4449

50+
## Format all file
51+
4552
pre-commit run --all-files

0 commit comments

Comments
 (0)