Skip to content

Commit 3d223ea

Browse files
authored
Update CHANGES.md (#20)
Change the values for the SoundingClass and DPType enums. Update packages Bump version to 0.0.4
1 parent 32f694b commit 3d223ea

6 files changed

Lines changed: 47 additions & 39 deletions

File tree

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-02-27_
4+
5+
Version 0.0.4
6+
7+
- Add `borehole_name` to methods.
8+
- Change the values of the SoundingClass and DPType.
9+
310
_2025-02-17_
411

512
Version 0.0.3

poetry.lock

Lines changed: 28 additions & 28 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ exclude = '''
1515

1616
[tool.poetry]
1717
name = "sgf-parser"
18-
version = "0.0.3"
18+
version = "0.0.4"
1919
description = "Parser for the Swedish Geotechnical Society / Svenska Geotekniska Föreningen (SGF) data format"
2020
license = "MIT"
2121
authors = ["Jostein Leira <jostein@leira.net>"]

src/sgf_parser/models/method.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,7 @@ def stopcode(self) -> int | None:
422422

423423
location_name: str | None = Field(None, alias="KP")
424424
project_number: str | None = Field(None, alias="HJ")
425+
borehole_name: str | None = Field(None, alias="HK", description="Investigation point/Borehole name")
425426
method_type_string: str | None = Field(None, alias="HM")
426427

427428
# HX, HY, HZ

src/sgf_parser/models/method_dp.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,13 @@ def set_operation(cls, data: Any) -> Any:
6969
if isinstance(data, dict):
7070
if "HM" in data and data["HM"] is not None:
7171
data["type"] = {
72-
"8": DPType.DPSH_A,
73-
"108A": DPType.DPSH_A,
72+
"8": DPType.DPSHA,
73+
"108A": DPType.DPSHA,
7474
"108B": DPType.DPL,
7575
"108C": DPType.DPM,
7676
"108D": DPType.DPH,
77-
"9": DPType.DPSH_B,
78-
"108E": DPType.DPSH_B,
77+
"9": DPType.DPSHB,
78+
"108E": DPType.DPSHB,
7979
}[data["HM"]]
8080

8181
return data

src/sgf_parser/models/types.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,10 @@ class SoundingClass(enum.StrEnum):
121121
)
122122
"""
123123

124-
JB1 = "Jb-1"
125-
JB2 = "Jb-2"
126-
JB3 = "Jb-3"
127-
JBTOT = "Jb-tot"
124+
JB1 = "JB1"
125+
JB2 = "JB2"
126+
JB3 = "JB3"
127+
JBTOT = "JBTOT"
128128

129129

130130
class Operation(enum.StrEnum):
@@ -142,8 +142,8 @@ class DPType(enum.StrEnum):
142142
143143
"""
144144

145-
DPSH_A = "DPSH-A"
145+
DPSHA = "DPSHA"
146146
DPL = "DPL"
147147
DPM = "DPM"
148148
DPH = "DPH"
149-
DPSH_B = "DPSH-B"
149+
DPSHB = "DPSHB"

0 commit comments

Comments
 (0)