From de1340f60a737a26206b717ace9259bebb5ecdbd Mon Sep 17 00:00:00 2001 From: RemDelaporteMathurin Date: Mon, 12 Jan 2026 14:53:25 -0500 Subject: [PATCH 1/5] fix template --- src/python/templates/block_macros.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/python/templates/block_macros.py b/src/python/templates/block_macros.py index 2e2b3da..523daa9 100644 --- a/src/python/templates/block_macros.py +++ b/src/python/templates/block_macros.py @@ -25,8 +25,8 @@ {{ create_block(node) }} {%- if node["data"].get("replacement_times") %} -events_{{ node["var_name"] }} = {{ node["var_name"] }}.create_reset_events() -events += events_{{ node["var_name"] }} +{{ node["var_name"] }}._create_reset_events() +events += {{ node["var_name"] }}.events {%- endif %} {%- endmacro -%} From 6eb5e2336f5cfb727d04eff9aa3d095ebe7758d8 Mon Sep 17 00:00:00 2001 From: RemDelaporteMathurin Date: Mon, 12 Jan 2026 14:56:13 -0500 Subject: [PATCH 2/5] update test file to catch the bug --- test/test_files/bubbler.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_files/bubbler.json b/test/test_files/bubbler.json index f336d89..97cf713 100644 --- a/test/test_files/bubbler.json +++ b/test/test_files/bubbler.json @@ -10,7 +10,7 @@ "data": { "label": "bubbler 1", "conversion_efficiency": "", - "replacement_times": "", + "replacement_times": "[1]", "vial_efficiency": "" }, "measured": { From 36e549c88928a341efb0a300e1bdb821d2fddb3c Mon Sep 17 00:00:00 2001 From: RemDelaporteMathurin Date: Mon, 12 Jan 2026 14:57:20 -0500 Subject: [PATCH 3/5] fixed test --- test/test_convert_python.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_convert_python.py b/test/test_convert_python.py index ee186a2..9c7bf23 100644 --- a/test/test_convert_python.py +++ b/test/test_convert_python.py @@ -164,7 +164,7 @@ def test_bubbler_has_reset_times(): } code = convert_graph_to_python(sample_data) print(code) - assert "bubbler_1.create_reset_events()" in code + assert "bubbler_1._create_reset_events()" in code if __name__ == "__main__": From 9611fb53a8c801826b940297c7b8e8472742aac4 Mon Sep 17 00:00:00 2001 From: RemDelaporteMathurin Date: Tue, 13 Jan 2026 08:29:26 -0500 Subject: [PATCH 4/5] added upper bound --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f16925b..3b3a7d0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,7 +24,7 @@ classifiers = [ ] requires-python = ">=3.8" dependencies = [ - "pathsim>=0.8.2", + "pathsim>=0.8.2,<0.14.0", "pathsim-chem", "matplotlib>=3.7.0", "numpy>=1.24.0", From 0a63ffadd7e3c9ebb3afd38ade80da7a72f01223 Mon Sep 17 00:00:00 2001 From: RemDelaporteMathurin Date: Tue, 13 Jan 2026 08:39:18 -0500 Subject: [PATCH 5/5] upper bound on pathsim-chem --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3b3a7d0..77b2b0a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,7 +25,7 @@ classifiers = [ requires-python = ">=3.8" dependencies = [ "pathsim>=0.8.2,<0.14.0", - "pathsim-chem", + "pathsim-chem<0.1.1", "matplotlib>=3.7.0", "numpy>=1.24.0", "plotly>=6.0",