Skip to content
Open
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
205 changes: 34 additions & 171 deletions poetry.lock

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,17 @@ authors = [
]
license = {text = "MIT"}
readme = "README.md"
requires-python = ">=3.10, <4.0"
requires-python = ">=3.11, <4.0"
packages = [
{include = "simple_process_bigraph_runtime"},
{include = "tests"}
]
dependencies = [
"process-bigraph (>=0.0.35, <1.0)",
"typer (>=0.15.3, <1.0)",
# "process-bigraph-lang @ git+https://github.com/biosimulations/process-bigraph-lang.git#bind-to-object",
"process-bigraph-lang @ ../process-bigraph-lang",
"spatio-flux @ git+https://github.com/vivarium-collective/spatio-flux.git",
"vivarium-interface (>=0.0.5,<0.0.6)"
"process-bigraph-lang @ git+https://github.com/biosimulations/process-bigraph-lang.git#bind-to-object",
# "process-bigraph-lang @ ../process-bigraph-lang",
"spatio-flux @ git+https://github.com/vivarium-collective/spatio-flux.git"
]

[tool.poetry]
Expand All @@ -30,6 +29,7 @@ deptry = "^0.23.0"
mypy = "^1.15.0"
pre-commit = "^4.2.0"
tox = "^4.25.0"
ipython = "^9.2.0"

[build-system]
requires = ["poetry-core>=2.0.0,<3.0.0"]
Expand Down
3 changes: 0 additions & 3 deletions src/simple_process_bigraph_runtime/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from process_bigraph import Composite, ProcessTypes # type: ignore[import-untyped]
from process_bigraph_lang.dsl.model import Model
from typing_extensions import Annotated
from vivarium import Vivarium # type: ignore[import-untyped]

import simple_process_bigraph_runtime.registry.spatio_flux_library as spatioflux
import simple_process_bigraph_runtime.registry.toy_library as toy
Expand Down Expand Up @@ -54,8 +53,6 @@ def playground():
pass

def generatePythonModel(pblang_path: os.PathLike[str]) -> Model:
absolute_path: str = validate_pb_absolute_path(os.path.abspath(pblang_path))

return dsl_adapter.generateModelAst(pblang_path)

def validate_pb_absolute_path(absolute_path: str) -> str:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from bigraph_schema import default # type: ignore[import-untyped]
from spatio_flux import processes # type: ignore[import-untyped]
from vivarium import Vivarium # type: ignore[import-untyped]

from simple_process_bigraph_runtime.environment.process_bigraph_env import ProcessBigraphEnv

Expand Down
1 change: 0 additions & 1 deletion src/simple_process_bigraph_runtime/registry/toy_library.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

from process_bigraph import Process, Step # type: ignore[import-untyped]
from process_bigraph.composite import SyncUpdate # type: ignore[import-untyped]
from vivarium import Vivarium # type: ignore[import-untyped]

from simple_process_bigraph_runtime.environment.process_bigraph_env import ProcessBigraphEnv

Expand Down
3 changes: 2 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from tests.fixtures.model_fixtures import ( # noqa: F401
model_path_abc,
model_paths_abc_steps,
model_paths_abc_processes,
)
31 changes: 0 additions & 31 deletions tests/fixtures/data/abc.json

This file was deleted.

17 changes: 0 additions & 17 deletions tests/fixtures/data/abc.store

This file was deleted.

260 changes: 260 additions & 0 deletions tests/fixtures/data/abc_processes.pblang.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,260 @@
{
"obj_type": "Model",
"definitions": [],
"types": [
{
"name": "float",
"obj_type": "Type",
"builtin": "builtin",
"superType": null,
"default": null,
"update": null,
"subtypes": []
},
{
"name": "string",
"obj_type": "Type",
"builtin": "builtin",
"superType": null,
"default": null,
"update": null,
"subtypes": []
}
],
"units": [],
"processDefs": [
{
"name": "add_nums",
"obj_type": "ProcessDef",
"params": [],
"vars": [
{
"name": "left_hand_addend",
"obj_type": "SchemaItem",
"type": {
"ref": "#/types@0",
"ref_text": "float"
},
"default": null,
"unit_ref": null
},
{
"name": "right_hand_addend",
"obj_type": "SchemaItem",
"type": {
"ref": "#/types@0",
"ref_text": "float"
},
"default": null,
"unit_ref": null
},
{
"name": "result",
"obj_type": "SchemaItem",
"type": {
"ref": "#/types@0",
"ref_text": "float"
},
"default": null,
"unit_ref": null
}
],
"inputs": [
{
"ref": "#/processDefs@0/vars@0",
"ref_text": "left_hand_addend"
},
{
"ref": "#/processDefs@0/vars@1",
"ref_text": "right_hand_addend"
}
],
"outputs": [
{
"ref": "#/processDefs@0/vars@2",
"ref_text": "result"
}
],
"updates": [],
"python_path": {
"obj_type": "PythonPath",
"path": [
"toy",
"AddFloatsProcess"
]
}
},
{
"name": "print_result",
"obj_type": "ProcessDef",
"params": [
{
"name": "output_file_path",
"obj_type": "SchemaItem",
"type": {
"ref": "#/types@1",
"ref_text": "string"
},
"default": {
"val": "~/abc_result.txt"
},
"unit_ref": null
}
],
"vars": [
{
"name": "result",
"obj_type": "SchemaItem",
"type": {
"ref": "#/types@0",
"ref_text": "float"
},
"default": null,
"unit_ref": null
}
],
"inputs": [
{
"ref": "#/processDefs@0/vars@2",
"ref_text": "result"
}
],
"outputs": [],
"updates": [],
"python_path": {
"obj_type": "PythonPath",
"path": [
"toy",
"SaveFloatToFileStep"
]
}
}
],
"store_defs": [
{
"name": "left_hand",
"obj_type": "StoreDef",
"parent": null,
"states": [
{
"name": "left_hand_addend",
"obj_type": "SchemaItem",
"type": {
"ref": "#/types@0",
"ref_text": "float"
},
"default": {
"val": 2.07
},
"unit_ref": null
}
]
},
{
"name": "right_hand",
"obj_type": "StoreDef",
"parent": null,
"states": [
{
"name": "right_hand_addend",
"obj_type": "SchemaItem",
"type": {
"ref": "#/types@0",
"ref_text": "float"
},
"default": {
"val": 3.5
},
"unit_ref": null
}
]
},
{
"name": "resulting_calculation",
"obj_type": "StoreDef",
"parent": null,
"states": [
{
"name": "result",
"obj_type": "SchemaItem",
"type": {
"ref": "#/types@0",
"ref_text": "float"
},
"default": null,
"unit_ref": null
}
]
}
],
"compositeDefs": [
{
"name": "CellComposite",
"obj_type": "CompositeDef",
"stores": [
{
"name": "lhs",
"obj_type": "Store",
"store_def": {
"ref": "#/store_defs@0",
"ref_text": "left_hand"
}
},
{
"name": "rhs",
"obj_type": "Store",
"store_def": {
"ref": "#/store_defs@1",
"ref_text": "right_hand"
}
},
{
"name": "res",
"obj_type": "Store",
"store_def": {
"ref": "#/store_defs@2",
"ref_text": "resulting_calculation"
}
}
],
"processes": [
{
"name": "addition",
"obj_type": "Process",
"process_def": {
"ref": "#/processDefs@0",
"ref_text": "add_nums"
},
"stores": [
{
"ref": "#/compositeDefs@0/stores@0",
"ref_text": "lhs"
},
{
"ref": "#/compositeDefs@0/stores@1",
"ref_text": "rhs"
},
{
"ref": "#/compositeDefs@0/stores@2",
"ref_text": "res"
}
]
},
{
"name": "printing",
"obj_type": "Process",
"process_def": {
"ref": "#/processDefs@1",
"ref_text": "print_result"
},
"stores": [
{
"ref": "#/compositeDefs@0/stores@2",
"ref_text": "res"
}
]
}
]
}
]
}
Loading