process-bigraph 1.0.0__tar.gz → 1.0.4__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 (28) hide show
  1. {process_bigraph-1.0.0/process_bigraph.egg-info → process_bigraph-1.0.4}/PKG-INFO +1 -1
  2. process_bigraph-1.0.4/process_bigraph/types/__init__.py +2 -0
  3. process_bigraph-1.0.4/process_bigraph/types/process.py +76 -0
  4. {process_bigraph-1.0.0 → process_bigraph-1.0.4/process_bigraph.egg-info}/PKG-INFO +1 -1
  5. {process_bigraph-1.0.0 → process_bigraph-1.0.4}/process_bigraph.egg-info/SOURCES.txt +3 -1
  6. {process_bigraph-1.0.0 → process_bigraph-1.0.4}/pyproject.toml +2 -1
  7. {process_bigraph-1.0.0 → process_bigraph-1.0.4}/AUTHORS.md +0 -0
  8. {process_bigraph-1.0.0 → process_bigraph-1.0.4}/LICENSE +0 -0
  9. {process_bigraph-1.0.0 → process_bigraph-1.0.4}/README.md +0 -0
  10. {process_bigraph-1.0.0 → process_bigraph-1.0.4}/process_bigraph/__init__.py +0 -0
  11. {process_bigraph-1.0.0 → process_bigraph-1.0.4}/process_bigraph/composite.py +0 -0
  12. {process_bigraph-1.0.0 → process_bigraph-1.0.4}/process_bigraph/emitter.py +0 -0
  13. {process_bigraph-1.0.0 → process_bigraph-1.0.4}/process_bigraph/experiments/__init__.py +0 -0
  14. {process_bigraph-1.0.0 → process_bigraph-1.0.4}/process_bigraph/experiments/minimal_gillespie.py +0 -0
  15. {process_bigraph-1.0.0 → process_bigraph-1.0.4}/process_bigraph/processes/__init__.py +0 -0
  16. {process_bigraph-1.0.0 → process_bigraph-1.0.4}/process_bigraph/processes/examples.py +0 -0
  17. {process_bigraph-1.0.0 → process_bigraph-1.0.4}/process_bigraph/processes/growth_division.py +0 -0
  18. {process_bigraph-1.0.0 → process_bigraph-1.0.4}/process_bigraph/processes/parameter_scan.py +0 -0
  19. {process_bigraph-1.0.0 → process_bigraph-1.0.4}/process_bigraph/protocols/__init__.py +0 -0
  20. {process_bigraph-1.0.0 → process_bigraph-1.0.4}/process_bigraph/protocols/parallel.py +0 -0
  21. {process_bigraph-1.0.0 → process_bigraph-1.0.4}/process_bigraph/protocols/rest.py +0 -0
  22. {process_bigraph-1.0.0 → process_bigraph-1.0.4}/process_bigraph/protocols/socket.py +0 -0
  23. {process_bigraph-1.0.0 → process_bigraph-1.0.4}/process_bigraph/run.py +0 -0
  24. {process_bigraph-1.0.0 → process_bigraph-1.0.4}/process_bigraph/units.py +0 -0
  25. {process_bigraph-1.0.0 → process_bigraph-1.0.4}/process_bigraph.egg-info/dependency_links.txt +0 -0
  26. {process_bigraph-1.0.0 → process_bigraph-1.0.4}/process_bigraph.egg-info/requires.txt +0 -0
  27. {process_bigraph-1.0.0 → process_bigraph-1.0.4}/process_bigraph.egg-info/top_level.txt +0 -0
  28. {process_bigraph-1.0.0 → process_bigraph-1.0.4}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: process-bigraph
3
- Version: 1.0.0
3
+ Version: 1.0.4
4
4
  Summary: protocol and execution for compositional systems biology
5
5
  Requires-Python: >=3.11
6
6
  Description-Content-Type: text/markdown
@@ -0,0 +1,2 @@
1
+ from process_bigraph.types.process import ProcessLink, StepLink, CompositeLink, realize, default
2
+
@@ -0,0 +1,76 @@
1
+ import typing
2
+ from plum import dispatch
3
+ from dataclasses import dataclass, is_dataclass, field
4
+
5
+ from bigraph_schema.schema import Node, Empty, Float, Wires, Link, Schema
6
+ from bigraph_schema.methods import resolve, realize, realize_link, default, default_link
7
+
8
+
9
+ @dataclass(kw_only=True)
10
+ class StepLink(Link):
11
+ pass
12
+
13
+
14
+ def float_default(value):
15
+ def float_factory():
16
+ return Float(_default=value)
17
+ return float_factory
18
+
19
+
20
+ @dataclass(kw_only=True)
21
+ class ProcessLink(Link):
22
+ interval: Float = field(default_factory=float_default(1.0))
23
+
24
+
25
+ @dataclass(kw_only=True)
26
+ class Bridge(Node):
27
+ inputs: Wires = field(default_factory=Wires)
28
+ outputs: Wires = field(default_factory=Wires)
29
+
30
+
31
+ @dataclass(kw_only=True)
32
+ class Interface(Node):
33
+ inputs: Schema = field(default_factory=Schema)
34
+ outputs: Schema = field(default_factory=Schema)
35
+
36
+
37
+ @dataclass(kw_only=True)
38
+ class CompositeLink(ProcessLink):
39
+ schema: Schema = field(default_factory=Schema)
40
+ state: Node = field(default_factory=Node)
41
+ interface: Interface = field(default_factory=Interface)
42
+ bridge: Bridge = field(default_factory=Bridge)
43
+
44
+
45
+ @default.dispatch
46
+ def default(schema: ProcessLink):
47
+ link = default_link(schema)
48
+
49
+ link['interval'] = default(
50
+ schema.interval)
51
+
52
+ return link
53
+
54
+
55
+ @realize.dispatch
56
+ def realize(core, schema: ProcessLink, state, path=()):
57
+ link_schema, link_state, merges = realize_link(core, schema, state, path=path)
58
+
59
+ _, link_state['interval'], _ = realize(
60
+ core,
61
+ link_schema.interval,
62
+ state.get('interval'),
63
+ path+('interval',))
64
+
65
+ return link_schema, link_state, merges
66
+
67
+
68
+ def register_types(core):
69
+ core.register_types({
70
+ 'step': StepLink,
71
+ 'process': ProcessLink,
72
+ 'interface': Interface,
73
+ 'bridge': Bridge,
74
+ 'composite': CompositeLink})
75
+
76
+ return core
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: process-bigraph
3
- Version: 1.0.0
3
+ Version: 1.0.4
4
4
  Summary: protocol and execution for compositional systems biology
5
5
  Requires-Python: >=3.11
6
6
  Description-Content-Type: text/markdown
@@ -21,4 +21,6 @@ process_bigraph/processes/parameter_scan.py
21
21
  process_bigraph/protocols/__init__.py
22
22
  process_bigraph/protocols/parallel.py
23
23
  process_bigraph/protocols/rest.py
24
- process_bigraph/protocols/socket.py
24
+ process_bigraph/protocols/socket.py
25
+ process_bigraph/types/__init__.py
26
+ process_bigraph/types/process.py
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "process-bigraph"
3
- version = "1.0.0"
3
+ version = "1.0.4"
4
4
  description = "protocol and execution for compositional systems biology"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"
@@ -17,6 +17,7 @@ packages = [
17
17
  "process_bigraph.processes",
18
18
  "process_bigraph.protocols",
19
19
  "process_bigraph.experiments",
20
+ "process_bigraph.types",
20
21
  ]
21
22
 
22
23
  # [tool.uv.sources]
File without changes