Skip to content

Commit

Permalink
Merge branch 'experimental' into test_neuroml
Browse files Browse the repository at this point in the history
  • Loading branch information
pgleeson committed Mar 20, 2024
2 parents 79a8553 + 3746060 commit 1489e57
Show file tree
Hide file tree
Showing 14 changed files with 24 additions and 19 deletions.
21 changes: 10 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ jobs:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: pre-commit/[email protected]
with:
extra_args: --hook-stage manual --all-files
Expand All @@ -24,16 +24,17 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ]
runs-on: [ubuntu-latest, macos-latest, windows-latest]

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


- name: Install package
run: |
python -m pip install --upgrade pip
Expand All @@ -51,12 +52,12 @@ jobs:
run: |
cd examples
python document.py
git diff
cd test
python test.py
- name: Test NeuroML examples
if: ${{ matrix.python-version != '3.7'}}
run: |
cd examples/neuroml2
Expand All @@ -65,21 +66,20 @@ jobs:
# Note: NeuroML files will be validated with OMV below
- name: Test SBML examples
if: ${{ matrix.python-version != '3.7'}}
run: |
cd examples/sbml
./regenerateAndTest.sh
- name: Run pytest
run: |
pytest tests
pytest tests -v
- name: Install & test NeuroMLlite
- name: Test NeuroMLlite
run: |
git clone --branch development https://github.com/NeuroML/NeuroMLlite.git
cd NeuroMLlite
#pip install . # Use versions of neuroml libs as set in setup.py
# pip install . # Use versions of neuroml libs as set in modelspec's setup.cfg -> dev -> NeuroMLlite
cd examples
python Example1.py
Expand All @@ -93,7 +93,6 @@ jobs:
python arrays.py -run # test one example
- name: Build Documentation
if: ${{ matrix.python-version != '3.7'}}
run: |
# Note: contributors generation below fails on py 3.7 due to pandas version...
pip install .[docs]
Expand Down
3 changes: 2 additions & 1 deletion docs/sphinx/source/api/Contributors.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Modelspec contributors

This page list names and Github profiles of contributors to Modelspec, listed in no particular order.
This page is generated periodically, most recently on 2023-09-19.
This page is generated periodically, most recently on 2024-03-06.

- Padraig Gleeson ([@pgleeson](https://github.com/pgleeson))
- Manifest Chakalov ([@mqnifestkelvin](https://github.com/mqnifestkelvin))
Expand All @@ -12,3 +12,4 @@ This page is generated periodically, most recently on 2023-09-19.
- Parikshit Singh Rathore ([@parikshit14](https://github.com/parikshit14))
- Ankur Sinha ([@sanjayankur31](https://github.com/sanjayankur31))
- kmantel ([@kmantel](https://github.com/kmantel))
- Robert Vickerstaff ([@robertvi](https://github.com/robertvi))
Binary file modified docs/sphinx/source/api/examples/document.bson
Binary file not shown.
1 change: 1 addition & 0 deletions docs/sphinx/source/api/examples/document.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"MyBook": {
"title": "My life in Python",
"ISBN": 123,
"sections": {
"Abstract": {
"paragraphs": [
Expand Down
2 changes: 1 addition & 1 deletion docs/sphinx/source/api/examples/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class Document(Base):
sections: List[Section] = field(factory=list)


doc = Document(id="MyBook")
doc = Document(id="MyBook", ISBN=123)
doc.title = "My life in Python"

a = Section(id="Abstract")
Expand Down
2 changes: 1 addition & 1 deletion docs/sphinx/source/api/examples/document.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<Document id="MyBook" title="My life in Python">
<Document id="MyBook" title="My life in Python" ISBN="123">
<Section id="Abstract">
<Paragraph contents="Blah blah blah"/>
<Paragraph contents="Blah2"/>
Expand Down
1 change: 1 addition & 0 deletions docs/sphinx/source/api/examples/document.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
MyBook:
title: My life in Python
ISBN: 123
sections:
Abstract:
paragraphs:
Expand Down
Binary file modified examples/document.bson
Binary file not shown.
1 change: 1 addition & 0 deletions examples/document.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"MyBook": {
"title": "My life in Python",
"ISBN": 123,
"sections": {
"Abstract": {
"paragraphs": [
Expand Down
2 changes: 1 addition & 1 deletion examples/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class Document(Base):
sections: List[Section] = field(factory=list)


doc = Document(id="MyBook")
doc = Document(id="MyBook", ISBN=123)
doc.title = "My life in Python"

a = Section(id="Abstract")
Expand Down
2 changes: 1 addition & 1 deletion examples/document.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<Document id="MyBook" title="My life in Python">
<Document id="MyBook" title="My life in Python" ISBN="123">
<Section id="Abstract">
<Paragraph contents="Blah blah blah"/>
<Paragraph contents="Blah2"/>
Expand Down
1 change: 1 addition & 0 deletions examples/document.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
MyBook:
title: My life in Python
ISBN: 123
sections:
Abstract:
paragraphs:
Expand Down
5 changes: 3 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ classifiers =
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Topic :: Scientific/Engineering
Topic :: Software Development
Typing :: Typed
Expand All @@ -38,7 +38,7 @@ install_requires =
numpy
tabulate
attrs
cattrs
cattrs>=23.2.3 # Issue with JSON serialisation in some versions, see https://github.com/ModECI/modelspec/issues/66
docstring-parser
typing_extensions;python_version<'3.8'
typing_compat;python_version<'3.8'
Expand Down Expand Up @@ -68,6 +68,7 @@ test =
typing_extensions; python_version<'3.8'

docs =
pandas
requests
Sphinx
recommonmark>=0.5.0
Expand Down
2 changes: 1 addition & 1 deletion src/modelspec/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.3.3"
__version__ = "0.3.4"

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

Expand Down

0 comments on commit 1489e57

Please sign in to comment.