bigraph-schema 0.0.45__tar.gz → 0.0.47__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.

Files changed (40) hide show
  1. {bigraph-schema-0.0.45/bigraph_schema.egg-info → bigraph-schema-0.0.47}/PKG-INFO +5 -1
  2. bigraph-schema-0.0.47/bigraph_schema/__init__.py +6 -0
  3. bigraph-schema-0.0.47/bigraph_schema/edge.py +26 -0
  4. {bigraph-schema-0.0.45 → bigraph-schema-0.0.47}/bigraph_schema/registry.py +4 -41
  5. bigraph-schema-0.0.47/bigraph_schema/type_functions.py +2542 -0
  6. bigraph-schema-0.0.47/bigraph_schema/type_system.py +2069 -0
  7. bigraph-schema-0.0.47/bigraph_schema/type_system_tests.py +2325 -0
  8. bigraph-schema-0.0.47/bigraph_schema/utilities.py +222 -0
  9. {bigraph-schema-0.0.45 → bigraph-schema-0.0.47/bigraph_schema.egg-info}/PKG-INFO +5 -1
  10. bigraph-schema-0.0.47/bigraph_schema.egg-info/SOURCES.txt +19 -0
  11. {bigraph-schema-0.0.45 → bigraph-schema-0.0.47}/setup.py +1 -1
  12. bigraph-schema-0.0.45/.github/workflows/notebook_to_html.yml +0 -48
  13. bigraph-schema-0.0.45/.github/workflows/pytest.yml +0 -29
  14. bigraph-schema-0.0.45/.gitignore +0 -14
  15. bigraph-schema-0.0.45/CLA.md +0 -113
  16. bigraph-schema-0.0.45/CODE_OF_CONDUCT.md +0 -137
  17. bigraph-schema-0.0.45/CONTRIBUTING.md +0 -44
  18. bigraph-schema-0.0.45/bigraph_schema/__init__.py +0 -2
  19. bigraph-schema-0.0.45/bigraph_schema/data.py +0 -1
  20. bigraph-schema-0.0.45/bigraph_schema/react.py +0 -50
  21. bigraph-schema-0.0.45/bigraph_schema/type_system.py +0 -6996
  22. bigraph-schema-0.0.45/bigraph_schema.egg-info/SOURCES.txt +0 -31
  23. bigraph-schema-0.0.45/notebooks/core.ipynb +0 -1683
  24. bigraph-schema-0.0.45/notebooks/demo.ipynb +0 -1487
  25. bigraph-schema-0.0.45/notebooks/images/place-link.png +0 -0
  26. bigraph-schema-0.0.45/notebooks/images/reaction-after.png +0 -0
  27. bigraph-schema-0.0.45/notebooks/images/reaction-before.png +0 -0
  28. bigraph-schema-0.0.45/notebooks/images/redex-reactum.png +0 -0
  29. bigraph-schema-0.0.45/pytest.ini +0 -4
  30. bigraph-schema-0.0.45/release.sh +0 -43
  31. {bigraph-schema-0.0.45 → bigraph-schema-0.0.47}/AUTHORS.md +0 -0
  32. {bigraph-schema-0.0.45 → bigraph-schema-0.0.47}/LICENSE +0 -0
  33. {bigraph-schema-0.0.45 → bigraph-schema-0.0.47}/README.md +0 -0
  34. {bigraph-schema-0.0.45 → bigraph-schema-0.0.47}/bigraph_schema/parse.py +0 -0
  35. {bigraph-schema-0.0.45 → bigraph-schema-0.0.47}/bigraph_schema/protocols.py +0 -0
  36. {bigraph-schema-0.0.45 → bigraph-schema-0.0.47}/bigraph_schema/units.py +0 -0
  37. {bigraph-schema-0.0.45 → bigraph-schema-0.0.47}/bigraph_schema.egg-info/dependency_links.txt +0 -0
  38. {bigraph-schema-0.0.45 → bigraph-schema-0.0.47}/bigraph_schema.egg-info/requires.txt +0 -0
  39. {bigraph-schema-0.0.45 → bigraph-schema-0.0.47}/bigraph_schema.egg-info/top_level.txt +0 -0
  40. {bigraph-schema-0.0.45 → bigraph-schema-0.0.47}/setup.cfg +0 -0
@@ -1,10 +1,12 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: bigraph-schema
3
- Version: 0.0.45
3
+ Version: 0.0.47
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
8
10
  Classifier: Development Status :: 3 - Alpha
9
11
  Classifier: Intended Audience :: Developers
10
12
  Classifier: License :: OSI Approved :: MIT License
@@ -52,3 +54,5 @@ This resource will guide you through the core concepts and methods, helping you
52
54
  ## License
53
55
 
54
56
  Bigraph-schema is open-source software released under the [Apache 2 License](https://github.com/vivarium-collective/bigraph-schema/blob/main/LICENSE).
57
+
58
+
@@ -0,0 +1,6 @@
1
+ from bigraph_schema.registry import (
2
+ deep_merge, validate_merge, default, Registry, hierarchy_depth, is_schema_key, establish_path,
3
+ strip_schema_keys, type_parameter_key, non_schema_keys, set_path, transform_path)
4
+ from bigraph_schema.utilities import get_path, visit_method
5
+ from bigraph_schema.edge import Edge
6
+ from bigraph_schema.type_system import TypeSystem
@@ -0,0 +1,26 @@
1
+ """
2
+ ====
3
+ Edge
4
+ ====
5
+
6
+ Base class for all edges in the bigraph schema.
7
+ """
8
+
9
+ class Edge:
10
+ def __init__(self):
11
+ pass
12
+
13
+
14
+ def inputs(self):
15
+ return {}
16
+
17
+
18
+ def outputs(self):
19
+ return {}
20
+
21
+
22
+ def interface(self):
23
+ """Returns the schema for this type"""
24
+ return {
25
+ 'inputs': self.inputs(),
26
+ 'outputs': self.outputs()}
@@ -17,30 +17,9 @@ from pprint import pformat as pf
17
17
  from bigraph_schema.protocols import local_lookup_module, function_module
18
18
 
19
19
 
20
- NONE_SYMBOL = '!nil'
21
20
 
22
-
23
- required_schema_keys = set([
24
- '_default',
25
- '_apply',
26
- '_check',
27
- '_serialize',
28
- '_deserialize',
29
- '_fold',
30
- ])
31
-
32
-
33
- optional_schema_keys = set([
34
- '_type',
35
- '_value',
36
- '_description',
37
- '_type_parameters',
38
- '_inherit',
39
- '_divide',
40
- ])
41
-
42
-
43
- type_schema_keys = required_schema_keys | optional_schema_keys
21
+ def deep_merge_copy(dct, merge_dct):
22
+ return deep_merge(copy.deepcopy(dct), merge_dct)
44
23
 
45
24
 
46
25
  def deep_merge(dct, merge_dct):
@@ -347,9 +326,9 @@ class Registry(object):
347
326
  return function_name, module_key
348
327
 
349
328
 
350
- def register_multiple(self, schemas, force=False):
329
+ def register_multiple(self, schemas, strict=False):
351
330
  for key, schema in schemas.items():
352
- self.register(key, schema, force=force)
331
+ self.register(key, schema, strict=strict)
353
332
 
354
333
  def find(self, key):
355
334
  return self.registry.get(key)
@@ -367,19 +346,3 @@ class Registry(object):
367
346
 
368
347
  def validate(self, item):
369
348
  return True
370
-
371
-
372
- def test_remove_omitted():
373
- result = remove_omitted(
374
- {'a': {}, 'b': {'c': {}, 'd': {}}},
375
- {'b': {'c': {}}},
376
- {'a': {'X': 1111}, 'b': {'c': {'Y': 4444}, 'd': {'Z': 99999}}})
377
-
378
- assert 'a' not in result
379
- assert result['b']['c']['Y'] == 4444
380
- assert 'd' not in result['b']
381
-
382
-
383
- if __name__ == '__main__':
384
- test_reregister_type()
385
- test_remove_omitted()