bigraph-schema 0.0.53__tar.gz → 0.0.54__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 (35) hide show
  1. {bigraph-schema-0.0.53/bigraph_schema.egg-info → bigraph-schema-0.0.54}/PKG-INFO +1 -1
  2. {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/bigraph_schema/type_functions.py +14 -1
  3. {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/bigraph_schema/type_system.py +10 -7
  4. {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/bigraph_schema/utilities.py +1 -0
  5. {bigraph-schema-0.0.53 → bigraph-schema-0.0.54/bigraph_schema.egg-info}/PKG-INFO +1 -1
  6. {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/setup.py +1 -1
  7. {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/.github/workflows/notebook_to_html.yml +0 -0
  8. {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/.github/workflows/pytest.yml +0 -0
  9. {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/.gitignore +0 -0
  10. {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/AUTHORS.md +0 -0
  11. {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/CLA.md +0 -0
  12. {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/CODE_OF_CONDUCT.md +0 -0
  13. {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/CONTRIBUTING.md +0 -0
  14. {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/LICENSE +0 -0
  15. {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/README.md +0 -0
  16. {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/bigraph_schema/__init__.py +0 -0
  17. {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/bigraph_schema/edge.py +0 -0
  18. {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/bigraph_schema/parse.py +0 -0
  19. {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/bigraph_schema/protocols.py +0 -0
  20. {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/bigraph_schema/registry.py +0 -0
  21. {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/bigraph_schema/type_system_tests.py +0 -0
  22. {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/bigraph_schema/units.py +0 -0
  23. {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/bigraph_schema.egg-info/SOURCES.txt +0 -0
  24. {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/bigraph_schema.egg-info/dependency_links.txt +0 -0
  25. {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/bigraph_schema.egg-info/requires.txt +0 -0
  26. {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/bigraph_schema.egg-info/top_level.txt +0 -0
  27. {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/notebooks/core.ipynb +0 -0
  28. {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/notebooks/demo.ipynb +0 -0
  29. {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/notebooks/images/place-link.png +0 -0
  30. {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/notebooks/images/reaction-after.png +0 -0
  31. {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/notebooks/images/reaction-before.png +0 -0
  32. {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/notebooks/images/redex-reactum.png +0 -0
  33. {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/pytest.ini +0 -0
  34. {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/release.sh +0 -0
  35. {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: bigraph-schema
3
- Version: 0.0.53
3
+ Version: 0.0.54
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
@@ -1632,6 +1632,18 @@ def bind_enum(schema, state, key, subschema, substate, core):
1632
1632
  # Each function handles a specific type of schema and ensures that updates are resolved correctly.
1633
1633
  # Function signature: (schema, update, core)
1634
1634
 
1635
+ def resolve_maybe(schema, update, core):
1636
+ value_schema = core.find_parameter(
1637
+ schema,
1638
+ 'value')
1639
+
1640
+ inner_value = core.resolve_schemas(
1641
+ value_schema,
1642
+ update)
1643
+
1644
+ schema['_value'] = inner_value
1645
+
1646
+
1635
1647
  def resolve_map(schema, update, core):
1636
1648
  if isinstance(update, dict):
1637
1649
  value_schema = update.get(
@@ -2597,13 +2609,14 @@ base_types = {
2597
2609
 
2598
2610
  'maybe': {
2599
2611
  '_type': 'maybe',
2600
- '_default': NONE_SYMBOL,
2612
+ '_default': None,
2601
2613
  '_apply': apply_maybe,
2602
2614
  '_check': check_maybe,
2603
2615
  '_slice': slice_maybe,
2604
2616
  '_serialize': serialize_maybe,
2605
2617
  '_deserialize': deserialize_maybe,
2606
2618
  '_dataclass': dataclass_maybe,
2619
+ '_resolve': resolve_maybe,
2607
2620
  '_fold': fold_maybe,
2608
2621
  '_type_parameters': ['value'],
2609
2622
  '_description': 'type to represent values that could be empty'},
@@ -1386,13 +1386,16 @@ class TypeSystem(Registry):
1386
1386
  state,
1387
1387
  head)
1388
1388
 
1389
- result_schema, result_state = self.set_slice(
1390
- down_schema,
1391
- down_state,
1392
- tail,
1393
- target_schema,
1394
- target_state,
1395
- defer=defer)
1389
+ try:
1390
+ result_schema, result_state = self.set_slice(
1391
+ down_schema,
1392
+ down_state,
1393
+ tail,
1394
+ target_schema,
1395
+ target_state,
1396
+ defer=defer)
1397
+ except Exception as e:
1398
+ raise Exception(f'failed to set_slice at path {path}\n{str(e)}')
1396
1399
 
1397
1400
  return self.bind(
1398
1401
  schema,
@@ -146,6 +146,7 @@ def lookup_dtype(data_name):
146
146
 
147
147
 
148
148
  def read_datatype(data_schema):
149
+ print(f'reading datatype from {data_schema}')
149
150
  return lookup_dtype(
150
151
  data_schema['_type'])
151
152
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: bigraph-schema
3
- Version: 0.0.53
3
+ Version: 0.0.54
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
@@ -1,7 +1,7 @@
1
1
  from setuptools import setup, find_packages
2
2
 
3
3
 
4
- VERSION = '0.0.53'
4
+ VERSION = '0.0.54'
5
5
 
6
6
 
7
7
  with open("README.md", "r") as readme:
File without changes
File without changes