Skip to content

Commit

Permalink
working with new registry organization
Browse files Browse the repository at this point in the history
  • Loading branch information
prismofeverything committed Nov 1, 2024
1 parent 7979c29 commit 32cf42f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
3 changes: 1 addition & 2 deletions process_bigraph/composite.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions process_bigraph/process_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
12 changes: 6 additions & 6 deletions process_bigraph/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 32cf42f

Please sign in to comment.