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.
- {bigraph-schema-0.0.53/bigraph_schema.egg-info → bigraph-schema-0.0.54}/PKG-INFO +1 -1
- {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/bigraph_schema/type_functions.py +14 -1
- {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/bigraph_schema/type_system.py +10 -7
- {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/bigraph_schema/utilities.py +1 -0
- {bigraph-schema-0.0.53 → bigraph-schema-0.0.54/bigraph_schema.egg-info}/PKG-INFO +1 -1
- {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/setup.py +1 -1
- {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/.github/workflows/notebook_to_html.yml +0 -0
- {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/.github/workflows/pytest.yml +0 -0
- {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/.gitignore +0 -0
- {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/AUTHORS.md +0 -0
- {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/CLA.md +0 -0
- {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/CODE_OF_CONDUCT.md +0 -0
- {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/CONTRIBUTING.md +0 -0
- {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/LICENSE +0 -0
- {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/README.md +0 -0
- {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/bigraph_schema/__init__.py +0 -0
- {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/bigraph_schema/edge.py +0 -0
- {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/bigraph_schema/parse.py +0 -0
- {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/bigraph_schema/protocols.py +0 -0
- {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/bigraph_schema/registry.py +0 -0
- {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/bigraph_schema/type_system_tests.py +0 -0
- {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/bigraph_schema/units.py +0 -0
- {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/bigraph_schema.egg-info/SOURCES.txt +0 -0
- {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/bigraph_schema.egg-info/dependency_links.txt +0 -0
- {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/bigraph_schema.egg-info/requires.txt +0 -0
- {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/bigraph_schema.egg-info/top_level.txt +0 -0
- {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/notebooks/core.ipynb +0 -0
- {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/notebooks/demo.ipynb +0 -0
- {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/notebooks/images/place-link.png +0 -0
- {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/notebooks/images/reaction-after.png +0 -0
- {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/notebooks/images/reaction-before.png +0 -0
- {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/notebooks/images/redex-reactum.png +0 -0
- {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/pytest.ini +0 -0
- {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/release.sh +0 -0
- {bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/setup.cfg +0 -0
|
@@ -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':
|
|
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
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
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,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{bigraph-schema-0.0.53 → bigraph-schema-0.0.54}/bigraph_schema.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|