Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/ci_test_all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ jobs:
brew install hdf5
- name: Install & test package
shell: bash
env:
PYTHONUTF8: "1"
PYTHONIOENCODING: "utf-8"
run: |
python -m pip install --upgrade pip
# pip install 'numpy<2.0.0' # due to lingering issues with other modules & numpy...
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ repos:
# - id: black

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
rev: v6.0.0
hooks:
- id: check-added-large-files
args: ['--maxkb=800']
Expand Down Expand Up @@ -46,6 +46,6 @@ repos:
# files: src

- repo: https://github.com/psf/black
rev: 22.3.0
rev: 24.10.0
hooks:
- id: black
2 changes: 1 addition & 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 2026-05-19.
This page is generated periodically, most recently on 2026-06-24.

- Padraig Gleeson ([@pgleeson](https://github.com/pgleeson))
- Manifest Chakalov ([@mqnifestkelvin](https://github.com/mqnifestkelvin))
Expand Down
89 changes: 0 additions & 89 deletions examples/sbml/SBML.md
Original file line number Diff line number Diff line change
Expand Up @@ -1670,95 +1670,6 @@ XHTML field of SBase
</tr>


</table>

## SpeciesReference
### Allowed parameters
<table>
<tr>
<td><b>sid</b></td>
<td>str</td>
<td><i> SId optional</i></td>
</tr>


<tr>
<td><b>name</b></td>
<td>str</td>
<td><i> string optional</i></td>
</tr>


<tr>
<td><b>metaid</b></td>
<td>str</td>
<td><i> XML ID optional</i></td>
</tr>


<tr>
<td><b>sboTerm</b></td>
<td>str</td>
<td><i>SBOTerm optional</i></td>
</tr>


<tr>
<td><b>notes</b></td>
<td><a href="#notes">Notes</a></td>
<td><i> XHTML 1.0 optional</i></td>
</tr>


<tr>
<td><b>annotation</b></td>
<td>str</td>
<td><i>XML content optional</i></td>
</tr>


<tr>
<td><b>species</b></td>
<td>str</td>
<td><i>SIdRef</i></td>
</tr>


<tr>
<td><b>stoichiometry</b></td>
<td>float</td>
<td><i>double optional</i></td>
</tr>


<tr>
<td><b>constant</b></td>
<td>bool</td>
<td><i>boolean</i></td>
</tr>


</table>

## Notes
XHTML field of SBase

### Allowed parameters
<table>
<tr>
<td><b>xmlns</b></td>
<td>str</td>
<td><i>str fixed "http://www.w3.org/1999/xhtml"</i></td>
</tr>


<tr>
<td><b>content</b></td>
<td>str</td>
<td><i>str valid XHTML</i></td>
</tr>


</table>

## ModifierSpeciesReference
Expand Down
33 changes: 0 additions & 33 deletions examples/sbml/SBML.rst
Original file line number Diff line number Diff line change
Expand Up @@ -650,39 +650,6 @@ Allowed field Data Type Description
**content** str str valid XHTML
=============== =========== ========================================

================
SpeciesReference
================
**Allowed parameters**

================= ======================================= ====================
Allowed field Data Type Description
================= ======================================= ====================
**sid** str SId optional
**name** str string optional
**metaid** str XML ID optional
**sboTerm** str SBOTerm optional
**notes** `<class 'sbml32spec.Notes'> <#notes>`__ XHTML 1.0 optional
**annotation** str XML content optional
**species** str SIdRef
**stoichiometry** float double optional
**constant** bool boolean
================= ======================================= ====================

=====
Notes
=====
XHTML field of SBase

**Allowed parameters**

=============== =========== ========================================
Allowed field Data Type Description
=============== =========== ========================================
**xmlns** str str fixed "http://www.w3.org/1999/xhtml"
**content** str str valid XHTML
=============== =========== ========================================

========================
ModifierSpeciesReference
========================
Expand Down
6 changes: 3 additions & 3 deletions examples/test/test.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@ A model....
<tr>
<td><b>float_like_req</b></td>
<td>float</td>
<td><i>name says it all...</i></td>
<td><i>Anything (float, str, int) which can be converted to a float with float(x)</i></td>
</tr>


<tr>
<td><b>float_like_optional</b></td>
<td>float</td>
<td><i>name also says it all...</i></td>
<td><i>Same as float<a href="#like">like</a>req, but optional</i></td>
</tr>


<tr>
<td><b>int_like_optional</b></td>
<td>int</td>
<td><i>name also says it all...</i></td>
<td><i>Same as float<a href="#like">like</a>req, but optional int</i></td>
</tr>


Expand Down
8 changes: 4 additions & 4 deletions examples/test/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ class TopClass(Base):

Args:
id: The unique id of the thing
float_like_req: name says it all...
float_like_optional: name also says it all...
int_like_optional: name also says it all...
float_like_req: Anything (float, str, int) which can be converted to a float with float(x)
float_like_optional: Same as float_like_req, but optional
int_like_optional: Same as float_like_req, but optional int
"""

id: str = field(validator=instance_of(str))
Expand All @@ -74,7 +74,7 @@ class TopClass(Base):
) # a string which can be converted to a float...

# tc.float_like_req = 2.01
tc.float_like_optional = 44
tc.float_like_optional = "42"
# tc.float_like_optional2 = 66
tc.mid = MidClassNoId(int_val=4, str_val="three")

Expand Down
7 changes: 4 additions & 3 deletions examples/test/test.specification.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ TopClass:
description: The unique id of the thing
float_like_req:
type: float
description: name says it all...
description: Anything (float, str, int) which can be converted to a float
with float(x)
float_like_optional:
type: float
description: name also says it all...
description: Same as float_like_req, but optional
int_like_optional:
type: int
description: name also says it all...
description: Same as float_like_req, but optional int
mid:
type: MidClassNoId
description: ''
Expand Down
2 changes: 1 addition & 1 deletion examples/test/test_instance.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"MyTest": {
"float_like_req": 4.0,
"float_like_optional": 44.0,
"float_like_optional": 42.0,
"mid": {
"int_val": 4,
"str_val": "three"
Expand Down
2 changes: 1 addition & 1 deletion examples/test/test_instance.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<TopClass id="MyTest" float_like_req="4.0" float_like_optional="44.0">
<TopClass id="MyTest" float_like_req="4.0" float_like_optional="42.0">
<mid int_val="4" str_val="three"/>
</TopClass>
2 changes: 1 addition & 1 deletion examples/test/test_instance.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MyTest:
float_like_req: 4.0
float_like_optional: 44.0
float_like_optional: 42.0
mid:
int_val: 4
str_val: three
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.9"
__version__ = "0.4.0"

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

Expand Down
Loading
Loading