bigraph-schema 0.0.29__tar.gz → 0.0.31__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.
Potentially problematic release.
This version of bigraph-schema might be problematic. Click here for more details.
- {bigraph-schema-0.0.29/bigraph_schema.egg-info → bigraph-schema-0.0.31}/PKG-INFO +4 -10
- {bigraph-schema-0.0.29 → bigraph-schema-0.0.31}/README.md +2 -2
- {bigraph-schema-0.0.29 → bigraph-schema-0.0.31}/bigraph_schema/__init__.py +1 -1
- {bigraph-schema-0.0.29 → bigraph-schema-0.0.31}/bigraph_schema/protocols.py +8 -3
- bigraph-schema-0.0.31/bigraph_schema/react.py +50 -0
- {bigraph-schema-0.0.29 → bigraph-schema-0.0.31}/bigraph_schema/registry.py +561 -169
- {bigraph-schema-0.0.29 → bigraph-schema-0.0.31}/bigraph_schema/type_system.py +1182 -473
- {bigraph-schema-0.0.29 → bigraph-schema-0.0.31/bigraph_schema.egg-info}/PKG-INFO +4 -10
- {bigraph-schema-0.0.29 → bigraph-schema-0.0.31}/bigraph_schema.egg-info/SOURCES.txt +0 -1
- {bigraph-schema-0.0.29 → bigraph-schema-0.0.31}/bigraph_schema.egg-info/requires.txt +1 -0
- {bigraph-schema-0.0.29 → bigraph-schema-0.0.31}/setup.py +3 -5
- bigraph-schema-0.0.29/bigraph_schema/react.py +0 -32
- bigraph-schema-0.0.29/bigraph_schema/test.py +0 -94
- {bigraph-schema-0.0.29 → bigraph-schema-0.0.31}/AUTHORS.md +0 -0
- {bigraph-schema-0.0.29 → bigraph-schema-0.0.31}/LICENSE +0 -0
- {bigraph-schema-0.0.29 → bigraph-schema-0.0.31}/bigraph_schema/parse.py +0 -0
- {bigraph-schema-0.0.29 → bigraph-schema-0.0.31}/bigraph_schema/units.py +0 -0
- {bigraph-schema-0.0.29 → bigraph-schema-0.0.31}/bigraph_schema.egg-info/dependency_links.txt +0 -0
- {bigraph-schema-0.0.29 → bigraph-schema-0.0.31}/bigraph_schema.egg-info/top_level.txt +0 -0
- {bigraph-schema-0.0.29 → bigraph-schema-0.0.31}/setup.cfg +0 -0
|
@@ -1,25 +1,21 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: bigraph-schema
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.31
|
|
4
4
|
Summary: A serializable type schema for compositional systems biology
|
|
5
5
|
Home-page: https://github.com/vivarium-collective/bigraph-schema
|
|
6
6
|
Author: Eran Agmon, Ryan Spangler
|
|
7
7
|
Author-email: agmon.eran@gmail.com, ryan.spangler@gmail.com
|
|
8
|
-
License: UNKNOWN
|
|
9
|
-
Platform: UNKNOWN
|
|
10
8
|
Classifier: Development Status :: 3 - Alpha
|
|
11
9
|
Classifier: Intended Audience :: Developers
|
|
12
10
|
Classifier: License :: OSI Approved :: MIT License
|
|
13
11
|
Classifier: Operating System :: OS Independent
|
|
14
12
|
Classifier: Programming Language :: Python
|
|
15
|
-
Classifier: Programming Language :: Python :: 3
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.6
|
|
17
13
|
Classifier: Programming Language :: Python :: 3.7
|
|
18
14
|
Classifier: Programming Language :: Python :: 3.8
|
|
19
15
|
Classifier: Programming Language :: Python :: 3.9
|
|
20
16
|
Classifier: Programming Language :: Python :: 3.10
|
|
21
17
|
Classifier: Programming Language :: Python :: 3.11
|
|
22
|
-
Requires-Python: >=3.
|
|
18
|
+
Requires-Python: >=3.7
|
|
23
19
|
Description-Content-Type: text/markdown
|
|
24
20
|
License-File: LICENSE
|
|
25
21
|
License-File: AUTHORS.md
|
|
@@ -49,12 +45,10 @@ pip install bigraph-schema
|
|
|
49
45
|
|
|
50
46
|
To get started with bigraph-schema, check out our resources:
|
|
51
47
|
|
|
52
|
-
* [
|
|
53
|
-
* [Bigraph Schema Basics Tutorial](https://vivarium-collective.github.io/bigraph-viz/notebooks/basics.html): A
|
|
48
|
+
* [Type System Overview](https://vivarium-collective.github.io/bigraph-schema/notebooks/core.html): A tutorial demonstrating the functionality of bigraph-schema's type system, "core".
|
|
49
|
+
* [Bigraph Schema Basics Tutorial](https://vivarium-collective.github.io/bigraph-viz/notebooks/basics.html): A tutorial covering the essential aspects of the bigraph-schema library.
|
|
54
50
|
This resource will guide you through the core concepts and methods, helping you to master the basic operations.
|
|
55
51
|
|
|
56
52
|
## License
|
|
57
53
|
|
|
58
54
|
Bigraph-schema is open-source software released under the [Apache 2 License](https://github.com/vivarium-collective/bigraph-schema/blob/main/LICENSE).
|
|
59
|
-
|
|
60
|
-
|
|
@@ -23,8 +23,8 @@ pip install bigraph-schema
|
|
|
23
23
|
|
|
24
24
|
To get started with bigraph-schema, check out our resources:
|
|
25
25
|
|
|
26
|
-
* [
|
|
27
|
-
* [Bigraph Schema Basics Tutorial](https://vivarium-collective.github.io/bigraph-viz/notebooks/basics.html): A
|
|
26
|
+
* [Type System Overview](https://vivarium-collective.github.io/bigraph-schema/notebooks/core.html): A tutorial demonstrating the functionality of bigraph-schema's type system, "core".
|
|
27
|
+
* [Bigraph Schema Basics Tutorial](https://vivarium-collective.github.io/bigraph-viz/notebooks/basics.html): A tutorial covering the essential aspects of the bigraph-schema library.
|
|
28
28
|
This resource will guide you through the core concepts and methods, helping you to master the basic operations.
|
|
29
29
|
|
|
30
30
|
## License
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
from bigraph_schema.type_system import TypeSystem, Edge
|
|
2
|
-
from bigraph_schema.registry import get_path, establish_path, set_path, deep_merge
|
|
2
|
+
from bigraph_schema.registry import get_path, establish_path, set_path, transform_path, deep_merge, validate_merge
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"""
|
|
2
|
-
|
|
3
|
-
Protocols
|
|
4
|
-
|
|
2
|
+
=========
|
|
3
|
+
Protocols
|
|
4
|
+
=========
|
|
5
|
+
|
|
6
|
+
This module contains the protocols for retrieving processes from address.
|
|
5
7
|
"""
|
|
6
8
|
|
|
7
9
|
import sys
|
|
@@ -10,6 +12,9 @@ import importlib
|
|
|
10
12
|
|
|
11
13
|
|
|
12
14
|
def function_module(function):
|
|
15
|
+
"""
|
|
16
|
+
Retrieves the fully qualified name of a given function.
|
|
17
|
+
"""
|
|
13
18
|
module = inspect.getmodule(function)
|
|
14
19
|
|
|
15
20
|
return f'{module.__name__}.{function.__name__}'
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"""
|
|
2
|
+
=====
|
|
3
|
+
React
|
|
4
|
+
=====
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def react_divide_counts(config):
|
|
9
|
+
"""
|
|
10
|
+
Divides counts among daughters based on their ratios in a reaction configuration.
|
|
11
|
+
|
|
12
|
+
This function constructs a reaction configuration to divide counts among daughter entities based on specified
|
|
13
|
+
ratios. If no ratio is specified for a daughter, the counts are divided evenly. The configuration includes the
|
|
14
|
+
setup for input ('redex'), output ('reactum'), and the division operation ('calls').
|
|
15
|
+
|
|
16
|
+
Args:
|
|
17
|
+
- config (dict): Configuration dict with keys 'id' (string), 'state_key' (string), 'daughters' (list of dicts).
|
|
18
|
+
Each daughter dict may include 'id' (string) and optionally 'ratio' (float).
|
|
19
|
+
|
|
20
|
+
Returns:
|
|
21
|
+
- dict: A dictionary with keys 'redex', 'reactum', and 'calls', detailing the reaction setup.
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
redex = {
|
|
25
|
+
config['id']: {
|
|
26
|
+
config['state_key']: '@counts'}}
|
|
27
|
+
|
|
28
|
+
bindings = [
|
|
29
|
+
f'{daughter["id"]}_counts'
|
|
30
|
+
for daughter in config['daughters']]
|
|
31
|
+
|
|
32
|
+
reactum = {
|
|
33
|
+
daughter['id']: {
|
|
34
|
+
config['state_key']: binding}
|
|
35
|
+
for binding, daughter in zip(bindings, config['daughters'])}
|
|
36
|
+
|
|
37
|
+
even = 1.0 / len(config['daughters'])
|
|
38
|
+
ratios = [
|
|
39
|
+
daughter.get('ratio', even)
|
|
40
|
+
for daughter in config['daughters']]
|
|
41
|
+
|
|
42
|
+
calls = [{
|
|
43
|
+
'function': 'divide_counts',
|
|
44
|
+
'arguments': ['@counts', ratios],
|
|
45
|
+
'bindings': bindings}]
|
|
46
|
+
|
|
47
|
+
return {
|
|
48
|
+
'redex': redex,
|
|
49
|
+
'reactum': reactum,
|
|
50
|
+
'calls': calls}
|