Skip to content

Commit

Permalink
bumped pydantic version to 1.10.8 to remove copy() bug (#245)
Browse files Browse the repository at this point in the history
* bumped pydantic version to 1.10.8 to remove copy() bug

* added test for copy
  • Loading branch information
maciej-flexcompute authored Apr 18, 2024
1 parent ab18c10 commit a2a2ad7
Show file tree
Hide file tree
Showing 9 changed files with 871 additions and 748 deletions.
2 changes: 1 addition & 1 deletion flow360/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
version
"""

__version__ = "24.2.2"
__version__ = "24.2.3"
1,583 changes: 847 additions & 736 deletions poetry.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[tool.poetry]
name = "flow360"
version = "v0.2.0"
version = "v24.2.3"
description = ""
authors = ["Flexcompute <support@flexcompute.com>"]

[tool.poetry.dependencies]
python = ">=3.9,<3.12"
pydantic = "^1.10.0"
pydantic = "^1.10.8"
pytest = "^7.1.2"
click = "^8.1.3"
toml = "^0.10.2"
Expand Down
4 changes: 2 additions & 2 deletions tests/ref/case_params/params.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"unitSystem": {
"name": "SI"
},
"version": "24.2.2",
"version": "24.2.3",
"geometry": {
"refArea": {
"value": 1.0,
Expand Down Expand Up @@ -157,5 +157,5 @@
},
"modelType": "Compressible"
},
"hash": "9f9154b907f8fe0ca5fce739212f4a072cd35fee70d1c1115cd198d888b5c9ca"
"hash": "cca1f3162125914f523d8e2c95121874d933a37ce3bd42525e3c1144add6db17"
}
4 changes: 2 additions & 2 deletions tests/ref/case_params/params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ geometry:
refArea:
units: 2*m**2
value: 1.0
hash: 9f9154b907f8fe0ca5fce739212f4a072cd35fee70d1c1115cd198d888b5c9ca
hash: cca1f3162125914f523d8e2c95121874d933a37ce3bd42525e3c1144add6db17
navierStokesSolver:
CFLMultiplier: 1.0
absoluteTolerance: 1.0e-10
Expand Down Expand Up @@ -108,7 +108,7 @@ timeStepping:
timeStepSize: inf
unitSystem:
name: SI
version: 24.2.2
version: 24.2.3
volumeOutput:
animationFrequency: -1
animationFrequencyOffset: 0
Expand Down
4 changes: 2 additions & 2 deletions tests/ref/case_params/params_units.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"unitSystem": {
"name": "SI"
},
"version": "24.2.2",
"version": "24.2.3",
"geometry": {
"refArea": {
"value": 1.0,
Expand Down Expand Up @@ -172,5 +172,5 @@
}
}
},
"hash": "e16b928d4748f68c22e71e11c0a24535ac685a2ddd7b8ca06d2279174877ffb7"
"hash": "ac7fa6289cc2d30e38d31db16ad7522d8942b76ca0fc4e8c1917ed99c52fd34a"
}
4 changes: 2 additions & 2 deletions tests/ref/case_params/params_units_converted.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"unitSystem": {
"name": "SI"
},
"version": "24.2.2",
"version": "24.2.3",
"geometry": {
"refArea": {
"value": 1.0,
Expand Down Expand Up @@ -158,5 +158,5 @@
}
}
},
"hash": "3a1b16aa86940bf974277778b9ab694bca0e5d771fe793b1856e93fa09ddf0aa"
"hash": "376f72475f6951a61bb9ba6926fd883426b7f2dd5965833d861c0973140380c5"
}
2 changes: 1 addition & 1 deletion tests/test_flow360.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@


def test_version():
assert __version__ == "24.2.2"
assert __version__ == "24.2.3"
12 changes: 12 additions & 0 deletions tests/test_flow360_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,18 @@ def test_update_from_multiple_files_overwrite():
assert params.geometry.ref_area == 2 * u.m**2


def test_copy():
with fl.SI_unit_system:
params = fl.Flow360Params(
geometry=fl.Geometry("data/case_params/geometry.yaml"),
boundaries=fl.Boundaries("data/case_params/boundaries.yaml"),
freestream=fl.FreestreamFromVelocity(velocity=286, alpha=3.06),
navier_stokes_solver=fl.NavierStokesSolver(absolute_tolerance=1e-10),
)

params.copy()


def clear_formatting(message):
# Remove color formatting escape codes
ansi_escape = re.compile(r"(\x9B|\x1B\[)[0-?]*[ -\/]*[@-~]")
Expand Down

0 comments on commit a2a2ad7

Please # to comment.