Skip to content
Merged
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
12 changes: 11 additions & 1 deletion flow360/component/simulation/framework/updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ def _to_25_6_2(params_as_dict):
return params_as_dict


def _to_25_6_4(params_as_dict):
def _add_default_planar_face_tolerance(params_as_dict):
if params_as_dict.get("meshing") is None:
return params_as_dict
if "defaults" not in params_as_dict["meshing"]:
Expand All @@ -297,6 +297,15 @@ def _to_25_6_4(params_as_dict):
return params_as_dict


def _to_25_6_4(params_as_dict):
return _add_default_planar_face_tolerance(params_as_dict)


def _to_25_6_5(params_as_dict):
# Some 25.6.4 JSONs are also missing the planar_face_tolerance.
return _add_default_planar_face_tolerance(params_as_dict)


VERSION_MILESTONES = [
(Flow360Version("24.11.1"), _to_24_11_1),
(Flow360Version("24.11.7"), _to_24_11_7),
Expand All @@ -307,6 +316,7 @@ def _to_25_6_4(params_as_dict):
(Flow360Version("25.4.1"), _to_25_4_1),
(Flow360Version("25.6.2"), _to_25_6_2),
(Flow360Version("25.6.4"), _to_25_6_4),
(Flow360Version("25.6.5"), _to_25_6_5),
] # A list of the Python API version tuple with there corresponding updaters.


Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tool.poetry]
name = "flow360"
version = "v25.7.1b1"
description = ""
description = "Flow360 Python Client"
authors = ["Flexcompute <support@flexcompute.com>"]

[tool.poetry.dependencies]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "25.6.2",
"version": "25.6.5",
"unit_system": {
"name": "SI"
},
Expand Down
18 changes: 18 additions & 0 deletions tests/simulation/test_updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -729,3 +729,21 @@ def test_updater_to_25_6_4():
root_item_type="Geometry",
)
assert params_new


def test_updater_to_25_6_5():
with open("../data/simulation/simulation_pre_25_4_1.json", "r") as fp:
params_as_dict = json.load(fp)

params_new = updater(
version_from="25.4.0b1",
version_to=f"25.6.5",
params_as_dict=params_as_dict,
)
assert params_new["meshing"]["defaults"]["planar_face_tolerance"] == 1e-6
params_new, _, _ = validate_model(
params_as_dict=params_new,
validated_by=ValidationCalledBy.LOCAL,
root_item_type="Geometry",
)
assert params_new
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "25.6.2",
"version": "25.6.5",
"unit_system": {
"name": "Imperial"
},
Expand Down
Loading