Skip to content

Commit 64d3f9b

Browse files
[Hotfix Main]: Bump to 25.6.5 and also add default value application to planar tolerance (#1349)
* Bump to 25.6.5 and also add default value application to planar tolerance (#1348) * Resolve conflict --------- Co-authored-by: Ben <106089368+benflexcompute@users.noreply.github.com> Co-authored-by: BenYuan <ben@flexcompute.com>
1 parent edadff1 commit 64d3f9b

File tree

5 files changed

+32
-4
lines changed

5 files changed

+32
-4
lines changed

flow360/component/simulation/framework/updater.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ def _to_25_6_2(params_as_dict):
286286
return params_as_dict
287287

288288

289-
def _to_25_6_4(params_as_dict):
289+
def _add_default_planar_face_tolerance(params_as_dict):
290290
if params_as_dict.get("meshing") is None:
291291
return params_as_dict
292292
if "defaults" not in params_as_dict["meshing"]:
@@ -297,6 +297,15 @@ def _to_25_6_4(params_as_dict):
297297
return params_as_dict
298298

299299

300+
def _to_25_6_4(params_as_dict):
301+
return _add_default_planar_face_tolerance(params_as_dict)
302+
303+
304+
def _to_25_6_5(params_as_dict):
305+
# Some 25.6.4 JSONs are also missing the planar_face_tolerance.
306+
return _add_default_planar_face_tolerance(params_as_dict)
307+
308+
300309
VERSION_MILESTONES = [
301310
(Flow360Version("24.11.1"), _to_24_11_1),
302311
(Flow360Version("24.11.7"), _to_24_11_7),
@@ -307,6 +316,7 @@ def _to_25_6_4(params_as_dict):
307316
(Flow360Version("25.4.1"), _to_25_4_1),
308317
(Flow360Version("25.6.2"), _to_25_6_2),
309318
(Flow360Version("25.6.4"), _to_25_6_4),
319+
(Flow360Version("25.6.5"), _to_25_6_5),
310320
] # A list of the Python API version tuple with there corresponding updaters.
311321

312322

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[tool.poetry]
22
name = "flow360"
33
version = "v25.7.1b1"
4-
description = ""
4+
description = "Flow360 Python Client"
55
authors = ["Flexcompute <support@flexcompute.com>"]
66

77
[tool.poetry.dependencies]

tests/simulation/data/simulation_with_wrong_expr_syntax.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "25.6.2",
2+
"version": "25.6.5",
33
"unit_system": {
44
"name": "SI"
55
},

tests/simulation/test_updater.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -729,3 +729,21 @@ def test_updater_to_25_6_4():
729729
root_item_type="Geometry",
730730
)
731731
assert params_new
732+
733+
734+
def test_updater_to_25_6_5():
735+
with open("../data/simulation/simulation_pre_25_4_1.json", "r") as fp:
736+
params_as_dict = json.load(fp)
737+
738+
params_new = updater(
739+
version_from="25.4.0b1",
740+
version_to=f"25.6.5",
741+
params_as_dict=params_as_dict,
742+
)
743+
assert params_new["meshing"]["defaults"]["planar_face_tolerance"] == 1e-6
744+
params_new, _, _ = validate_model(
745+
params_as_dict=params_new,
746+
validated_by=ValidationCalledBy.LOCAL,
747+
root_item_type="Geometry",
748+
)
749+
assert params_new

tests/simulation/translator/data/simulation_isosurface.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "25.6.2",
2+
"version": "25.6.5",
33
"unit_system": {
44
"name": "Imperial"
55
},

0 commit comments

Comments
 (0)