Skip to content

Commit 44df7c4

Browse files
committed
- Rename the attribute load to penetration force for WST and SLB.
- Update packages - Bump version to 0.0.11
1 parent 2394c25 commit 44df7c4

File tree

6 files changed

+132
-71
lines changed

6 files changed

+132
-71
lines changed

CHANGES.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# NGI Python SGF Parser Package
22

3+
_2025-12-02_
4+
5+
Version 0.0.11
6+
7+
- Change the attribute name `load` to `penetration_force` for the Weight Sounding Test (WST)
8+
and the Swedish Impact sounding / Slagsondering (Slb) method data.
9+
310
_2025-11-27_
411

512
Version 0.0.10

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "sgf-parser"
3-
version = "0.0.10"
3+
version = "0.0.11"
44
description = "Parser for the Swedish Geotechnical Society / Svenska Geotekniska Föreningen (SGF) data format"
55
authors = [{ name = "Jostein Leira", email = "[email protected]" }]
66
requires-python = ">=3.11,<4"

src/sgf_parser/models/method_slb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def __init__(self, **kwargs):
1616

1717
depth: Decimal | None = Field(None, alias="D", description="Depth (m)")
1818
penetration_rate: Decimal | None = Field(None, alias="B", description="Penetration rate (mm/s)")
19-
load: Decimal | None = Field(None, description="Load (kN)", validation_alias=AliasChoices("W", "A"))
19+
penetration_force: Decimal | None = Field(None, description="Load (kN)", validation_alias=AliasChoices("W", "A"))
2020

2121

2222
class MethodSLB(Method):

src/sgf_parser/models/method_wst.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def __init__(self, **kwargs):
1717

1818
depth: Decimal = Field(..., alias="D", description="Depth (m)")
1919
turning: Decimal = Field(..., alias="H", description="Turning (half revolution/0.2 m)")
20-
load: Decimal | None = Field(None, description="Load (kN)", validation_alias=AliasChoices("W", "A"))
20+
penetration_force: Decimal | None = Field(None, description="Load (kN)", validation_alias=AliasChoices("W", "A"))
2121
penetration_rate: Decimal | None = Field(None, alias="B", description="Penetration rate (mm/s)")
2222

2323
hammering: bool | None = Field(None, alias="AP")

tests/integration/test_parse.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -509,20 +509,20 @@ def test_return_one_method_one_placeholder(
509509
"tests/data/wst-test-1.vim", 65, Decimal("0.025"), Decimal("1.625"),
510510
datetime(2022, 11, 1, 11, 7,5),
511511
{
512-
# penetration rate=B, hammering=AP, load=W, turning=H, rotation_rate=R
512+
# penetration rate=B, hammering=AP, penetration_force=W, turning=H, rotation_rate=R
513513
Decimal("0.025"): {"comment_code": None, "remarks": None, "penetration_rate": Decimal("0.3"), "hammering": False, "rotation_rate":Decimal("0")},
514-
Decimal("0.350"): {"penetration_rate": Decimal("2.2"), "hammering": False, "rotation_rate": Decimal("0"), "load": Decimal("-0.796"), "turning": Decimal("0")},
515-
Decimal("0.375"): {"penetration_rate": Decimal("0.2"), "hammering": False, "rotation_rate": Decimal("0"), "load": Decimal("1.02"), "turning": Decimal("1112")},
514+
Decimal("0.350"): {"penetration_rate": Decimal("2.2"), "hammering": False, "rotation_rate": Decimal("0"), "penetration_force": Decimal("-0.796"), "turning": Decimal("0")},
515+
Decimal("0.375"): {"penetration_rate": Decimal("0.2"), "hammering": False, "rotation_rate": Decimal("0"), "penetration_force": Decimal("1.02"), "turning": Decimal("1112")},
516516
},
517517
),
518518
(
519519
"tests/data/wst-test-2.vim", 7, Decimal("3.625"), Decimal("3.775"),
520520
datetime(2018, 11, 20, 10, 50,21),
521521
{
522-
# load=A, hammering=AP, load=W, turning=H, rotation_rate=R
523-
Decimal("3.625"): {"load":Decimal("1.020"), "turning":Decimal("152"), "penetration_rate": Decimal("154.208"), "comment_code": None, "remarks": None, "hammering": False},
524-
Decimal("3.700"): {"load": Decimal("1.020"), "turning": Decimal("24"), "penetration_rate": Decimal("10.287"), "hammering": False,},
525-
Decimal("3.775"): {"load": Decimal("5.681"), "turning": Decimal("24"), "penetration_rate": Decimal("1.506"), "hammering": False, "comment_code": 91, "remarks": "Sond kan ej drivas normalt"},
522+
# penetration_force=A, hammering=AP, penetration_force=W, turning=H, rotation_rate=R
523+
Decimal("3.625"): {"penetration_force":Decimal("1.020"), "turning":Decimal("152"), "penetration_rate": Decimal("154.208"), "comment_code": None, "remarks": None, "hammering": False},
524+
Decimal("3.700"): {"penetration_force": Decimal("1.020"), "turning": Decimal("24"), "penetration_rate": Decimal("10.287"), "hammering": False,},
525+
Decimal("3.775"): {"penetration_force": Decimal("5.681"), "turning": Decimal("24"), "penetration_rate": Decimal("1.506"), "hammering": False, "comment_code": 91, "remarks": "Sond kan ej drivas normalt"},
526526
},
527527
),
528528
),

0 commit comments

Comments
 (0)