SimBio 1.0.1__tar.gz → 1.1.0__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.
Files changed (29) hide show
  1. {simbio-1.0.1 → simbio-1.1.0}/PKG-INFO +2 -2
  2. {simbio-1.0.1 → simbio-1.1.0}/pyproject.toml +3 -2
  3. {simbio-1.0.1 → simbio-1.1.0}/src/simbio/__init__.py +2 -0
  4. simbio-1.1.0/src/simbio/reactions/test_reactions.py +46 -0
  5. simbio-1.1.0/src/simbio/rebop/__init__.py +3 -0
  6. simbio-1.0.1/src/simbio/reactions/test_reactions.py +0 -22
  7. {simbio-1.0.1 → simbio-1.1.0}/README.md +0 -0
  8. {simbio-1.0.1 → simbio-1.1.0}/src/simbio/core.py +0 -0
  9. {simbio-1.0.1 → simbio-1.1.0}/src/simbio/io/__init__.py +0 -0
  10. {simbio-1.0.1 → simbio-1.1.0}/src/simbio/io/biomodels.py +0 -0
  11. {simbio-1.0.1 → simbio-1.1.0}/src/simbio/io/graph/networkx.py +0 -0
  12. {simbio-1.0.1 → simbio-1.1.0}/src/simbio/io/mathML/__init__.py +0 -0
  13. {simbio-1.0.1 → simbio-1.1.0}/src/simbio/io/mathML/exporter.py +0 -0
  14. {simbio-1.0.1 → simbio-1.1.0}/src/simbio/io/mathML/importer.py +0 -0
  15. {simbio-1.0.1 → simbio-1.1.0}/src/simbio/io/mathML/symbol.py +0 -0
  16. {simbio-1.0.1 → simbio-1.1.0}/src/simbio/io/mathML/test_mathML.py +0 -0
  17. {simbio-1.0.1 → simbio-1.1.0}/src/simbio/io/mathML/to_symbolite.py +0 -0
  18. {simbio-1.0.1 → simbio-1.1.0}/src/simbio/io/sbml/__init__.py +0 -0
  19. {simbio-1.0.1 → simbio-1.1.0}/src/simbio/io/sbml/from_libsbml.py +0 -0
  20. {simbio-1.0.1 → simbio-1.1.0}/src/simbio/io/sbml/importer.py +0 -0
  21. {simbio-1.0.1 → simbio-1.1.0}/src/simbio/io/sbml/test_importer.py +0 -0
  22. {simbio-1.0.1 → simbio-1.1.0}/src/simbio/io/sbml/tests/atol_factor.csv +0 -0
  23. {simbio-1.0.1 → simbio-1.1.0}/src/simbio/io/sbml/tests/test_sbml_test_suite.py +0 -0
  24. {simbio-1.0.1 → simbio-1.1.0}/src/simbio/io/sbml/types.py +0 -0
  25. {simbio-1.0.1 → simbio-1.1.0}/src/simbio/reactions/__init__.py +0 -0
  26. {simbio-1.0.1 → simbio-1.1.0}/src/simbio/reactions/compound.py +0 -0
  27. {simbio-1.0.1 → simbio-1.1.0}/src/simbio/reactions/enzymatic.py +0 -0
  28. {simbio-1.0.1 → simbio-1.1.0}/src/simbio/reactions/single.py +0 -0
  29. {simbio-1.0.1 → simbio-1.1.0}/src/simbio/test_core.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: simbio
3
- Version: 1.0.1
3
+ Version: 1.1.0
4
4
  Summary: A Python-based package for simulation of Chemical Reaction Networks (CRNs).
5
5
  Keywords: mass action,michaelis menten,ode,compartment,reaction,SBML,poincare
6
6
  Author: Hernán E. Grecco, Mauro Silberberg
@@ -12,7 +12,7 @@ Classifier: Topic :: Scientific/Engineering
12
12
  Classifier: Topic :: Software Development :: Libraries
13
13
  Classifier: Programming Language :: Python :: 3
14
14
  Classifier: Operating System :: OS Independent
15
- Requires-Dist: poincare>=1.0.0
15
+ Requires-Dist: poincare>=1.1.0
16
16
  Requires-Dist: biomodels ; extra == 'io'
17
17
  Requires-Dist: python-libsbml ; extra == 'io'
18
18
  Requires-Python: >=3.12
@@ -1,7 +1,7 @@
1
1
  [project]
2
2
  name = "simbio"
3
3
  description = "A Python-based package for simulation of Chemical Reaction Networks (CRNs)."
4
- version = "1.0.1"
4
+ version = "1.1.0"
5
5
  authors = [
6
6
  { name = "Hernán E. Grecco", email = "hernan.grecco@gmail.com" },
7
7
  { name = "Mauro Silberberg", email = "maurosilber@gmail.com" },
@@ -26,7 +26,7 @@ keywords = [
26
26
  "poincare",
27
27
  ]
28
28
  requires-python = ">=3.12"
29
- dependencies = ["poincare >= 1.0.0"]
29
+ dependencies = ["poincare >= 1.1.0"]
30
30
 
31
31
  [project.urls]
32
32
  homepage = "https://github.com/dyscolab/simbio"
@@ -69,6 +69,7 @@ preview = ["pixi-build"]
69
69
 
70
70
  [tool.pixi.package.build]
71
71
  backend = { name = "pixi-build-python", version = "0.4.*" }
72
+ # config = { ignore-pypi-mapping = false } # Enable automatic PyPI-to-conda mapping
72
73
 
73
74
  [tool.pixi.package.host-dependencies]
74
75
  uv-build = "*"
@@ -6,6 +6,7 @@ from poincare import (
6
6
  Variable,
7
7
  assign,
8
8
  initial,
9
+ model_report,
9
10
  )
10
11
  from poincare.reactions import (
11
12
  AbsoluteRateLaw,
@@ -51,4 +52,5 @@ __all__ += [
51
52
  "reaction_concentration",
52
53
  "reaction_amount",
53
54
  "volume",
55
+ "model_report",
54
56
  ]
@@ -0,0 +1,46 @@
1
+ import numpy as np
2
+ from pytest import mark
3
+
4
+ from .. import Simulator, System, Variable, initial, MassAction
5
+ from ..reactions import compound, enzymatic, single
6
+ from ..reactions.single import Synthesis
7
+
8
+ reactions = []
9
+ for mod in (single, compound, enzymatic):
10
+ for name in dir(mod):
11
+ value = getattr(mod, name)
12
+ if isinstance(value, type(System)) and value != System:
13
+ reactions.append(value)
14
+
15
+
16
+ @mark.parametrize("reaction", reactions)
17
+ def test_reactions(reaction):
18
+ model = reaction(**dict.fromkeys(reaction._required, 1))
19
+ sim = Simulator(model)
20
+ sim.solve(save_at=np.linspace(0, 1, 10))
21
+
22
+
23
+ def test_external_stoichiometry_in_reaction():
24
+ class Model1(System):
25
+ A: Variable = initial(default=10)
26
+ B: Variable = initial(default=5)
27
+ AB: Variable = initial(default=5)
28
+
29
+ r = Synthesis(A=10 * A, B=B, AB=AB, rate=2)
30
+
31
+ class Model2(System):
32
+ A: Variable = initial(default=10)
33
+ B: Variable = initial(default=5)
34
+ AB: Variable = initial(default=5)
35
+
36
+ r = MassAction(reactants=[10 * A, B], products=[AB], rate=2)
37
+
38
+ assert Model1.r.reaction.reactants[0].stoichiometry == 10
39
+
40
+ sim1 = Simulator(Model1)
41
+ result1 = np.asarray(sim1.solve(save_at=np.linspace(0, 10, 10)).to_array())
42
+
43
+ sim2 = Simulator(Model2)
44
+ result2 = np.asarray(sim2.solve(save_at=np.linspace(0, 10, 10)).to_array())
45
+
46
+ assert np.all(result1 == result2)
@@ -0,0 +1,3 @@
1
+ from poincare.reactions.rebop import RebopSimulator
2
+
3
+ __all__ = ["RebopSimulator"]
@@ -1,22 +0,0 @@
1
- import numpy as np
2
- from pytest import mark
3
-
4
- from .. import (
5
- Simulator,
6
- System,
7
- )
8
- from ..reactions import compound, enzymatic, single
9
-
10
- reactions = []
11
- for mod in (single, compound, enzymatic):
12
- for name in dir(mod):
13
- value = getattr(mod, name)
14
- if isinstance(value, type(System)) and value != System:
15
- reactions.append(value)
16
-
17
-
18
- @mark.parametrize("reaction", reactions)
19
- def test_reactions(reaction):
20
- model = reaction(**dict.fromkeys(reaction._required, 1))
21
- sim = Simulator(model)
22
- sim.solve(save_at=np.linspace(0, 1, 10))
File without changes
File without changes
File without changes
File without changes