From c6401aca6a6c712b1808ebb41b6c857fb0f0b3ae Mon Sep 17 00:00:00 2001 From: rtimms Date: Tue, 27 Jan 2026 15:43:56 +0000 Subject: [PATCH 1/3] fix thermal environment, bump version number --- bpx/__init__.py | 2 +- bpx/schema.py | 2 +- tests/test_parsers.py | 2 +- tests/test_schema.py | 6 +++--- tests/test_utilities.py | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/bpx/__init__.py b/bpx/__init__.py index c7e2ca2..e7e8dd0 100644 --- a/bpx/__init__.py +++ b/bpx/__init__.py @@ -5,7 +5,7 @@ from .schema import BPX, check_sto_limits from .utilities import get_electrode_concentrations, get_electrode_stoichiometries -__version__ = "0.5.0" +__version__ = "1.1.0" __all__ = [ "BPX", diff --git a/bpx/schema.py b/bpx/schema.py index 24c4943..07131f5 100644 --- a/bpx/schema.py +++ b/bpx/schema.py @@ -688,7 +688,7 @@ class State(ExtraBaseModel): ) thermal_state: ThermalState = Field( - alias="Thermal state", + alias="Thermal environment", ) degradation: Degradation = Field( diff --git a/tests/test_parsers.py b/tests/test_parsers.py index 175a3fa..2b9dabc 100644 --- a/tests/test_parsers.py +++ b/tests/test_parsers.py @@ -96,7 +96,7 @@ def setUp(self) -> None: "Initial hysteresis state: Negative electrode": 5, "Initial hysteresis state: Positive electrode": 10 }, - "Thermal state": { + "Thermal environment": { "Ambient temperature [K]": 299, "Heat transfer coefficient [W.m-2.K-1]": 10.0 } diff --git a/tests/test_schema.py b/tests/test_schema.py index 31233ce..64d8dc0 100644 --- a/tests/test_schema.py +++ b/tests/test_schema.py @@ -94,7 +94,7 @@ def setUp(self) -> None: "Secondary": 10, }, }, - "Thermal state": { + "Thermal environment": { "Ambient temperature [K]": 299, "Heat transfer coefficient [W.m-2.K-1]": 10.0, }, @@ -166,7 +166,7 @@ def setUp(self) -> None: }, "Initial hysteresis state: Negative electrode": 5, }, - "Thermal state": { + "Thermal environment": { "Ambient temperature [K]": 299, "Heat transfer coefficient [W.m-2.K-1]": 10.0, }, @@ -232,7 +232,7 @@ def setUp(self) -> None: "Initial hysteresis state: Positive electrode": 10, "Initial hysteresis state: Negative electrode": 5, }, - "Thermal state": { + "Thermal environment": { "Ambient temperature [K]": 299, "Heat transfer coefficient [W.m-2.K-1]": 10.0, }, diff --git a/tests/test_utilities.py b/tests/test_utilities.py index 8715415..58a532e 100644 --- a/tests/test_utilities.py +++ b/tests/test_utilities.py @@ -74,7 +74,7 @@ def setUp(self) -> None: "Initial hysteresis state: Negative electrode": 5, "Initial hysteresis state: Positive electrode": 10, }, - "Thermal state": { + "Thermal environment": { "Ambient temperature [K]": 299, "Heat transfer coefficient [W.m-2.K-1]": 10.0, }, From 3f6b1bf6f0d3d7dc9073314c8cea3ced0abe7e2b Mon Sep 17 00:00:00 2001 From: rtimms Date: Tue, 27 Jan 2026 15:46:05 +0000 Subject: [PATCH 2/3] thermal_state -> thermal_environment --- bpx/schema.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bpx/schema.py b/bpx/schema.py index 07131f5..2c6e968 100644 --- a/bpx/schema.py +++ b/bpx/schema.py @@ -687,7 +687,7 @@ class State(ExtraBaseModel): alias="Initial conditions", ) - thermal_state: ThermalState = Field( + thermal_environment: ThermalState = Field( alias="Thermal environment", ) From fdf89cabc2a89a4cff5ce3b93709f5f6e6a36940 Mon Sep 17 00:00:00 2001 From: rtimms Date: Tue, 27 Jan 2026 15:48:46 +0000 Subject: [PATCH 3/3] fix deprecated parser --- bpx/expression_parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bpx/expression_parser.py b/bpx/expression_parser.py index ceb7ff3..5ef323f 100644 --- a/bpx/expression_parser.py +++ b/bpx/expression_parser.py @@ -64,4 +64,4 @@ def push_unary_minus(self, toks: tuple) -> None: def parse_string(self, model_str: str, *, parse_all: bool = True) -> None: self.expr_stack = [] - self.parser.parseString(model_str, parseAll=parse_all) + self.parser.parse_string(model_str, parse_all=parse_all)