SimBio 0.4.0__tar.gz → 1.0.0b0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- simbio-1.0.0b0/PKG-INFO +229 -0
- simbio-0.4/PKG-INFO → simbio-1.0.0b0/README.md +82 -52
- simbio-1.0.0b0/pyproject.toml +139 -0
- simbio-1.0.0b0/src/simbio/__init__.py +48 -0
- simbio-1.0.0b0/src/simbio/core.py +163 -0
- simbio-1.0.0b0/src/simbio/io/graph/networkx.py +46 -0
- {simbio-0.4 → simbio-1.0.0b0}/src/simbio/io/mathML/exporter.py +44 -43
- {simbio-0.4 → simbio-1.0.0b0}/src/simbio/io/mathML/importer.py +47 -45
- simbio-1.0.0b0/src/simbio/io/mathML/symbol.py +9 -0
- {simbio-0.4 → simbio-1.0.0b0}/src/simbio/io/mathML/test_mathML.py +3 -3
- {simbio-0.4 → simbio-1.0.0b0}/src/simbio/io/mathML/to_symbolite.py +45 -50
- {simbio-0.4 → simbio-1.0.0b0}/src/simbio/io/sbml/importer.py +56 -60
- {simbio-0.4 → simbio-1.0.0b0}/src/simbio/io/sbml/test_importer.py +2 -2
- {simbio-0.4 → simbio-1.0.0b0}/src/simbio/reactions/__init__.py +10 -10
- {simbio-0.4 → simbio-1.0.0b0}/src/simbio/reactions/compound.py +19 -18
- {simbio-0.4 → simbio-1.0.0b0}/src/simbio/reactions/enzymatic.py +21 -14
- {simbio-0.4 → simbio-1.0.0b0}/src/simbio/reactions/single.py +25 -18
- simbio-1.0.0b0/src/simbio/reactions/test_reactions.py +22 -0
- simbio-1.0.0b0/src/simbio/test_core.py +378 -0
- simbio-0.4/.gitattributes +0 -4
- simbio-0.4/.github/workflows/ci.yml +0 -54
- simbio-0.4/.gitignore +0 -24
- simbio-0.4/.pre-commit-config.yaml +0 -28
- simbio-0.4/.readthedocs.yml +0 -21
- simbio-0.4/README.md +0 -142
- simbio-0.4/conftest.py +0 -32
- simbio-0.4/docs/_config.yml +0 -32
- simbio-0.4/docs/_toc.yml +0 -21
- simbio-0.4/docs/compilers/index.md +0 -67
- simbio-0.4/docs/design/design.md +0 -186
- simbio-0.4/docs/design/dsl.md +0 -225
- simbio-0.4/docs/design/features.md +0 -77
- simbio-0.4/docs/design/multilevel_dsl.md +0 -31
- simbio-0.4/docs/design/references.md +0 -164
- simbio-0.4/docs/examples/basic.md +0 -70
- simbio-0.4/docs/examples/chained-reactions.md +0 -78
- simbio-0.4/docs/examples/compartments.md +0 -85
- simbio-0.4/docs/examples/enzymatic.md +0 -86
- simbio-0.4/docs/index.md +0 -24
- simbio-0.4/docs/jupytext.toml +0 -3
- simbio-0.4/docs/model/dynamic.md +0 -115
- simbio-0.4/docs/model/index.md +0 -13
- simbio-0.4/docs/model/reactions.md +0 -132
- simbio-0.4/docs/model/static.md +0 -314
- simbio-0.4/environment-dev.yml +0 -18
- simbio-0.4/pyproject.toml +0 -59
- simbio-0.4/requirements.docs.txt +0 -5
- simbio-0.4/requirements.io.txt +0 -2
- simbio-0.4/requirements.test.txt +0 -3
- simbio-0.4/requirements.txt +0 -1
- simbio-0.4/setup.cfg +0 -4
- simbio-0.4/src/SimBio.egg-info/PKG-INFO +0 -174
- simbio-0.4/src/SimBio.egg-info/SOURCES.txt +0 -59
- simbio-0.4/src/SimBio.egg-info/dependency_links.txt +0 -1
- simbio-0.4/src/SimBio.egg-info/requires.txt +0 -17
- simbio-0.4/src/SimBio.egg-info/top_level.txt +0 -1
- simbio-0.4/src/simbio/__init__.py +0 -18
- simbio-0.4/src/simbio/core.py +0 -311
- simbio-0.4/src/simbio/io/mathML/symbol.py +0 -9
- simbio-0.4/src/simbio/reactions/test_reactions.py +0 -29
- simbio-0.4/src/simbio/test_core.py +0 -203
- /simbio-0.4/docs/references.bib → /simbio-1.0.0b0/src/simbio/io/__init__.py +0 -0
- {simbio-0.4 → simbio-1.0.0b0}/src/simbio/io/biomodels.py +0 -0
- {simbio-0.4 → simbio-1.0.0b0}/src/simbio/io/mathML/__init__.py +0 -0
- {simbio-0.4 → simbio-1.0.0b0}/src/simbio/io/sbml/__init__.py +0 -0
- {simbio-0.4 → simbio-1.0.0b0}/src/simbio/io/sbml/from_libsbml.py +0 -0
- {simbio-0.4 → simbio-1.0.0b0}/src/simbio/io/sbml/tests/atol_factor.csv +0 -0
- {simbio-0.4 → simbio-1.0.0b0}/src/simbio/io/sbml/tests/test_sbml_test_suite.py +0 -0
- {simbio-0.4 → simbio-1.0.0b0}/src/simbio/io/sbml/types.py +0 -0
simbio-1.0.0b0/PKG-INFO
ADDED
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: simbio
|
|
3
|
+
Version: 1.0.0b0
|
|
4
|
+
Summary: A Python-based package for simulation of Chemical Reaction Networks (CRNs).
|
|
5
|
+
Keywords: mass action,michaelis menten,ode,compartment,reaction,SBML,poincare
|
|
6
|
+
Author: Hernán E. Grecco, Mauro Silberberg
|
|
7
|
+
Author-email: Hernán E. Grecco <hernan.grecco@gmail.com>, Mauro Silberberg <maurosilber@gmail.com>
|
|
8
|
+
License-Expression: MIT
|
|
9
|
+
Classifier: Intended Audience :: Developers
|
|
10
|
+
Classifier: Intended Audience :: Science/Research
|
|
11
|
+
Classifier: Topic :: Scientific/Engineering
|
|
12
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Operating System :: OS Independent
|
|
15
|
+
Requires-Dist: poincare>=1.0.0b2
|
|
16
|
+
Requires-Dist: biomodels ; extra == 'io'
|
|
17
|
+
Requires-Dist: python-libsbml ; extra == 'io'
|
|
18
|
+
Requires-Python: >=3.12
|
|
19
|
+
Project-URL: homepage, https://github.com/dyscolab/simbio
|
|
20
|
+
Project-URL: issues, https://github.com/dyscolab/simbio/issues
|
|
21
|
+
Project-URL: changelog, https://github.com/dyscolab/simbio/blob/main/CHANGELOG.md
|
|
22
|
+
Project-URL: documentation, https://dyscolab.github.io/simbio
|
|
23
|
+
Provides-Extra: io
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
|
|
26
|
+
# simbio
|
|
27
|
+
|
|
28
|
+
[![Copier Badge][copier-badge]][copier-url]
|
|
29
|
+
[![Pixi Badge][pixi-badge]][pixi-url]
|
|
30
|
+
![License][license-badge]
|
|
31
|
+
[![CI Badge][ci-badge]][ci-url]
|
|
32
|
+
[![conda-forge Badge][conda-forge-badge]][conda-forge-url]
|
|
33
|
+
[![PyPI Badge][pypi-badge]][pypi-url]
|
|
34
|
+
[![Python version Badge][pypi-version-badge]][pypi-version-url]
|
|
35
|
+
|
|
36
|
+
A Python-based package for simulation of Chemical Reaction Networks (CRNs).
|
|
37
|
+
It extends [`poincare`](https://github.com/dyscolab/poincare),
|
|
38
|
+
a package for modelling dynamical systems,
|
|
39
|
+
to add functionality for CRNs.
|
|
40
|
+
|
|
41
|
+
## Usage
|
|
42
|
+
|
|
43
|
+
To create a system with two species $A$ and $B$
|
|
44
|
+
and a reaction converting $2A \\rightarrow B$ with rate 1:
|
|
45
|
+
|
|
46
|
+
```python
|
|
47
|
+
>>> from simbio import Compartment, Species, RateLaw, initial
|
|
48
|
+
>>> class Model(Compartment):
|
|
49
|
+
... A: Species = initial(default=1)
|
|
50
|
+
... B: Species = initial(default=0)
|
|
51
|
+
... r = RateLaw(
|
|
52
|
+
... reactants=[2 * A],
|
|
53
|
+
... products=[B],
|
|
54
|
+
... rate_law=1,
|
|
55
|
+
... )
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
This corresponds to the following system of equations
|
|
59
|
+
|
|
60
|
+
$$
|
|
61
|
+
\\begin{cases}
|
|
62
|
+
\\frac{dA}{dt} = -2 \\
|
|
63
|
+
\\frac{dB}{dt} = +1
|
|
64
|
+
\\end{cases}
|
|
65
|
+
$$
|
|
66
|
+
|
|
67
|
+
with initial conditions
|
|
68
|
+
|
|
69
|
+
$$
|
|
70
|
+
\\begin{cases}
|
|
71
|
+
A(0) = 1 \\
|
|
72
|
+
B(0) = 0
|
|
73
|
+
\\end{cases}
|
|
74
|
+
$$
|
|
75
|
+
|
|
76
|
+
In CRNs,
|
|
77
|
+
we usually deal with [mass-action](https://en.wikipedia.org/wiki/Law_of_mass_action) reactions.
|
|
78
|
+
Using `MassAction` instead of `Reaction` automatically adds the reactants to the rate law:
|
|
79
|
+
|
|
80
|
+
```python
|
|
81
|
+
>>> from simbio import MassAction
|
|
82
|
+
>>> class MassActionModel(Compartment):
|
|
83
|
+
... A: Species = initial(default=1)
|
|
84
|
+
... B: Species = initial(default=0)
|
|
85
|
+
... r = MassAction(
|
|
86
|
+
... reactants=[2 * A],
|
|
87
|
+
... products=[B],
|
|
88
|
+
... rate=1,
|
|
89
|
+
... )
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
generating the following equations:
|
|
93
|
+
|
|
94
|
+
$$
|
|
95
|
+
\\begin{cases}
|
|
96
|
+
\\frac{dA}{dt} = -2 A^2 \\
|
|
97
|
+
\\frac{dB}{dt} = +1 A^2
|
|
98
|
+
\\end{cases}
|
|
99
|
+
$$
|
|
100
|
+
|
|
101
|
+
To simulate the system,
|
|
102
|
+
use the `Simulator.solve` which outputs a `pandas.DataFrame`:
|
|
103
|
+
|
|
104
|
+
```python
|
|
105
|
+
>>> from simbio import Simulator
|
|
106
|
+
>>> Simulator(MassActionModel).solve(save_at=range(5))
|
|
107
|
+
A B
|
|
108
|
+
time
|
|
109
|
+
0 1.000000 0.000000
|
|
110
|
+
1 0.333266 0.333367
|
|
111
|
+
2 0.199937 0.400032
|
|
112
|
+
3 0.142798 0.428601
|
|
113
|
+
4 0.111061 0.444470
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
For more details into SimBio's capabilities,
|
|
117
|
+
we recommend reading [poincaré's README](https://github.com/dyscolab/poincare).
|
|
118
|
+
|
|
119
|
+
## SBML
|
|
120
|
+
|
|
121
|
+
SimBio can import models from Systems Biology Markup Language (SBML) files:
|
|
122
|
+
|
|
123
|
+
```python
|
|
124
|
+
>>> from simbio.io import sbml
|
|
125
|
+
>>> sbml.load("repressilator.sbml")
|
|
126
|
+
Elowitz2000 - Repressilator
|
|
127
|
+
-----------------------------------------------------------------------------------
|
|
128
|
+
type total names
|
|
129
|
+
---------- ------- --------------------------------------------------------------
|
|
130
|
+
variables 6 PX, PY, PZ, X, Y, Z
|
|
131
|
+
parameters 17 cell, beta, alpha0, alpha, eff, n, KM, tau_mRNA, tau_prot, ...
|
|
132
|
+
equations 12 Reaction1, Reaction2, Reaction3, Reaction4, Reaction5, ...
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
or download them from the [BioModels](https://www.ebi.ac.uk/biomodels/) repository:
|
|
136
|
+
|
|
137
|
+
```python
|
|
138
|
+
>>> from simbio.io import biomodels
|
|
139
|
+
>>> biomodels.load("BIOMD12")
|
|
140
|
+
Elowitz2000 - Repressilator
|
|
141
|
+
-----------------------------------------------------------------------------------
|
|
142
|
+
type total names
|
|
143
|
+
---------- ------- --------------------------------------------------------------
|
|
144
|
+
variables 6 PX, PY, PZ, X, Y, Z
|
|
145
|
+
parameters 17 cell, beta, alpha0, alpha, eff, n, KM, tau_mRNA, tau_prot, ...
|
|
146
|
+
equations 12 Reaction1, Reaction2, Reaction3, Reaction4, Reaction5, ...
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
## Install
|
|
150
|
+
|
|
151
|
+
Using [pixi][pixi-url],
|
|
152
|
+
install from PyPI with:
|
|
153
|
+
|
|
154
|
+
```sh
|
|
155
|
+
pixi add --pypi simbio
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
or install the latest development version from GitHub with:
|
|
159
|
+
|
|
160
|
+
```sh
|
|
161
|
+
pixi add --pypi simbio@https://github.com/dyscolab/simbio.git
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
Otherwise,
|
|
165
|
+
use `pip` or your `pip`-compatible package manager:
|
|
166
|
+
|
|
167
|
+
```sh
|
|
168
|
+
pip install simbio # from PyPI
|
|
169
|
+
pip install git+https://github.com/dyscolab/simbio.git # from GitHub
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
## Development
|
|
173
|
+
|
|
174
|
+
This project is managed by [pixi][pixi-url].
|
|
175
|
+
You can install it for development using:
|
|
176
|
+
|
|
177
|
+
```sh
|
|
178
|
+
git clone https://github.com/dyscolab/simbio
|
|
179
|
+
cd simbio
|
|
180
|
+
pixi run pre-commit-install
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
Pre-commit hooks are used to lint and format the project.
|
|
184
|
+
|
|
185
|
+
### Testing
|
|
186
|
+
|
|
187
|
+
Run tests using:
|
|
188
|
+
|
|
189
|
+
```sh
|
|
190
|
+
pixi run test
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
### Publishing to PyPI
|
|
194
|
+
|
|
195
|
+
When a tagged commit is pushed to GitHub,
|
|
196
|
+
the GitHub Action defined in `.github/workflows/ci.yml`
|
|
197
|
+
builds and publishes the package to PyPI.
|
|
198
|
+
|
|
199
|
+
Tag a commit and push the tags with:
|
|
200
|
+
|
|
201
|
+
```sh
|
|
202
|
+
git tag <my-tag>
|
|
203
|
+
git push --tags
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
Trusted publishing must be enabled once in [PyPI Publishing](https://pypi.org/manage/account/publishing/).
|
|
207
|
+
Fill the following values in the form:
|
|
208
|
+
|
|
209
|
+
```
|
|
210
|
+
PyPI Project Name: simbio
|
|
211
|
+
Owner: maurosilber
|
|
212
|
+
Repository name: simbio
|
|
213
|
+
Workflow name: ci.yml
|
|
214
|
+
Environment name: pypi
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
[ci-badge]: https://img.shields.io/github/actions/workflow/status/dyscolab/simbio/ci.yml
|
|
218
|
+
[ci-url]: https://github.com/dyscolab/simbio/actions/workflows/ci.yml
|
|
219
|
+
[conda-forge-badge]: https://img.shields.io/conda/vn/conda-forge/simbio?logoColor=white&logo=conda-forge
|
|
220
|
+
[conda-forge-url]: https://prefix.dev/channels/conda-forge/packages/simbio
|
|
221
|
+
[copier-badge]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/copier-org/copier/master/img/badge/badge-black.json
|
|
222
|
+
[copier-url]: https://github.com/copier-org/copier
|
|
223
|
+
[license-badge]: https://img.shields.io/badge/license-MIT-blue
|
|
224
|
+
[pixi-badge]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/prefix-dev/pixi/main/assets/badge/v0.json
|
|
225
|
+
[pixi-url]: https://pixi.sh
|
|
226
|
+
[pypi-badge]: https://img.shields.io/pypi/v/simbio.svg?logo=pypi&logoColor=white
|
|
227
|
+
[pypi-url]: https://pypi.org/project/simbio
|
|
228
|
+
[pypi-version-badge]: https://img.shields.io/pypi/pyversions/simbio?logoColor=white&logo=python
|
|
229
|
+
[pypi-version-url]: https://pypi.org/project/simbio
|
|
@@ -1,45 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
Classifier: Programming Language :: Python :: 3
|
|
14
|
-
Classifier: License :: OSI Approved :: BSD License
|
|
15
|
-
Classifier: Operating System :: OS Independent
|
|
16
|
-
Requires-Python: >=3.10
|
|
17
|
-
Description-Content-Type: text/markdown
|
|
18
|
-
Requires-Dist: poincare>=0.3.1
|
|
19
|
-
Provides-Extra: io
|
|
20
|
-
Requires-Dist: biomodels; extra == "io"
|
|
21
|
-
Requires-Dist: python-libsbml; extra == "io"
|
|
22
|
-
Provides-Extra: test
|
|
23
|
-
Requires-Dist: pooch; extra == "test"
|
|
24
|
-
Requires-Dist: pytest<8.1; extra == "test"
|
|
25
|
-
Requires-Dist: simbio[io]; extra == "test"
|
|
26
|
-
Provides-Extra: docs
|
|
27
|
-
Requires-Dist: jupyter-book; extra == "docs"
|
|
28
|
-
Requires-Dist: jupytext; extra == "docs"
|
|
29
|
-
Requires-Dist: numba; extra == "docs"
|
|
30
|
-
Requires-Dist: simbio-corbat2018; extra == "docs"
|
|
31
|
-
Requires-Dist: simbio[test]; extra == "docs"
|
|
32
|
-
|
|
33
|
-

|
|
34
|
-

|
|
35
|
-

|
|
36
|
-

|
|
37
|
-
[](https://github.com/hgrecco/simbio/actions/workflows/ci.yml)
|
|
38
|
-
|
|
39
|
-
# SimBio
|
|
40
|
-
|
|
41
|
-
`simbio` is a Python-based package for simulation of Chemical Reaction Networks (CRNs).
|
|
42
|
-
It extends [`poincare`](https://github.com/maurosilber/poincare),
|
|
1
|
+
# simbio
|
|
2
|
+
|
|
3
|
+
[![Copier Badge][copier-badge]][copier-url]
|
|
4
|
+
[![Pixi Badge][pixi-badge]][pixi-url]
|
|
5
|
+
![License][license-badge]
|
|
6
|
+
[![CI Badge][ci-badge]][ci-url]
|
|
7
|
+
[![conda-forge Badge][conda-forge-badge]][conda-forge-url]
|
|
8
|
+
[![PyPI Badge][pypi-badge]][pypi-url]
|
|
9
|
+
[![Python version Badge][pypi-version-badge]][pypi-version-url]
|
|
10
|
+
|
|
11
|
+
A Python-based package for simulation of Chemical Reaction Networks (CRNs).
|
|
12
|
+
It extends [`poincare`](https://github.com/dyscolab/poincare),
|
|
43
13
|
a package for modelling dynamical systems,
|
|
44
14
|
to add functionality for CRNs.
|
|
45
15
|
|
|
@@ -119,7 +89,7 @@ time
|
|
|
119
89
|
```
|
|
120
90
|
|
|
121
91
|
For more details into SimBio's capabilities,
|
|
122
|
-
we recommend reading [poincaré's README](https://github.com/
|
|
92
|
+
we recommend reading [poincaré's README](https://github.com/dyscolab/poincare).
|
|
123
93
|
|
|
124
94
|
## SBML
|
|
125
95
|
|
|
@@ -151,24 +121,84 @@ parameters 17 cell, beta, alpha0, alpha, eff, n, KM, tau_mRNA, tau_prot,
|
|
|
151
121
|
equations 12 Reaction1, Reaction2, Reaction3, Reaction4, Reaction5, ...
|
|
152
122
|
```
|
|
153
123
|
|
|
154
|
-
##
|
|
124
|
+
## Install
|
|
155
125
|
|
|
156
|
-
|
|
126
|
+
Using [pixi][pixi-url],
|
|
127
|
+
install from PyPI with:
|
|
157
128
|
|
|
129
|
+
```sh
|
|
130
|
+
pixi add --pypi simbio
|
|
158
131
|
```
|
|
159
|
-
|
|
132
|
+
|
|
133
|
+
or install the latest development version from GitHub with:
|
|
134
|
+
|
|
135
|
+
```sh
|
|
136
|
+
pixi add --pypi simbio@https://github.com/dyscolab/simbio.git
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Otherwise,
|
|
140
|
+
use `pip` or your `pip`-compatible package manager:
|
|
141
|
+
|
|
142
|
+
```sh
|
|
143
|
+
pip install simbio # from PyPI
|
|
144
|
+
pip install git+https://github.com/dyscolab/simbio.git # from GitHub
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
## Development
|
|
148
|
+
|
|
149
|
+
This project is managed by [pixi][pixi-url].
|
|
150
|
+
You can install it for development using:
|
|
151
|
+
|
|
152
|
+
```sh
|
|
153
|
+
git clone https://github.com/dyscolab/simbio
|
|
154
|
+
cd simbio
|
|
155
|
+
pixi run pre-commit-install
|
|
160
156
|
```
|
|
161
157
|
|
|
162
|
-
|
|
158
|
+
Pre-commit hooks are used to lint and format the project.
|
|
159
|
+
|
|
160
|
+
### Testing
|
|
163
161
|
|
|
162
|
+
Run tests using:
|
|
163
|
+
|
|
164
|
+
```sh
|
|
165
|
+
pixi run test
|
|
164
166
|
```
|
|
165
|
-
|
|
167
|
+
|
|
168
|
+
### Publishing to PyPI
|
|
169
|
+
|
|
170
|
+
When a tagged commit is pushed to GitHub,
|
|
171
|
+
the GitHub Action defined in `.github/workflows/ci.yml`
|
|
172
|
+
builds and publishes the package to PyPI.
|
|
173
|
+
|
|
174
|
+
Tag a commit and push the tags with:
|
|
175
|
+
|
|
176
|
+
```sh
|
|
177
|
+
git tag <my-tag>
|
|
178
|
+
git push --tags
|
|
166
179
|
```
|
|
167
180
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
you might prefer to install it from conda-forge:
|
|
181
|
+
Trusted publishing must be enabled once in [PyPI Publishing](https://pypi.org/manage/account/publishing/).
|
|
182
|
+
Fill the following values in the form:
|
|
171
183
|
|
|
172
184
|
```
|
|
173
|
-
|
|
185
|
+
PyPI Project Name: simbio
|
|
186
|
+
Owner: maurosilber
|
|
187
|
+
Repository name: simbio
|
|
188
|
+
Workflow name: ci.yml
|
|
189
|
+
Environment name: pypi
|
|
174
190
|
```
|
|
191
|
+
|
|
192
|
+
[ci-badge]: https://img.shields.io/github/actions/workflow/status/dyscolab/simbio/ci.yml
|
|
193
|
+
[ci-url]: https://github.com/dyscolab/simbio/actions/workflows/ci.yml
|
|
194
|
+
[conda-forge-badge]: https://img.shields.io/conda/vn/conda-forge/simbio?logoColor=white&logo=conda-forge
|
|
195
|
+
[conda-forge-url]: https://prefix.dev/channels/conda-forge/packages/simbio
|
|
196
|
+
[copier-badge]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/copier-org/copier/master/img/badge/badge-black.json
|
|
197
|
+
[copier-url]: https://github.com/copier-org/copier
|
|
198
|
+
[license-badge]: https://img.shields.io/badge/license-MIT-blue
|
|
199
|
+
[pixi-badge]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/prefix-dev/pixi/main/assets/badge/v0.json
|
|
200
|
+
[pixi-url]: https://pixi.sh
|
|
201
|
+
[pypi-badge]: https://img.shields.io/pypi/v/simbio.svg?logo=pypi&logoColor=white
|
|
202
|
+
[pypi-url]: https://pypi.org/project/simbio
|
|
203
|
+
[pypi-version-badge]: https://img.shields.io/pypi/pyversions/simbio?logoColor=white&logo=python
|
|
204
|
+
[pypi-version-url]: https://pypi.org/project/simbio
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "simbio"
|
|
3
|
+
description = "A Python-based package for simulation of Chemical Reaction Networks (CRNs)."
|
|
4
|
+
version = "1.0.0b0"
|
|
5
|
+
authors = [
|
|
6
|
+
{ name = "Hernán E. Grecco", email = "hernan.grecco@gmail.com" },
|
|
7
|
+
{ name = "Mauro Silberberg", email = "maurosilber@gmail.com" },
|
|
8
|
+
]
|
|
9
|
+
readme = { file = "README.md", content-type = "text/markdown" }
|
|
10
|
+
license = "MIT"
|
|
11
|
+
classifiers = [
|
|
12
|
+
"Intended Audience :: Developers",
|
|
13
|
+
"Intended Audience :: Science/Research",
|
|
14
|
+
"Topic :: Scientific/Engineering",
|
|
15
|
+
"Topic :: Software Development :: Libraries",
|
|
16
|
+
"Programming Language :: Python :: 3",
|
|
17
|
+
"Operating System :: OS Independent",
|
|
18
|
+
]
|
|
19
|
+
keywords = [
|
|
20
|
+
"mass action",
|
|
21
|
+
"michaelis menten",
|
|
22
|
+
"ode",
|
|
23
|
+
"compartment",
|
|
24
|
+
"reaction",
|
|
25
|
+
"SBML",
|
|
26
|
+
"poincare",
|
|
27
|
+
]
|
|
28
|
+
requires-python = ">=3.12"
|
|
29
|
+
dependencies = ["poincare >= 1.0.0b2"]
|
|
30
|
+
|
|
31
|
+
[project.urls]
|
|
32
|
+
homepage = "https://github.com/dyscolab/simbio"
|
|
33
|
+
issues = "https://github.com/dyscolab/simbio/issues"
|
|
34
|
+
changelog = "https://github.com/dyscolab/simbio/blob/main/CHANGELOG.md"
|
|
35
|
+
documentation = "https://dyscolab.github.io/simbio"
|
|
36
|
+
|
|
37
|
+
[project.optional-dependencies]
|
|
38
|
+
io = ["biomodels", "python-libsbml"]
|
|
39
|
+
|
|
40
|
+
[build-system]
|
|
41
|
+
requires = ["uv_build>=0.9,<0.10"]
|
|
42
|
+
build-backend = "uv_build"
|
|
43
|
+
|
|
44
|
+
[tool.pytest.ini_options]
|
|
45
|
+
addopts = ["--import-mode=importlib"]
|
|
46
|
+
|
|
47
|
+
[tool.ruff.format]
|
|
48
|
+
docstring-code-format = true
|
|
49
|
+
|
|
50
|
+
[tool.ruff.lint]
|
|
51
|
+
extend-select = ["I"]
|
|
52
|
+
|
|
53
|
+
[tool.pyright]
|
|
54
|
+
typeCheckingMode = "standard"
|
|
55
|
+
venv = "test"
|
|
56
|
+
venvPath = ".pixi/envs/"
|
|
57
|
+
|
|
58
|
+
[tool.pyrefly]
|
|
59
|
+
python-interpreter-path = ".pixi/envs/default/bin/python"
|
|
60
|
+
project-excludes = [".pixi", "**/__pycache__"]
|
|
61
|
+
|
|
62
|
+
[tool.ty.environment]
|
|
63
|
+
python = ".pixi/envs/default"
|
|
64
|
+
|
|
65
|
+
[tool.pixi.workspace]
|
|
66
|
+
channels = ["https://prefix.dev/conda-forge"]
|
|
67
|
+
platforms = ["linux-64", "osx-arm64", "win-64"]
|
|
68
|
+
preview = ["pixi-build"]
|
|
69
|
+
|
|
70
|
+
[tool.pixi.package.build]
|
|
71
|
+
backend = { name = "pixi-build-python", version = "0.4.*" }
|
|
72
|
+
|
|
73
|
+
[tool.pixi.package.host-dependencies]
|
|
74
|
+
uv-build = "*"
|
|
75
|
+
|
|
76
|
+
[tool.pixi.package.run-dependencies]
|
|
77
|
+
# poincare = ">=1.0.0b2"
|
|
78
|
+
|
|
79
|
+
[tool.pixi.environments]
|
|
80
|
+
default = ["test", "py312"]
|
|
81
|
+
lint = { features = ["lint"], no-default-feature = true }
|
|
82
|
+
build = { features = ["build"], no-default-feature = true }
|
|
83
|
+
test-py312 = ["test", "io", "py312"]
|
|
84
|
+
test-py313 = ["test", "io", "py313"]
|
|
85
|
+
test-py314 = ["test", "io", "py314"]
|
|
86
|
+
|
|
87
|
+
[tool.pixi.dependencies]
|
|
88
|
+
simbio = { path = "." }
|
|
89
|
+
|
|
90
|
+
[tool.pixi.pypi-dependencies]
|
|
91
|
+
biomodels = "*"
|
|
92
|
+
python-libsbml = "*"
|
|
93
|
+
|
|
94
|
+
[tool.pixi.feature.lint.dependencies]
|
|
95
|
+
pre-commit = "*"
|
|
96
|
+
pre-commit-hooks = "*"
|
|
97
|
+
taplo = "*"
|
|
98
|
+
ruff = "*"
|
|
99
|
+
mdformat = "*"
|
|
100
|
+
mdformat-ruff = "*"
|
|
101
|
+
pyright = "*"
|
|
102
|
+
|
|
103
|
+
[tool.pixi.feature.lint.tasks]
|
|
104
|
+
pre-commit-install = "pre-commit install"
|
|
105
|
+
lint = "pre-commit run"
|
|
106
|
+
|
|
107
|
+
[tool.pixi.feature.build.dependencies]
|
|
108
|
+
uv = "*"
|
|
109
|
+
python = "*"
|
|
110
|
+
|
|
111
|
+
[tool.pixi.feature.build.pypi-dependencies]
|
|
112
|
+
mdremotifier = "*"
|
|
113
|
+
|
|
114
|
+
[tool.pixi.feature.build.tasks]
|
|
115
|
+
build = { cmd = "uv build", depends-on = ["remotify"] }
|
|
116
|
+
publish = "uv publish"
|
|
117
|
+
remotify = { cmd = [
|
|
118
|
+
"mdremotifier",
|
|
119
|
+
"-i",
|
|
120
|
+
"README.md",
|
|
121
|
+
"-o",
|
|
122
|
+
"README.md",
|
|
123
|
+
"--url-prefix",
|
|
124
|
+
"https://github.com/dyscolab/simbio/blob/main",
|
|
125
|
+
"--img-url-prefix",
|
|
126
|
+
"https://raw.githubusercontent.com/dyscolab/simbio/refs/heads/main/",
|
|
127
|
+
] }
|
|
128
|
+
|
|
129
|
+
[tool.pixi.feature.test.dependencies]
|
|
130
|
+
pytest = "*"
|
|
131
|
+
pooch = "*"
|
|
132
|
+
|
|
133
|
+
[tool.pixi.feature.test.tasks]
|
|
134
|
+
test = "pytest src/simbio/test_core.py src/simbio/reactions/test_reactions.py --doctest-modules"
|
|
135
|
+
|
|
136
|
+
[tool.pixi.feature]
|
|
137
|
+
py312.dependencies = { python = "3.12.*" }
|
|
138
|
+
py313.dependencies = { python = "3.13.*" }
|
|
139
|
+
py314.dependencies = { python = "3.14.*" }
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
from poincare import (
|
|
2
|
+
Constant,
|
|
3
|
+
Independent,
|
|
4
|
+
Variable,
|
|
5
|
+
Simulator,
|
|
6
|
+
Parameter,
|
|
7
|
+
assign,
|
|
8
|
+
initial,
|
|
9
|
+
)
|
|
10
|
+
from poincare.reactions import (
|
|
11
|
+
Reactant,
|
|
12
|
+
RateLaw,
|
|
13
|
+
MassAction,
|
|
14
|
+
reaction_initial,
|
|
15
|
+
AbsoluteRateLaw,
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
from .core import (
|
|
19
|
+
Compartment,
|
|
20
|
+
Species,
|
|
21
|
+
System,
|
|
22
|
+
reaction_amount,
|
|
23
|
+
reaction_concentration,
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
__all__ = [
|
|
27
|
+
"Constant",
|
|
28
|
+
"Independent",
|
|
29
|
+
"assign",
|
|
30
|
+
]
|
|
31
|
+
__all__ += [
|
|
32
|
+
"Compartment",
|
|
33
|
+
"System",
|
|
34
|
+
"Variable",
|
|
35
|
+
"Reactant",
|
|
36
|
+
"Species",
|
|
37
|
+
"Parameter",
|
|
38
|
+
"MassAction",
|
|
39
|
+
"RateLaw",
|
|
40
|
+
"AbsoluteRateLaw",
|
|
41
|
+
"initial",
|
|
42
|
+
"amount",
|
|
43
|
+
"concentration",
|
|
44
|
+
"reaction_initial",
|
|
45
|
+
"reaction_concentration",
|
|
46
|
+
"reaction_amount",
|
|
47
|
+
"Simulator",
|
|
48
|
+
]
|