Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reorg and document #95

Merged
merged 16 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions bigraph_schema/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
from bigraph_schema.registry import deep_merge, validate_merge, default, Registry, hierarchy_depth, is_schema_key, strip_schema_keys, type_parameter_key, non_schema_keys
from bigraph_schema.type_system import TypeSystem, Edge, get_path, establish_path, set_path, transform_path, visit_method
from bigraph_schema.registry import (
deep_merge, validate_merge, default, Registry, hierarchy_depth, is_schema_key, establish_path,
strip_schema_keys, type_parameter_key, non_schema_keys, set_path, transform_path)
from bigraph_schema.utilities import get_path, visit_method
from bigraph_schema.edge import Edge
from bigraph_schema.type_system import TypeSystem
1 change: 0 additions & 1 deletion bigraph_schema/data.py

This file was deleted.

26 changes: 26 additions & 0 deletions bigraph_schema/edge.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
"""
====
Edge
====

Base class for all edges in the bigraph schema.
"""

class Edge:
def __init__(self):
pass


def inputs(self):
return {}


def outputs(self):
return {}


def interface(self):
"""Returns the schema for this type"""
return {
'inputs': self.inputs(),
'outputs': self.outputs()}
50 changes: 0 additions & 50 deletions bigraph_schema/react.py

This file was deleted.

25 changes: 0 additions & 25 deletions bigraph_schema/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,31 +17,6 @@
from bigraph_schema.protocols import local_lookup_module, function_module


NONE_SYMBOL = '!nil'


required_schema_keys = set([
'_default',
'_apply',
'_check',
'_serialize',
'_deserialize',
'_fold',
])


optional_schema_keys = set([
'_type',
'_value',
'_description',
'_type_parameters',
'_inherit',
'_divide',
])


type_schema_keys = required_schema_keys | optional_schema_keys


def deep_merge_copy(dct, merge_dct):
return deep_merge(copy.deepcopy(dct), merge_dct)
Expand Down
Loading
Loading