diff --git a/process_bigraph/composite.py b/process_bigraph/composite.py index 1ed2c23..89c5413 100644 --- a/process_bigraph/composite.py +++ b/process_bigraph/composite.py @@ -10,8 +10,7 @@ import collections from typing import Dict -from bigraph_schema import Edge, TypeSystem, get_path, set_path, deep_merge -from bigraph_schema.registry import Registry, is_schema_key, hierarchy_depth, strip_schema_keys +from bigraph_schema import Edge, TypeSystem, get_path, set_path, deep_merge, is_schema_key, strip_schema_keys, Registry, hierarchy_depth from process_bigraph.process_types import process_types from process_bigraph.protocols import local_lookup, local_lookup_module diff --git a/process_bigraph/process_types.py b/process_bigraph/process_types.py index 95a5aee..6ce25b7 100644 --- a/process_bigraph/process_types.py +++ b/process_bigraph/process_types.py @@ -4,8 +4,7 @@ import copy -from bigraph_schema import Edge, deep_merge -from bigraph_schema.registry import visit_method +from bigraph_schema import Edge, deep_merge, visit_method def apply_process(schema, current, update, core): diff --git a/process_bigraph/tests.py b/process_bigraph/tests.py index ee7629c..3d651ae 100644 --- a/process_bigraph/tests.py +++ b/process_bigraph/tests.py @@ -6,12 +6,16 @@ import pytest from process_bigraph.composite import Process, Step, Composite, merge_collections, ProcessTypes +from process_bigraph.experiments.minimal_gillespie import EXPORT as gillespie_types # from process_bigraph.type_system import ProcessTypes @pytest.fixture def core(): - return ProcessTypes() + types = ProcessTypes() + types.import_types(gillespie_types) + + return types class IncreaseProcess(Process): @@ -56,11 +60,6 @@ def test_merge_collections(core): assert c[('what',)] == [1, 2, 3, 4, 5, 11] -@pytest.fixture -def core(): - return ProcessTypes() - - def test_process(core): process = IncreaseProcess({'rate': 0.2}, core=core) interface = process.interface() @@ -446,6 +445,7 @@ def test_emitter(core): if __name__ == '__main__': core = ProcessTypes() + core.import_types(gillespie_types) test_default_config(core) test_merge_collections(core)