From a4ffeb3a29c7e9703cc85fe65f8783b0db569e89 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 12 Apr 2024 01:42:39 +0000 Subject: [PATCH 01/16] Bump idna from 3.4 to 3.7 Bumps [idna](https://github.com/kjd/idna) from 3.4 to 3.7. - [Release notes](https://github.com/kjd/idna/releases) - [Changelog](https://github.com/kjd/idna/blob/master/HISTORY.rst) - [Commits](https://github.com/kjd/idna/compare/v3.4...v3.7) --- updated-dependencies: - dependency-name: idna dependency-type: indirect ... Signed-off-by: dependabot[bot] --- poetry.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/poetry.lock b/poetry.lock index d6a04a0a..c5b43bca 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. [[package]] name = "alabaster" @@ -668,13 +668,13 @@ socks = ["socksio (==1.*)"] [[package]] name = "idna" -version = "3.4" +version = "3.7" description = "Internationalized Domain Names in Applications (IDNA)" optional = false python-versions = ">=3.5" files = [ - {file = "idna-3.4-py3-none-any.whl", hash = "sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2"}, - {file = "idna-3.4.tar.gz", hash = "sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4"}, + {file = "idna-3.7-py3-none-any.whl", hash = "sha256:82fee1fc78add43492d3a1898bfa6d8a904cc97d8427f683ed8e798d07761aa0"}, + {file = "idna-3.7.tar.gz", hash = "sha256:028ff3aadf0609c1fd278d8ea3089299412a7a8b9bd005dd08b9f8285bcb5cfc"}, ] [[package]] From 93fda2a1fc75a0bef5eedabdfc2881e38c4ee98e Mon Sep 17 00:00:00 2001 From: KentropDevelopment Date: Mon, 29 Apr 2024 10:43:28 +0200 Subject: [PATCH 02/16] Set vertical balance params --- geolib/models/dsheetpiling/constructions.py | 20 ++++++++++++++++++ .../models/dsheetpiling/dsheetpiling_model.py | 12 ++++++++++- geolib/models/dsheetpiling/internal.py | 21 +++++++++++++------ .../dsheetpiling/templates/input.shi.j2 | 3 ++- 4 files changed, 48 insertions(+), 8 deletions(-) diff --git a/geolib/models/dsheetpiling/constructions.py b/geolib/models/dsheetpiling/constructions.py index d64138a3..46efb793 100644 --- a/geolib/models/dsheetpiling/constructions.py +++ b/geolib/models/dsheetpiling/constructions.py @@ -2,6 +2,7 @@ from geolib.models import BaseDataClass from geolib.models.dsheetpiling.internal import SheetPileElement +from geolib.models.dsheetpiling.internal import VerticalBalance as InternalVerticalBalance from geolib.models.dsheetpiling.settings import SheetPilingElementMaterialType @@ -378,3 +379,22 @@ def to_internal(self) -> SheetPileElement: diaphragmwallnegeielastoplastic2=self.plastic_properties.eI_branch_3_negative, diaphragmwallnegmomelastoplastic=self.plastic_properties.moment_point_2_negative, ) + + +class VerticalBalance(BaseDataClass): + """ + Vertical Balance parameters + + Arguments: + max_point_resistance: Maximum point resistance (bearing capacity) at the pile point + xi_factor: Statistic factor related to the number of CPT's used for derivation of the maximum point resistance + """ + + max_point_resistance: Optional[float] = None + xi_factor: Optional[float] = None + + def to_internal(self) -> InternalVerticalBalance: + return InternalVerticalBalance( + sheetpilingqcrep=self.max_point_resistance, + sheetpilingxi=self.xi_factor, + ) diff --git a/geolib/models/dsheetpiling/dsheetpiling_model.py b/geolib/models/dsheetpiling/dsheetpiling_model.py index b47922d9..d3d8f9a5 100644 --- a/geolib/models/dsheetpiling/dsheetpiling_model.py +++ b/geolib/models/dsheetpiling/dsheetpiling_model.py @@ -8,7 +8,7 @@ from geolib.geometry import Point from geolib.models import BaseDataClass, BaseModel, BaseModelStructure -from geolib.models.dsheetpiling.constructions import DiaphragmWall, Pile, Sheet +from geolib.models.dsheetpiling.constructions import DiaphragmWall, Pile, Sheet, VerticalBalance from geolib.models.meta import CONSOLE_RUN_BATCH_FLAG from geolib.soils import Soil @@ -399,6 +399,16 @@ def set_construction( top_level=top_level, elements=[element.to_internal() for element in elements] ) + def set_vertical_balance(self, vertical_balance: VerticalBalance) -> None: + """Sets the vertical balance parameters + + The parameters are set in [VERTICAL BALANCE] + + Args: + vertical_balance: VerticalBalance, holds the vertical balance parameters + """ + self.datastructure.input_data.set_vertical_balance(vertical_balance=vertical_balance.to_internal()) + def add_load( self, load: Union[ diff --git a/geolib/models/dsheetpiling/internal.py b/geolib/models/dsheetpiling/internal.py index c966f5a5..6d3ac626 100644 --- a/geolib/models/dsheetpiling/internal.py +++ b/geolib/models/dsheetpiling/internal.py @@ -415,6 +415,11 @@ class SheetPiling(DSeriesStructureCollection): lengthsheetpiling: confloat(gt=0) = 10 +class VerticalBalance(DSeriesInlineMappedProperties): # DSeriesUnmappedNameProperties + sheetpilingqcrep: Optional[confloat(ge=0)] = 0.001 + sheetpilingxi: Optional[confloat(ge=0.1)] = 1.39 + + class Anchor(DSheetpilingTableEntry): name: constr(min_length=1, max_length=50) level: float = 0 @@ -688,12 +693,13 @@ class DSheetPilingInputStructure(DSeriesStructure): ) sheet_piling: Union[str, SheetPiling] = SheetPiling() combined_wall: str = "" - vertical_balance: str = cleandoc( - """ - SheetPilingQcRep=0.000 - SheetPilingXi=1.39 - """ - ) + vertical_balance: VerticalBalance = VerticalBalance() + # vertical_balance: str = cleandoc( + # """ + # SheetPilingQcRep=0.000 + # SheetPilingXi=1.39 + # """ + # ) settlement_by_vibration_params: str = cleandoc( """ SheetPilingNumberOfPilesDrilled=2 @@ -1037,6 +1043,9 @@ def add_element_in_sheet_piling( self.sheet_piling.sheetpiling.append(sheet) self.sheet_piling.update_length_of_sheet_pile() + def set_vertical_balance(self, vertical_balance: VerticalBalance): + self.vertical_balance = vertical_balance + def add_anchor(self, stage_id: int, anchor: Anchor, pre_tension: float) -> None: if not isinstance(self.anchors, Anchors): self.anchors = Anchors() diff --git a/geolib/models/dsheetpiling/templates/input.shi.j2 b/geolib/models/dsheetpiling/templates/input.shi.j2 index 3cc4e688..df2ec544 100644 --- a/geolib/models/dsheetpiling/templates/input.shi.j2 +++ b/geolib/models/dsheetpiling/templates/input.shi.j2 @@ -164,7 +164,8 @@ WoodenSheetPilingElementKModE={{ element.woodensheetpilingelementkmode }} [END OF COMBINED WALL] [VERTICAL BALANCE] -{{ vertical_balance }} +SheetPilingQcRep={{ "%.3f"|format(vertical_balance.sheetpilingqcrep) }} +SheetPilingXi={{ "%.2f"|format(vertical_balance.sheetpilingxi) }} [END OF VERTICAL BALANCE] [SETTLEMENT BY VIBRATION PARAMS] From c4af507b9a9270d145aae9552167ef5b566032af Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 May 2024 20:55:24 +0000 Subject: [PATCH 03/16] Bump jinja2 from 3.1.3 to 3.1.4 Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.3 to 3.1.4. - [Release notes](https://github.com/pallets/jinja/releases) - [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst) - [Commits](https://github.com/pallets/jinja/compare/3.1.3...3.1.4) --- updated-dependencies: - dependency-name: jinja2 dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- poetry.lock | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/poetry.lock b/poetry.lock index 08328875..f94af463 100644 --- a/poetry.lock +++ b/poetry.lock @@ -763,13 +763,13 @@ colors = ["colorama (>=0.4.6)"] [[package]] name = "jinja2" -version = "3.1.3" +version = "3.1.4" description = "A very fast and expressive template engine." optional = false python-versions = ">=3.7" files = [ - {file = "Jinja2-3.1.3-py3-none-any.whl", hash = "sha256:7d6d50dd97d52cbc355597bd845fabfbac3f551e1f99619e39a35ce8c370b5fa"}, - {file = "Jinja2-3.1.3.tar.gz", hash = "sha256:ac8bd6544d4bb2c9792bf3a159e80bba8fda7f07e81bc3aed565432d5925ba90"}, + {file = "jinja2-3.1.4-py3-none-any.whl", hash = "sha256:bc5dd2abb727a5319567b7a813e6a2e7318c39f4f487cfe6c89c6f9c7d25197d"}, + {file = "jinja2-3.1.4.tar.gz", hash = "sha256:4a3aee7acbbe7303aede8e9648d13b8bf88a429282aa6122a993f0ac800cb369"}, ] [package.dependencies] @@ -1579,6 +1579,7 @@ files = [ {file = "PyYAML-6.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34"}, {file = "PyYAML-6.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28"}, {file = "PyYAML-6.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9"}, + {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a08c6f0fe150303c1c6b71ebcd7213c2858041a7e01975da3a99aed1e7a378ef"}, {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0"}, {file = "PyYAML-6.0.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4"}, {file = "PyYAML-6.0.1-cp312-cp312-win32.whl", hash = "sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54"}, From 95b41c90b00299f611c3365fa2c1743a4bb1e923 Mon Sep 17 00:00:00 2001 From: KentropDevelopment Date: Tue, 14 May 2024 10:10:41 +0200 Subject: [PATCH 04/16] added test for set_vertical_balance --- geolib/models/dsheetpiling/internal.py | 2 +- .../dsheetpiling/test_dsheetpiling_model.py | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/geolib/models/dsheetpiling/internal.py b/geolib/models/dsheetpiling/internal.py index 9ed2a7d7..5bdd3bc8 100644 --- a/geolib/models/dsheetpiling/internal.py +++ b/geolib/models/dsheetpiling/internal.py @@ -572,7 +572,7 @@ class SheetPiling(DSeriesStructureCollection): lengthsheetpiling: confloat(gt=0) = 10 -class VerticalBalance(DSeriesInlineMappedProperties): # DSeriesUnmappedNameProperties +class VerticalBalance(DSeriesInlineMappedProperties): sheetpilingqcrep: Optional[confloat(ge=0)] = 0.001 sheetpilingxi: Optional[confloat(ge=0.1)] = 1.39 diff --git a/tests/models/dsheetpiling/test_dsheetpiling_model.py b/tests/models/dsheetpiling/test_dsheetpiling_model.py index 64048fa2..b651cf10 100644 --- a/tests/models/dsheetpiling/test_dsheetpiling_model.py +++ b/tests/models/dsheetpiling/test_dsheetpiling_model.py @@ -27,6 +27,7 @@ PileProperties, Sheet, SheetPileProperties, + VerticalBalance, ) from geolib.models.dsheetpiling.dsheetpiling_model import ( DiaphragmModelType, @@ -907,3 +908,18 @@ def test_duplicate_loads(self, model: DSheetPilingModel): error_message = "New SurchargeLoad load name is duplicated. Please change the name of the load." with pytest.raises(ValueError, match=error_message): model.add_surcharge_load(load=testload, side=Side.LEFT, stage_id=0) + + @pytest.mark.unittest + def test_add_vertical_balance(self, model: DSheetPilingModel): + # Set up vertical balance + vertical_balance = VerticalBalance( + max_point_resistance=1, + xi_factor=2 + ) + + # Call the test function + model.set_vertical_balance(vertical_balance=vertical_balance) + + # Assert + assert model.datastructure.input_data.vertical_balance.sheetpilingqcrep == 1 + assert model.datastructure.input_data.vertical_balance.sheetpilingxi == 2 From fad94adfaae95fca414c4742ac485270297bfcd2 Mon Sep 17 00:00:00 2001 From: KentropDevelopment Date: Tue, 14 May 2024 10:58:06 +0200 Subject: [PATCH 05/16] Implement use of Pydantic V2 --- geolib/models/dsheetpiling/internal.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/geolib/models/dsheetpiling/internal.py b/geolib/models/dsheetpiling/internal.py index 5bdd3bc8..fef68a66 100644 --- a/geolib/models/dsheetpiling/internal.py +++ b/geolib/models/dsheetpiling/internal.py @@ -573,8 +573,12 @@ class SheetPiling(DSeriesStructureCollection): class VerticalBalance(DSeriesInlineMappedProperties): - sheetpilingqcrep: Optional[confloat(ge=0)] = 0.001 - sheetpilingxi: Optional[confloat(ge=0.1)] = 1.39 + if IS_PYDANTIC_V2: + sheetpilingqcrep: Optional[Annotated[float, Field(ge=0)]] = 0.001 + sheetpilingxi: Optional[Annotated[float, Field(ge=0.1)]] = 1.39 + else: + sheetpilingqcrep: Optional[confloat(ge=0)] = 0.001 + sheetpilingxi: Optional[confloat(ge=0.1)] = 1.39 class Anchor(DSheetpilingTableEntry): From 39a87cfacc024d29a838c9e94d16ce6119d6208e Mon Sep 17 00:00:00 2001 From: KentropDevelopment Date: Tue, 14 May 2024 11:03:45 +0200 Subject: [PATCH 06/16] run black --- geolib/models/dsheetpiling/dsheetpiling_model.py | 11 +++++++++-- tests/models/dsheetpiling/test_dsheetpiling_model.py | 5 +---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/geolib/models/dsheetpiling/dsheetpiling_model.py b/geolib/models/dsheetpiling/dsheetpiling_model.py index b9fe27f9..387c11ea 100644 --- a/geolib/models/dsheetpiling/dsheetpiling_model.py +++ b/geolib/models/dsheetpiling/dsheetpiling_model.py @@ -9,7 +9,12 @@ from geolib._compat import IS_PYDANTIC_V2 from geolib.geometry import Point from geolib.models import BaseDataClass, BaseModel, BaseModelStructure -from geolib.models.dsheetpiling.constructions import DiaphragmWall, Pile, Sheet, VerticalBalance +from geolib.models.dsheetpiling.constructions import ( + DiaphragmWall, + Pile, + Sheet, + VerticalBalance, +) from geolib.models.meta import CONSOLE_RUN_BATCH_FLAG from geolib.soils import Soil @@ -427,7 +432,9 @@ def set_vertical_balance(self, vertical_balance: VerticalBalance) -> None: Args: vertical_balance: VerticalBalance, holds the vertical balance parameters """ - self.datastructure.input_data.set_vertical_balance(vertical_balance=vertical_balance.to_internal()) + self.datastructure.input_data.set_vertical_balance( + vertical_balance=vertical_balance.to_internal() + ) def add_load( self, diff --git a/tests/models/dsheetpiling/test_dsheetpiling_model.py b/tests/models/dsheetpiling/test_dsheetpiling_model.py index b651cf10..ca36eb62 100644 --- a/tests/models/dsheetpiling/test_dsheetpiling_model.py +++ b/tests/models/dsheetpiling/test_dsheetpiling_model.py @@ -912,10 +912,7 @@ def test_duplicate_loads(self, model: DSheetPilingModel): @pytest.mark.unittest def test_add_vertical_balance(self, model: DSheetPilingModel): # Set up vertical balance - vertical_balance = VerticalBalance( - max_point_resistance=1, - xi_factor=2 - ) + vertical_balance = VerticalBalance(max_point_resistance=1, xi_factor=2) # Call the test function model.set_vertical_balance(vertical_balance=vertical_balance) From 7664050d90924b22993bdbb488c9e25565365c52 Mon Sep 17 00:00:00 2001 From: KentropDevelopment Date: Tue, 14 May 2024 11:10:17 +0200 Subject: [PATCH 07/16] Remove redundant comment --- geolib/models/dsheetpiling/internal.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/geolib/models/dsheetpiling/internal.py b/geolib/models/dsheetpiling/internal.py index fef68a66..5cbaf0ac 100644 --- a/geolib/models/dsheetpiling/internal.py +++ b/geolib/models/dsheetpiling/internal.py @@ -927,12 +927,6 @@ class DSheetPilingInputStructure(DSeriesStructure): sheet_piling: Union[str, SheetPiling] = SheetPiling() combined_wall: str = "" vertical_balance: VerticalBalance = VerticalBalance() - # vertical_balance: str = cleandoc( - # """ - # SheetPilingQcRep=0.000 - # SheetPilingXi=1.39 - # """ - # ) settlement_by_vibration_params: str = cleandoc( """ SheetPilingNumberOfPilesDrilled=2 From 119340ea85f5a3b6215ce6c538ae25c4faebf529 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 21 May 2024 05:57:50 +0000 Subject: [PATCH 08/16] --- updated-dependencies: - dependency-name: requests dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- poetry.lock | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/poetry.lock b/poetry.lock index 08328875..2c14b252 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1579,6 +1579,7 @@ files = [ {file = "PyYAML-6.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34"}, {file = "PyYAML-6.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28"}, {file = "PyYAML-6.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9"}, + {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a08c6f0fe150303c1c6b71ebcd7213c2858041a7e01975da3a99aed1e7a378ef"}, {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0"}, {file = "PyYAML-6.0.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4"}, {file = "PyYAML-6.0.1-cp312-cp312-win32.whl", hash = "sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54"}, @@ -1660,13 +1661,13 @@ sphinx = ">=4" [[package]] name = "requests" -version = "2.31.0" +version = "2.32.0" description = "Python HTTP for Humans." optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "requests-2.31.0-py3-none-any.whl", hash = "sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f"}, - {file = "requests-2.31.0.tar.gz", hash = "sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1"}, + {file = "requests-2.32.0-py3-none-any.whl", hash = "sha256:f2c3881dddb70d056c5bd7600a4fae312b2a300e39be6a118d30b90bd27262b5"}, + {file = "requests-2.32.0.tar.gz", hash = "sha256:fa5490319474c82ef1d2c9bc459d3652e3ae4ef4c4ebdd18a21145a47ca4b6b8"}, ] [package.dependencies] From 424e0b92774c14ef37aaa44b4d7685a3628296c5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Jun 2024 22:42:41 +0000 Subject: [PATCH 09/16] Bump urllib3 from 2.2.1 to 2.2.2 Bumps [urllib3](https://github.com/urllib3/urllib3) from 2.2.1 to 2.2.2. - [Release notes](https://github.com/urllib3/urllib3/releases) - [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst) - [Commits](https://github.com/urllib3/urllib3/compare/2.2.1...2.2.2) --- updated-dependencies: - dependency-name: urllib3 dependency-type: indirect ... Signed-off-by: dependabot[bot] --- poetry.lock | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/poetry.lock b/poetry.lock index 08328875..47e061b6 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1579,6 +1579,7 @@ files = [ {file = "PyYAML-6.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34"}, {file = "PyYAML-6.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28"}, {file = "PyYAML-6.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9"}, + {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a08c6f0fe150303c1c6b71ebcd7213c2858041a7e01975da3a99aed1e7a378ef"}, {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0"}, {file = "PyYAML-6.0.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4"}, {file = "PyYAML-6.0.1-cp312-cp312-win32.whl", hash = "sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54"}, @@ -2021,13 +2022,13 @@ files = [ [[package]] name = "urllib3" -version = "2.2.1" +version = "2.2.2" description = "HTTP library with thread-safe connection pooling, file post, and more." optional = false python-versions = ">=3.8" files = [ - {file = "urllib3-2.2.1-py3-none-any.whl", hash = "sha256:450b20ec296a467077128bff42b73080516e71b56ff59a60a02bef2232c4fa9d"}, - {file = "urllib3-2.2.1.tar.gz", hash = "sha256:d0570876c61ab9e520d776c38acbbb5b05a776d3f9ff98a5c8fd5162a444cf19"}, + {file = "urllib3-2.2.2-py3-none-any.whl", hash = "sha256:a448b2f64d686155468037e1ace9f2d2199776e17f0a46610480d311f73e3472"}, + {file = "urllib3-2.2.2.tar.gz", hash = "sha256:dd505485549a7a552833da5e6063639d0d177c04f23bc3864e41e5dc5f612168"}, ] [package.extras] From 1fbf2d31aa3c79e8295ba4069b6145c13b4c5651 Mon Sep 17 00:00:00 2001 From: KentropDevelopment Date: Fri, 19 Jul 2024 15:39:13 +0200 Subject: [PATCH 10/16] processed review comments --- tests/models/dsheetpiling/test_dsheetpiling_acceptance.py | 6 +++++- tests/models/dsheetpiling/test_dsheetpiling_model.py | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/models/dsheetpiling/test_dsheetpiling_acceptance.py b/tests/models/dsheetpiling/test_dsheetpiling_acceptance.py index d69e6b39..3c6f561c 100644 --- a/tests/models/dsheetpiling/test_dsheetpiling_acceptance.py +++ b/tests/models/dsheetpiling/test_dsheetpiling_acceptance.py @@ -34,7 +34,7 @@ Sheet, SheetPileModelPlasticCalculationProperties, SheetPileProperties, - WoodenSheetPileProperties, + WoodenSheetPileProperties, VerticalBalance, ) from geolib.models.dsheetpiling.dsheetpiling_model import ( DiaphragmModelType, @@ -198,6 +198,10 @@ def test_run_sheet_model_acceptance_different_calculation_types( top_level=level_top, elements=[sheet_element_1, sheet_element_2] ) + # Add vertical balance properties + vertical_balance = VerticalBalance(max_point_resistance=0.5, xi_factor=1.24) + model.set_vertical_balance(vertical_balance=vertical_balance) + # Add soil # Set clay material soil_clay = Soil(name="Clay", color=Color("green")) diff --git a/tests/models/dsheetpiling/test_dsheetpiling_model.py b/tests/models/dsheetpiling/test_dsheetpiling_model.py index ca36eb62..d0bbcaaa 100644 --- a/tests/models/dsheetpiling/test_dsheetpiling_model.py +++ b/tests/models/dsheetpiling/test_dsheetpiling_model.py @@ -910,7 +910,7 @@ def test_duplicate_loads(self, model: DSheetPilingModel): model.add_surcharge_load(load=testload, side=Side.LEFT, stage_id=0) @pytest.mark.unittest - def test_add_vertical_balance(self, model: DSheetPilingModel): + def test_set_vertical_balance(self, model: DSheetPilingModel): # Set up vertical balance vertical_balance = VerticalBalance(max_point_resistance=1, xi_factor=2) From 34724ffe2910567b97a9898168ff8a0c7ed74723 Mon Sep 17 00:00:00 2001 From: KentropDevelopment Date: Wed, 28 Aug 2024 08:02:58 +0200 Subject: [PATCH 11/16] consistency in imports --- tests/models/dsheetpiling/test_dsheetpiling_acceptance.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/models/dsheetpiling/test_dsheetpiling_acceptance.py b/tests/models/dsheetpiling/test_dsheetpiling_acceptance.py index 3c6f561c..600ac2f1 100644 --- a/tests/models/dsheetpiling/test_dsheetpiling_acceptance.py +++ b/tests/models/dsheetpiling/test_dsheetpiling_acceptance.py @@ -34,7 +34,8 @@ Sheet, SheetPileModelPlasticCalculationProperties, SheetPileProperties, - WoodenSheetPileProperties, VerticalBalance, + WoodenSheetPileProperties, + VerticalBalance, ) from geolib.models.dsheetpiling.dsheetpiling_model import ( DiaphragmModelType, From 217ef09c6390cf306933263a9713f92f1672ee0d Mon Sep 17 00:00:00 2001 From: KentropDevelopment Date: Wed, 28 Aug 2024 08:18:32 +0200 Subject: [PATCH 12/16] resolve merge conflict --- geolib/models/dsheetpiling/dsheetpiling_model.py | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/geolib/models/dsheetpiling/dsheetpiling_model.py b/geolib/models/dsheetpiling/dsheetpiling_model.py index 387c11ea..62d036e8 100644 --- a/geolib/models/dsheetpiling/dsheetpiling_model.py +++ b/geolib/models/dsheetpiling/dsheetpiling_model.py @@ -1,26 +1,17 @@ from abc import ABCMeta, abstractmethod from pathlib import Path -from subprocess import CompletedProcess, run from typing import Any, BinaryIO, List, Optional, Type, Union from pydantic import FilePath, PositiveFloat -from pydantic.types import confloat, conint from geolib._compat import IS_PYDANTIC_V2 -from geolib.geometry import Point -from geolib.models import BaseDataClass, BaseModel, BaseModelStructure -from geolib.models.dsheetpiling.constructions import ( - DiaphragmWall, - Pile, - Sheet, - VerticalBalance, -) +from geolib.models import BaseDataClass, BaseModel +from geolib.models.dsheetpiling.constructions import DiaphragmWall, Pile, Sheet, VerticalBalance from geolib.models.meta import CONSOLE_RUN_BATCH_FLAG from geolib.soils import Soil from .calculation_options import CalculationOptions, CalculationOptionsPerStage from .dsheetpiling_parserprovider import DSheetPilingParserProvider -from .internal import CalculationOptions as CalculationOptionsInternal from .internal import ( DSheetPilingDumpStructure, DSheetPilingOutputStructure, From fe4dbcc8bec9294406dbca107fe5736f4966661b Mon Sep 17 00:00:00 2001 From: KentropDevelopment Date: Wed, 28 Aug 2024 08:24:32 +0200 Subject: [PATCH 13/16] resolve merge conflict --- geolib/models/dsheetpiling/dsheetpiling_model.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/geolib/models/dsheetpiling/dsheetpiling_model.py b/geolib/models/dsheetpiling/dsheetpiling_model.py index 62d036e8..8b8f21af 100644 --- a/geolib/models/dsheetpiling/dsheetpiling_model.py +++ b/geolib/models/dsheetpiling/dsheetpiling_model.py @@ -1,10 +1,9 @@ from abc import ABCMeta, abstractmethod from pathlib import Path -from typing import Any, BinaryIO, List, Optional, Type, Union +from typing import BinaryIO, List, Optional, Type, Union from pydantic import FilePath, PositiveFloat -from geolib._compat import IS_PYDANTIC_V2 from geolib.models import BaseDataClass, BaseModel from geolib.models.dsheetpiling.constructions import DiaphragmWall, Pile, Sheet, VerticalBalance from geolib.models.meta import CONSOLE_RUN_BATCH_FLAG From 88d2720df24957c09170e9edc248c81e10528a39 Mon Sep 17 00:00:00 2001 From: KentropDevelopment Date: Wed, 28 Aug 2024 09:04:28 +0200 Subject: [PATCH 14/16] fix: pydantic update VerticalBalance --- geolib/models/dsheetpiling/internal.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/geolib/models/dsheetpiling/internal.py b/geolib/models/dsheetpiling/internal.py index b6404bf6..56f47cd9 100644 --- a/geolib/models/dsheetpiling/internal.py +++ b/geolib/models/dsheetpiling/internal.py @@ -427,12 +427,8 @@ class SheetPiling(DSeriesStructureCollection): class VerticalBalance(DSeriesInlineMappedProperties): - if IS_PYDANTIC_V2: - sheetpilingqcrep: Optional[Annotated[float, Field(ge=0)]] = 0.001 - sheetpilingxi: Optional[Annotated[float, Field(ge=0.1)]] = 1.39 - else: - sheetpilingqcrep: Optional[confloat(ge=0)] = 0.001 - sheetpilingxi: Optional[confloat(ge=0.1)] = 1.39 + sheetpilingqcrep: Optional[Annotated[float, Field(ge=0)]] = 0.001 + sheetpilingxi: Optional[Annotated[float, Field(ge=0.1)]] = 1.39 class Anchor(DSheetpilingTableEntry): From 9d772dd3adf5844daa39e5c3d7475ae8a7aa9f82 Mon Sep 17 00:00:00 2001 From: Peter-van-Tol Date: Fri, 29 Nov 2024 22:38:11 +0100 Subject: [PATCH 15/16] Serialize NaN --- geolib/models/base_data_class.py | 1 + 1 file changed, 1 insertion(+) diff --git a/geolib/models/base_data_class.py b/geolib/models/base_data_class.py index 0afad00b..2482f7f4 100644 --- a/geolib/models/base_data_class.py +++ b/geolib/models/base_data_class.py @@ -12,5 +12,6 @@ class BaseDataClass(BaseModel): validate_assignment=True, arbitrary_types_allowed=True, validate_default=True, + ser_json_inf_nan='constants', extra=settings.extra_fields, ) From 46299f968a34b66a20079a79f19e719fd64cd7f9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Dec 2024 10:52:00 +0000 Subject: [PATCH 16/16] chore(deps): bump python-multipart from 0.0.9 to 0.0.18 Bumps [python-multipart](https://github.com/Kludex/python-multipart) from 0.0.9 to 0.0.18. - [Release notes](https://github.com/Kludex/python-multipart/releases) - [Changelog](https://github.com/Kludex/python-multipart/blob/master/CHANGELOG.md) - [Commits](https://github.com/Kludex/python-multipart/compare/0.0.9...0.0.18) --- updated-dependencies: - dependency-name: python-multipart dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- poetry.lock | 13 +++++-------- pyproject.toml | 2 +- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/poetry.lock b/poetry.lock index e77ebd99..99ae4869 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. [[package]] name = "alabaster" @@ -1685,18 +1685,15 @@ cli = ["click (>=5.0)"] [[package]] name = "python-multipart" -version = "0.0.9" +version = "0.0.18" description = "A streaming multipart parser for Python" optional = false python-versions = ">=3.8" files = [ - {file = "python_multipart-0.0.9-py3-none-any.whl", hash = "sha256:97ca7b8ea7b05f977dc3849c3ba99d51689822fab725c3703af7c866a0c2b215"}, - {file = "python_multipart-0.0.9.tar.gz", hash = "sha256:03f54688c663f1b7977105f021043b0793151e4cb1c1a9d4a11fc13d622c4026"}, + {file = "python_multipart-0.0.18-py3-none-any.whl", hash = "sha256:efe91480f485f6a361427a541db4796f9e1591afc0fb8e7a4ba06bfbc6708996"}, + {file = "python_multipart-0.0.18.tar.gz", hash = "sha256:7a68db60c8bfb82e460637fa4750727b45af1d5e2ed215593f917f64694d34fe"}, ] -[package.extras] -dev = ["atomicwrites (==1.4.1)", "attrs (==23.2.0)", "coverage (==7.4.1)", "hatch", "invoke (==2.2.0)", "more-itertools (==10.2.0)", "pbr (==6.0.0)", "pluggy (==1.4.0)", "py (==1.11.0)", "pytest (==8.0.0)", "pytest-cov (==4.1.0)", "pytest-timeout (==2.2.0)", "pyyaml (==6.0.1)", "ruff (==0.2.1)"] - [[package]] name = "pyyaml" version = "6.0.2" @@ -2268,4 +2265,4 @@ server = ["fastapi", "httpx", "uvicorn"] [metadata] lock-version = "2.0" python-versions = ">=3.9,<3.13" -content-hash = "cfbc7080167899d10060e8576b2326aa7f274498f5cb7ca5f88bb8a9c225b114" +content-hash = "415eeb9a2dc9fbc5d43a33ff982259dcc7bad350c40e27866df896d87d84c58a" diff --git a/pyproject.toml b/pyproject.toml index ab0182f5..8de17671 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,7 +24,7 @@ python-dotenv = "^1.0.0" matplotlib = "^3.9.0" pydantic-settings = "^2.1.0" pydantic-extra-types = "^2.5.0" -python-multipart = "^0.0.9" +python-multipart = ">=0.0.9,<0.0.19" [tool.poetry.group.dev.dependencies] teamcity-messages = "^1.32"