process-bigraph 0.0.24__tar.gz → 0.0.26__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 (21) hide show
  1. {process-bigraph-0.0.24/process_bigraph.egg-info → process-bigraph-0.0.26}/PKG-INFO +1 -1
  2. {process-bigraph-0.0.24 → process-bigraph-0.0.26}/process_bigraph/composite.py +31 -19
  3. {process-bigraph-0.0.24 → process-bigraph-0.0.26}/process_bigraph/process_types.py +5 -3
  4. {process-bigraph-0.0.24 → process-bigraph-0.0.26}/process_bigraph/tests.py +2 -0
  5. {process-bigraph-0.0.24 → process-bigraph-0.0.26/process_bigraph.egg-info}/PKG-INFO +1 -1
  6. {process-bigraph-0.0.24 → process-bigraph-0.0.26}/setup.py +1 -1
  7. {process-bigraph-0.0.24 → process-bigraph-0.0.26}/AUTHORS.md +0 -0
  8. {process-bigraph-0.0.24 → process-bigraph-0.0.26}/LICENSE +0 -0
  9. {process-bigraph-0.0.24 → process-bigraph-0.0.26}/README.md +0 -0
  10. {process-bigraph-0.0.24 → process-bigraph-0.0.26}/process_bigraph/__init__.py +0 -0
  11. {process-bigraph-0.0.24 → process-bigraph-0.0.26}/process_bigraph/experiments/__init__.py +0 -0
  12. {process-bigraph-0.0.24 → process-bigraph-0.0.26}/process_bigraph/experiments/minimal_gillespie.py +0 -0
  13. {process-bigraph-0.0.24 → process-bigraph-0.0.26}/process_bigraph/processes/__init__.py +0 -0
  14. {process-bigraph-0.0.24 → process-bigraph-0.0.26}/process_bigraph/processes/growth_division.py +0 -0
  15. {process-bigraph-0.0.24 → process-bigraph-0.0.26}/process_bigraph/processes/parameter_scan.py +0 -0
  16. {process-bigraph-0.0.24 → process-bigraph-0.0.26}/process_bigraph/protocols.py +0 -0
  17. {process-bigraph-0.0.24 → process-bigraph-0.0.26}/process_bigraph.egg-info/SOURCES.txt +0 -0
  18. {process-bigraph-0.0.24 → process-bigraph-0.0.26}/process_bigraph.egg-info/dependency_links.txt +0 -0
  19. {process-bigraph-0.0.24 → process-bigraph-0.0.26}/process_bigraph.egg-info/requires.txt +0 -0
  20. {process-bigraph-0.0.24 → process-bigraph-0.0.26}/process_bigraph.egg-info/top_level.txt +0 -0
  21. {process-bigraph-0.0.24 → process-bigraph-0.0.26}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: process-bigraph
3
- Version: 0.0.24
3
+ Version: 0.0.26
4
4
  Summary: UNKNOWN
5
5
  Home-page: https://github.com/vivarium-collective/process-bigraph
6
6
  Author: Ryan Spangler, Eran Agmon
@@ -336,7 +336,7 @@ def deserialize_process(schema, encoded, core):
336
336
  if not encoded:
337
337
  deserialized = core.default(schema)
338
338
  else:
339
- deserialized = encoded.copy()
339
+ deserialized = encoded
340
340
 
341
341
  if not deserialized.get('address'):
342
342
  return deserialized
@@ -377,8 +377,10 @@ def deserialize_process(schema, encoded, core):
377
377
 
378
378
  deserialized['config'] = config
379
379
  deserialized['interval'] = interval
380
- deserialized['_inputs'] = deserialized['instance'].inputs()
381
- deserialized['_outputs'] = deserialized['instance'].outputs()
380
+ deserialized['_inputs'] = copy.deepcopy(
381
+ deserialized['instance'].inputs())
382
+ deserialized['_outputs'] = copy.deepcopy(
383
+ deserialized['instance'].outputs())
382
384
 
383
385
  return deserialized
384
386
 
@@ -387,7 +389,7 @@ def deserialize_step(schema, encoded, core):
387
389
  if not encoded:
388
390
  deserialized = core.default(schema)
389
391
  else:
390
- deserialized = encoded.copy()
392
+ deserialized = copy.deepcopy(encoded)
391
393
 
392
394
  if not deserialized['address']:
393
395
  return deserialized
@@ -414,8 +416,10 @@ def deserialize_step(schema, encoded, core):
414
416
  deserialized['instance'] = process
415
417
 
416
418
  deserialized['config'] = config
417
- deserialized['_inputs'] = deserialized['instance'].inputs()
418
- deserialized['_outputs'] = deserialized['instance'].outputs()
419
+ deserialized['_inputs'] = copy.deepcopy(
420
+ deserialized['instance'].inputs())
421
+ deserialized['_outputs'] = copy.deepcopy(
422
+ deserialized['instance'].outputs())
419
423
 
420
424
  return deserialized
421
425
 
@@ -484,7 +488,7 @@ class ProcessTypes(TypeSystem):
484
488
  self.process_registry = Registry()
485
489
  self.protocol_registry = Registry()
486
490
 
487
- self.register_types(PROCESS_TYPES)
491
+ self.update_types(PROCESS_TYPES)
488
492
  self.register_protocols(BASE_PROTOCOLS)
489
493
  self.register_processes(BASE_EMITTERS)
490
494
 
@@ -526,8 +530,8 @@ class ProcessTypes(TypeSystem):
526
530
  if not initial_state:
527
531
  return initial_state
528
532
 
529
- input_ports = get_path(schema, path + ('_inputs',))
530
- output_ports = get_path(schema, path + ('_outputs',))
533
+ input_ports = copy.deepcopy(get_path(schema, path + ('_inputs',)))
534
+ output_ports = copy.deepcopy(get_path(schema, path + ('_outputs',)))
531
535
  ports = {
532
536
  '_inputs': input_ports,
533
537
  '_outputs': output_ports}
@@ -784,8 +788,9 @@ class Composite(Process):
784
788
  # self.state)
785
789
 
786
790
  self.process_schema = {}
791
+
787
792
  for port in ['inputs', 'outputs']:
788
- self.process_schema[port], defaults = self.core.infer_edge(
793
+ self.process_schema[port] = self.core.wire_schema(
789
794
  self.composition,
790
795
  self.bridge[port])
791
796
 
@@ -797,8 +802,19 @@ class Composite(Process):
797
802
  self.add_emitter(
798
803
  emitter_config)
799
804
 
800
- self.step_triggers = {}
805
+ self.front: Dict = {
806
+ path: empty_front(self.state['global_time'])
807
+ for path in self.process_paths}
801
808
 
809
+ self.bridge_updates = []
810
+
811
+ # build the step network
812
+ self.build_step_network()
813
+
814
+ # self.run_steps(self.to_run)
815
+
816
+ def build_step_network(self):
817
+ self.step_triggers = {}
802
818
  for step_path, step in self.step_paths.items():
803
819
  step_triggers = find_step_triggers(
804
820
  step_path, step)
@@ -808,12 +824,6 @@ class Composite(Process):
808
824
 
809
825
  self.steps_run = set([])
810
826
 
811
- self.front: Dict = {
812
- path: empty_front(self.state['global_time'])
813
- for path in self.process_paths}
814
-
815
- self.bridge_updates = []
816
-
817
827
  self.step_dependencies, self.node_dependencies = build_step_network(
818
828
  self.step_paths)
819
829
 
@@ -822,8 +832,6 @@ class Composite(Process):
822
832
 
823
833
  self.to_run = self.cycle_step_state()
824
834
 
825
- # self.run_steps(self.to_run)
826
-
827
835
  def serialize_state(self):
828
836
  return self.core.serialize(
829
837
  self.composition,
@@ -864,6 +872,10 @@ class Composite(Process):
864
872
  print(f"Created new file: {filename}")
865
873
 
866
874
 
875
+ def __repr__(self):
876
+ return self.core.representation(self.composition)
877
+
878
+
867
879
  def reset_step_state(self, step_paths):
868
880
  self.trigger_state = build_trigger_state(
869
881
  self.node_dependencies)
@@ -98,7 +98,7 @@ def deserialize_process(schema, encoded, core):
98
98
  if not encoded:
99
99
  deserialized = core.default(schema)
100
100
  else:
101
- deserialized = encoded.copy()
101
+ deserialized = encoded
102
102
 
103
103
  if not deserialized.get('address'):
104
104
  return deserialized
@@ -139,8 +139,10 @@ def deserialize_process(schema, encoded, core):
139
139
 
140
140
  deserialized['config'] = config
141
141
  deserialized['interval'] = interval
142
- deserialized['_inputs'] = deserialized['instance'].inputs()
143
- deserialized['_outputs'] = deserialized['instance'].outputs()
142
+ deserialized['_inputs'] = copy.deepcopy(
143
+ deserialized['instance'].inputs())
144
+ deserialized['_outputs'] = copy.deepcopy(
145
+ deserialized['instance'].outputs())
144
146
 
145
147
  return deserialized
146
148
 
@@ -577,6 +577,8 @@ def test_grow_divide(core):
577
577
  'environment': ['environment']}}},
578
578
  core=core)
579
579
 
580
+ print(str(composite))
581
+
580
582
  updates = composite.update({
581
583
  'environment': {
582
584
  '0': {
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: process-bigraph
3
- Version: 0.0.24
3
+ Version: 0.0.26
4
4
  Summary: UNKNOWN
5
5
  Home-page: https://github.com/vivarium-collective/process-bigraph
6
6
  Author: Ryan Spangler, Eran Agmon
@@ -2,7 +2,7 @@ import re
2
2
  from setuptools import setup, find_packages
3
3
 
4
4
 
5
- VERSION = '0.0.24'
5
+ VERSION = '0.0.26'
6
6
 
7
7
 
8
8
  with open("README.md", "r") as readme: