geolysis 0.7.2__py3-none-any.whl → 0.8.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- geolysis/__init__.py +1 -1
- geolysis/bearing_capacity/abc/cohl/__init__.py +12 -11
- geolysis/bearing_capacity/abc/cohl/_core.py +2 -1
- geolysis/bearing_capacity/ubc/__init__.py +7 -6
- geolysis/bearing_capacity/ubc/terzaghi_ubc.py +1 -1
- geolysis/foundation.py +14 -9
- geolysis/soil_classifier.py +11 -8
- geolysis/spt.py +39 -10
- geolysis/utils/exceptions.py +35 -19
- geolysis/utils/validators.py +93 -65
- {geolysis-0.7.2.dist-info → geolysis-0.8.0.dist-info}/METADATA +1 -2
- geolysis-0.8.0.dist-info/RECORD +24 -0
- {geolysis-0.7.2.dist-info → geolysis-0.8.0.dist-info}/WHEEL +1 -1
- geolysis-0.7.2.dist-info/RECORD +0 -24
- {geolysis-0.7.2.dist-info → geolysis-0.8.0.dist-info}/licenses/LICENSE.txt +0 -0
- {geolysis-0.7.2.dist-info → geolysis-0.8.0.dist-info}/top_level.txt +0 -0
geolysis/__init__.py
CHANGED
@@ -3,12 +3,11 @@ allowable bearing capacity calculations using methods like Bowles, Meyerhof,
|
|
3
3
|
and Terzaghi for various foundation types and shapes.
|
4
4
|
"""
|
5
5
|
import enum
|
6
|
-
from codecs import backslashreplace_errors
|
7
6
|
from typing import Optional
|
8
7
|
|
9
8
|
from geolysis.foundation import FoundationType, Shape, create_foundation
|
10
9
|
from geolysis.utils import enum_repr, inf
|
11
|
-
from geolysis.utils.exceptions import
|
10
|
+
from geolysis.utils.exceptions import ErrorMsg, ValidationError
|
12
11
|
|
13
12
|
from ._core import AllowableBearingCapacity
|
14
13
|
from .bowles_abc import BowlesABC4MatFoundation, BowlesABC4PadFoundation
|
@@ -99,25 +98,27 @@ def create_allowable_bearing_capacity(corrected_spt_n_value: float,
|
|
99
98
|
:raises ValueError: Raised if an invalid footing ``shape`` is provided.
|
100
99
|
"""
|
101
100
|
|
102
|
-
msg =
|
103
|
-
|
104
|
-
|
101
|
+
msg = ErrorMsg(param_name="abc_type",
|
102
|
+
param_value=abc_type,
|
103
|
+
symbol="in",
|
104
|
+
param_value_bound=list(ABCType))
|
105
105
|
|
106
106
|
if abc_type is None:
|
107
|
-
raise
|
107
|
+
raise ValidationError(msg)
|
108
108
|
|
109
109
|
try:
|
110
110
|
abc_type = ABCType(str(abc_type).casefold())
|
111
111
|
except ValueError as e:
|
112
|
-
raise
|
112
|
+
raise ValidationError(msg) from e
|
113
113
|
|
114
114
|
try:
|
115
115
|
foundation_type = FoundationType(str(foundation_type).casefold())
|
116
116
|
except ValueError as e:
|
117
|
-
msg =
|
118
|
-
|
119
|
-
|
120
|
-
|
117
|
+
msg = ErrorMsg(param_name="foundation_type",
|
118
|
+
param_value=foundation_type,
|
119
|
+
symbol="in",
|
120
|
+
param_value_bound=list(FoundationType))
|
121
|
+
raise ValidationError(msg) from e
|
121
122
|
|
122
123
|
# exception from create_foundation will automaatically propagate
|
123
124
|
# no need to catch and handle it.
|
@@ -1,7 +1,8 @@
|
|
1
1
|
from abc import ABC, abstractmethod
|
2
2
|
|
3
3
|
from geolysis.foundation import FoundationSize
|
4
|
-
from geolysis.utils import
|
4
|
+
from geolysis.utils import exceptions as exc
|
5
|
+
from geolysis.utils import validators
|
5
6
|
|
6
7
|
|
7
8
|
class AllowableBearingCapacity(ABC):
|
@@ -8,7 +8,7 @@ from typing import Optional
|
|
8
8
|
|
9
9
|
from geolysis.foundation import Shape, create_foundation
|
10
10
|
from geolysis.utils import enum_repr
|
11
|
-
from geolysis.utils.exceptions import
|
11
|
+
from geolysis.utils.exceptions import ErrorMsg, ValidationError
|
12
12
|
|
13
13
|
from ._core import UltimateBearingCapacity
|
14
14
|
from .hansen_ubc import HansenUltimateBearingCapacity
|
@@ -116,17 +116,18 @@ def create_ultimate_bearing_capacity(friction_angle: float,
|
|
116
116
|
:raises ValueError: Raised if an invalid footing shape is provided.
|
117
117
|
"""
|
118
118
|
|
119
|
-
msg =
|
120
|
-
|
121
|
-
|
119
|
+
msg = ErrorMsg(param_name="ubc_type",
|
120
|
+
param_value=ubc_type,
|
121
|
+
symbol="in",
|
122
|
+
param_value_bound=list(UBCType))
|
122
123
|
|
123
124
|
if ubc_type is None:
|
124
|
-
raise
|
125
|
+
raise ValidationError(msg)
|
125
126
|
|
126
127
|
try:
|
127
128
|
ubc_type = UBCType(str(ubc_type).casefold())
|
128
129
|
except ValueError as e:
|
129
|
-
raise
|
130
|
+
raise ValidationError(msg) from e
|
130
131
|
|
131
132
|
# exception from create_foundation will automatically propagate
|
132
133
|
# no need to catch and handle it.
|
geolysis/foundation.py
CHANGED
@@ -5,7 +5,7 @@ from abc import ABC, abstractmethod
|
|
5
5
|
from typing import Optional, TypeVar
|
6
6
|
|
7
7
|
from .utils import enum_repr, inf, isclose, validators
|
8
|
-
from .utils.exceptions import
|
8
|
+
from .utils.exceptions import ErrorMsg, ValidationError
|
9
9
|
|
10
10
|
__all__ = ["create_foundation",
|
11
11
|
"FoundationSize",
|
@@ -31,8 +31,10 @@ class Shape(enum.StrEnum):
|
|
31
31
|
@enum_repr
|
32
32
|
class FoundationType(enum.StrEnum):
|
33
33
|
"""Enumeration of foundation types."""
|
34
|
-
PAD =
|
35
|
-
|
34
|
+
PAD = enum.auto()
|
35
|
+
ISOLATED = PAD
|
36
|
+
MAT = enum.auto()
|
37
|
+
RAFT = MAT
|
36
38
|
|
37
39
|
|
38
40
|
class FootingSize(ABC):
|
@@ -376,10 +378,11 @@ def create_foundation(depth: float,
|
|
376
378
|
try:
|
377
379
|
shape = Shape(str(shape).casefold())
|
378
380
|
except ValueError as e:
|
379
|
-
msg =
|
380
|
-
|
381
|
-
|
382
|
-
|
381
|
+
msg = ErrorMsg(param_name="shape",
|
382
|
+
param_value=shape,
|
383
|
+
symbol="in",
|
384
|
+
param_value_bound=list(Shape))
|
385
|
+
raise ValidationError(msg) from e
|
383
386
|
|
384
387
|
if shape is Shape.STRIP:
|
385
388
|
footing_size = StripFooting(width=width)
|
@@ -389,8 +392,10 @@ def create_foundation(depth: float,
|
|
389
392
|
footing_size = CircularFooting(diameter=width)
|
390
393
|
else: # RECTANGLE
|
391
394
|
if not length:
|
392
|
-
msg = ErrorMsg(
|
393
|
-
|
395
|
+
msg = ErrorMsg(param_name="length",
|
396
|
+
param_value=length,
|
397
|
+
msg="Length of footing must be provided.")
|
398
|
+
raise ValidationError(msg)
|
394
399
|
footing_size = RectangularFooting(width=width, length=length)
|
395
400
|
|
396
401
|
return FoundationSize(depth=depth,
|
geolysis/soil_classifier.py
CHANGED
@@ -5,7 +5,7 @@ import enum
|
|
5
5
|
from typing import NamedTuple, Optional, Sequence
|
6
6
|
|
7
7
|
from .utils import enum_repr, isclose, round_, validators
|
8
|
-
from .utils.exceptions import
|
8
|
+
from .utils.exceptions import ErrorMsg, ValidationError
|
9
9
|
|
10
10
|
__all__ = ["ClfType",
|
11
11
|
"AtterbergLimits",
|
@@ -713,17 +713,18 @@ def create_soil_classifier(liquid_limit: float,
|
|
713
713
|
:raises ValueError: Raises ValueError if ``sand`` is not provided for
|
714
714
|
:class:`USCS` classification.
|
715
715
|
"""
|
716
|
-
msg =
|
717
|
-
|
718
|
-
|
716
|
+
msg = ErrorMsg(param_name="clf_type",
|
717
|
+
param_value=clf_type,
|
718
|
+
symbol="in",
|
719
|
+
param_value_bound=list(ClfType))
|
719
720
|
|
720
721
|
if clf_type is None:
|
721
|
-
raise
|
722
|
+
raise ValidationError(msg)
|
722
723
|
|
723
724
|
try:
|
724
725
|
clf_type = ClfType(str(clf_type).casefold())
|
725
726
|
except ValueError as e:
|
726
|
-
raise
|
727
|
+
raise ValidationError(msg) from e
|
727
728
|
|
728
729
|
atterberg_lmts = AtterbergLimits(liquid_limit=liquid_limit,
|
729
730
|
plastic_limit=plastic_limit)
|
@@ -736,8 +737,10 @@ def create_soil_classifier(liquid_limit: float,
|
|
736
737
|
|
737
738
|
# USCS classification
|
738
739
|
if not sand:
|
739
|
-
msg = ErrorMsg("sand
|
740
|
-
|
740
|
+
msg = ErrorMsg(param_name="sand",
|
741
|
+
param_value=sand,
|
742
|
+
msg="sand must be specified for USCS classification")
|
743
|
+
raise ValidationError(msg)
|
741
744
|
|
742
745
|
psd = PSD(fines=fines, sand=sand, d_10=d_10, d_30=d_30, d_60=d_60)
|
743
746
|
clf = USCS(atterberg_limits=atterberg_lmts, psd=psd, organic=organic)
|
geolysis/spt.py
CHANGED
@@ -4,10 +4,10 @@ as well as calculating design N-values.
|
|
4
4
|
"""
|
5
5
|
import enum
|
6
6
|
from abc import abstractmethod
|
7
|
-
from typing import Final,
|
7
|
+
from typing import Final, Literal, Sequence
|
8
8
|
|
9
9
|
from .utils import enum_repr, isclose, log10, mean, round_, sqrt, validators
|
10
|
-
from .utils.exceptions import
|
10
|
+
from .utils.exceptions import ErrorMsg, ValidationError
|
11
11
|
|
12
12
|
__all__ = ["SPTNDesign",
|
13
13
|
"HammerType",
|
@@ -51,10 +51,21 @@ class SPTNDesign:
|
|
51
51
|
return self._corrected_spt_n_values
|
52
52
|
|
53
53
|
@corrected_spt_n_values.setter
|
54
|
+
@validators.le(100.0)
|
55
|
+
@validators.gt(0.0)
|
54
56
|
@validators.min_len(1)
|
55
57
|
def corrected_spt_n_values(self, val: Sequence[float]) -> None:
|
56
58
|
self._corrected_spt_n_values = val
|
57
59
|
|
60
|
+
@property
|
61
|
+
def method(self):
|
62
|
+
return self._method
|
63
|
+
|
64
|
+
@method.setter
|
65
|
+
@validators.in_(("min", "avg", "wgt"))
|
66
|
+
def method(self, val: str) -> None:
|
67
|
+
self._method = val
|
68
|
+
|
58
69
|
@staticmethod
|
59
70
|
def _avg_spt_n_design(vals) -> float:
|
60
71
|
return mean(vals)
|
@@ -101,11 +112,8 @@ class SPTNDesign:
|
|
101
112
|
return self._min_spt_n_design(self.corrected_spt_n_values)
|
102
113
|
elif self.method == "avg":
|
103
114
|
return self._avg_spt_n_design(self.corrected_spt_n_values)
|
104
|
-
|
115
|
+
else: # method="wgt"
|
105
116
|
return self._wgt_spt_n_design(self.corrected_spt_n_values)
|
106
|
-
else:
|
107
|
-
msg = ErrorMsg("method must be 'min', 'avg', or 'wgt'")
|
108
|
-
raise ValueError(msg)
|
109
117
|
|
110
118
|
|
111
119
|
@enum_repr
|
@@ -223,6 +231,24 @@ class EnergyCorrection:
|
|
223
231
|
def rod_length(self, val: float) -> None:
|
224
232
|
self._rod_length = val
|
225
233
|
|
234
|
+
@property
|
235
|
+
def hammer_type(self) -> HammerType:
|
236
|
+
return self._hammer_type
|
237
|
+
|
238
|
+
@hammer_type.setter
|
239
|
+
@validators.in_(tuple(HammerType))
|
240
|
+
def hammer_type(self, val: HammerType) -> None:
|
241
|
+
self._hammer_type = val
|
242
|
+
|
243
|
+
@property
|
244
|
+
def sampler_type(self) -> SamplerType:
|
245
|
+
return self._sampler_type
|
246
|
+
|
247
|
+
@sampler_type.setter
|
248
|
+
@validators.in_(tuple(SamplerType))
|
249
|
+
def sampler_type(self, val: SamplerType) -> None:
|
250
|
+
self._sampler_type = val
|
251
|
+
|
226
252
|
@property
|
227
253
|
def hammer_efficiency(self) -> float:
|
228
254
|
"""Hammer efficiency correction factor."""
|
@@ -300,6 +326,7 @@ class OPC:
|
|
300
326
|
return self._std_spt_n_value
|
301
327
|
|
302
328
|
@std_spt_n_value.setter
|
329
|
+
@validators.le(100)
|
303
330
|
@validators.gt(0.0)
|
304
331
|
def std_spt_n_value(self, val: float) -> None:
|
305
332
|
self._std_spt_n_value = val
|
@@ -494,6 +521,7 @@ class DilatancyCorrection:
|
|
494
521
|
return self._corr_spt_n_value
|
495
522
|
|
496
523
|
@corr_spt_n_value.setter
|
524
|
+
@validators.le(100.0)
|
497
525
|
@validators.gt(0.0)
|
498
526
|
def corr_spt_n_value(self, val: float) -> None:
|
499
527
|
self._corr_spt_n_value = val
|
@@ -552,10 +580,11 @@ def create_overburden_pressure_correction(std_spt_n_value: float, eop,
|
|
552
580
|
try:
|
553
581
|
opc_type = OPCType(str(opc_type).casefold())
|
554
582
|
except ValueError as e:
|
555
|
-
msg =
|
556
|
-
|
557
|
-
|
558
|
-
|
583
|
+
msg = ErrorMsg(param_name="opc_type",
|
584
|
+
param_value=opc_type,
|
585
|
+
symbol="in",
|
586
|
+
param_value_bound=list(OPCType))
|
587
|
+
raise ValidationError(msg) from e
|
559
588
|
|
560
589
|
opc_class = _opctypes[opc_type]
|
561
590
|
opc_corr = opc_class(std_spt_n_value=std_spt_n_value, eop=eop)
|
geolysis/utils/exceptions.py
CHANGED
@@ -1,36 +1,52 @@
|
|
1
|
-
from
|
1
|
+
from collections import UserString
|
2
|
+
from typing import Any
|
2
3
|
|
3
4
|
|
4
|
-
class
|
5
|
-
param_name:
|
6
|
-
|
7
|
-
|
5
|
+
class _ErrorMsg(UserString):
|
6
|
+
def __init__(self, param_name: str = None,
|
7
|
+
param_value: Any = None,
|
8
|
+
symbol: str = None,
|
9
|
+
param_value_bound: Any = None,
|
10
|
+
msg: str = None):
|
11
|
+
if not msg:
|
12
|
+
msg = f"{param_name}: {param_value!r} must be {symbol} {param_value_bound}"
|
8
13
|
|
14
|
+
self.param_name = param_name
|
15
|
+
self.param_value = param_value
|
16
|
+
self.symbol = symbol
|
17
|
+
self.param_value_bound = param_value_bound
|
18
|
+
self.msg = msg
|
9
19
|
|
10
|
-
|
20
|
+
super().__init__(msg)
|
11
21
|
|
12
|
-
|
13
|
-
|
14
|
-
|
22
|
+
def __add__(self, other):
|
23
|
+
if isinstance(other, str):
|
24
|
+
self.data = self.data + other
|
25
|
+
self.msg = self.data
|
26
|
+
return self
|
27
|
+
return NotImplemented
|
15
28
|
|
29
|
+
def __radd__(self, other):
|
30
|
+
if isinstance(other, str):
|
31
|
+
self.data = other + self.data
|
32
|
+
self.msg = self.data
|
33
|
+
return self
|
34
|
+
return NotImplemented
|
16
35
|
|
17
|
-
class EnumErrorMsg(ErrorMsg):
|
18
36
|
|
19
|
-
|
20
|
-
|
21
|
-
**kwargs: Unpack[_ErrorParams]):
|
22
|
-
err_msg = msg if msg else (
|
23
|
-
f"Invalid value for {kwargs['param_name']}: {kwargs['param_value']}, "
|
24
|
-
f"Supported types are: {list(kwargs['param_type'])}")
|
25
|
-
|
26
|
-
return super().__new__(cls, err_msg)
|
37
|
+
class ErrorMsg(_ErrorMsg):
|
38
|
+
pass
|
27
39
|
|
28
40
|
|
29
41
|
class ValidationError(ValueError):
|
30
42
|
"""Exception raised when a validation error occurs."""
|
31
43
|
|
44
|
+
def __init__(self, error: ErrorMsg):
|
45
|
+
super().__init__(error)
|
46
|
+
self.error = error
|
47
|
+
|
32
48
|
|
33
|
-
class SettlementError(
|
49
|
+
class SettlementError(ValidationError):
|
34
50
|
"""Raised when tolerable settlement is greater than the maximum
|
35
51
|
allowable settlement.
|
36
52
|
"""
|
geolysis/utils/validators.py
CHANGED
@@ -1,101 +1,129 @@
|
|
1
1
|
"""validators"""
|
2
2
|
import operator
|
3
|
-
from typing import Callable, TypeAlias, Optional
|
4
3
|
from functools import wraps
|
4
|
+
from typing import Any, Callable, Iterable, TypeAlias
|
5
5
|
|
6
|
-
from .exceptions import ValidationError
|
6
|
+
from .exceptions import ErrorMsg, ValidationError
|
7
7
|
|
8
8
|
Number: TypeAlias = int | float
|
9
9
|
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
11
|
+
class _Validator:
|
12
|
+
|
13
|
+
def __init__(self, bound: Any, /, *,
|
14
|
+
symbol: str,
|
15
|
+
func: Callable,
|
16
|
+
exc_type: Callable,
|
17
|
+
err_msg: str):
|
18
|
+
"""
|
19
|
+
|
20
|
+
"""
|
21
|
+
self.bound = bound
|
22
|
+
self.symbol = symbol
|
23
|
+
self.func = func
|
24
|
+
self.exc_type = exc_type
|
25
|
+
self.err_msg = err_msg
|
26
|
+
|
27
|
+
|
28
|
+
class _NumValidator(_Validator):
|
29
|
+
|
30
|
+
def _check_val(self, v: Number, fname: str):
|
31
|
+
if not self.func(v, self.bound):
|
32
|
+
msg = ErrorMsg(msg=self.err_msg,
|
33
|
+
param_name=fname,
|
34
|
+
param_value=v,
|
35
|
+
symbol=self.symbol,
|
36
|
+
param_value_bound=self.bound)
|
37
|
+
raise self.exc_type(msg)
|
38
|
+
|
39
|
+
def __call__(self, fn):
|
17
40
|
@wraps(fn)
|
18
41
|
def wrapper(obj, val):
|
19
|
-
if
|
20
|
-
|
21
|
-
|
42
|
+
if isinstance(val, Iterable):
|
43
|
+
for v in val:
|
44
|
+
self._check_val(v, fn.__name__)
|
45
|
+
else:
|
46
|
+
self._check_val(val, fn.__name__)
|
47
|
+
|
22
48
|
fn(obj, val)
|
23
49
|
|
24
50
|
return wrapper
|
25
51
|
|
26
|
-
return dec
|
27
52
|
|
53
|
+
class _LenValidator(_Validator):
|
54
|
+
def _check_val(self, v: Iterable[Any], fname: str):
|
55
|
+
if not self.func(len(v), self.bound):
|
56
|
+
msg = ErrorMsg(msg=self.err_msg,
|
57
|
+
param_name=fname,
|
58
|
+
param_value=v,
|
59
|
+
symbol=self.symbol,
|
60
|
+
param_value_bound=self.bound)
|
61
|
+
msg = "Length of " + msg
|
62
|
+
raise self.exc_type(msg)
|
28
63
|
|
29
|
-
def
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
64
|
+
def __call__(self, fn):
|
65
|
+
@wraps(fn)
|
66
|
+
def wrapper(obj, val: Iterable):
|
67
|
+
self._check_val(val, fn.__name__)
|
68
|
+
fn(obj, val)
|
69
|
+
|
70
|
+
return wrapper
|
71
|
+
|
72
|
+
|
73
|
+
class _InValidator(_Validator):
|
74
|
+
def _check_val(self, v, fname):
|
75
|
+
if not self.func(self.bound, v):
|
76
|
+
msg = ErrorMsg(msg=self.err_msg,
|
77
|
+
param_name=fname,
|
78
|
+
param_value=v,
|
79
|
+
symbol=self.symbol,
|
80
|
+
param_value_bound=self.bound)
|
81
|
+
raise self.exc_type(msg)
|
82
|
+
|
83
|
+
def __call__(self, fn):
|
35
84
|
@wraps(fn)
|
36
85
|
def wrapper(obj, val):
|
37
|
-
|
38
|
-
if not compare_fn(_len, bound):
|
39
|
-
msg = f"Length of '{fn.__name__}' must be {compare_symbol} {bound}"
|
40
|
-
raise exc_type(err_msg if err_msg else msg)
|
86
|
+
self._check_val(val, fn.__name__)
|
41
87
|
fn(obj, val)
|
42
88
|
|
43
89
|
return wrapper
|
44
90
|
|
45
|
-
|
91
|
+
|
92
|
+
def in_(val: Iterable[Any], /, *, exc_type=ValidationError, err_msg=None):
|
93
|
+
return _InValidator(val, symbol="in", func=operator.contains,
|
94
|
+
exc_type=exc_type, err_msg=err_msg)
|
46
95
|
|
47
96
|
|
48
|
-
def min_len(
|
49
|
-
|
50
|
-
|
51
|
-
return _len_validator(m_len, compare_symbol=">=",
|
52
|
-
compare_fn=operator.ge,
|
53
|
-
exc_type=exc_type, err_msg=err_msg)
|
97
|
+
def min_len(val: int, /, *, exc_type=ValidationError, err_msg=None):
|
98
|
+
return _LenValidator(val, symbol=">=", func=operator.ge,
|
99
|
+
exc_type=exc_type, err_msg=err_msg)
|
54
100
|
|
55
101
|
|
56
|
-
def lt(val: Number, /, *, exc_type=ValidationError,
|
57
|
-
|
58
|
-
|
59
|
-
compare_fn=operator.lt,
|
60
|
-
exc_type=exc_type,
|
61
|
-
err_msg=err_msg)
|
102
|
+
def lt(val: Number, /, *, exc_type=ValidationError, err_msg=None):
|
103
|
+
return _NumValidator(val, symbol="<", func=operator.lt,
|
104
|
+
exc_type=exc_type, err_msg=err_msg)
|
62
105
|
|
63
106
|
|
64
|
-
def le(val: Number, /, *, exc_type=ValidationError,
|
65
|
-
|
66
|
-
|
67
|
-
compare_fn=operator.le,
|
68
|
-
exc_type=exc_type,
|
69
|
-
err_msg=err_msg)
|
107
|
+
def le(val: Number, /, *, exc_type=ValidationError, err_msg=None):
|
108
|
+
return _NumValidator(val, symbol="<=", func=operator.le,
|
109
|
+
exc_type=exc_type, err_msg=err_msg)
|
70
110
|
|
71
111
|
|
72
|
-
def eq(val: Number, /, *, exc_type=ValidationError,
|
73
|
-
|
74
|
-
|
75
|
-
compare_fn=operator.eq,
|
76
|
-
exc_type=exc_type,
|
77
|
-
err_msg=err_msg)
|
112
|
+
def eq(val: Number, /, *, exc_type=ValidationError, err_msg=None):
|
113
|
+
return _NumValidator(val, symbol="==", func=operator.eq,
|
114
|
+
exc_type=exc_type, err_msg=err_msg)
|
78
115
|
|
79
116
|
|
80
|
-
def ne(val: Number, /, *, exc_type=ValidationError,
|
81
|
-
|
82
|
-
|
83
|
-
compare_fn=operator.ne,
|
84
|
-
exc_type=exc_type,
|
85
|
-
err_msg=err_msg)
|
117
|
+
def ne(val: Number, /, *, exc_type=ValidationError, err_msg=None):
|
118
|
+
return _NumValidator(val, symbol="!=", func=operator.ne,
|
119
|
+
exc_type=exc_type, err_msg=err_msg)
|
86
120
|
|
87
121
|
|
88
|
-
def ge(val: Number, /, *, exc_type=ValidationError,
|
89
|
-
|
90
|
-
|
91
|
-
compare_fn=operator.ge,
|
92
|
-
exc_type=exc_type,
|
93
|
-
err_msg=err_msg)
|
122
|
+
def ge(val: Number, /, *, exc_type=ValidationError, err_msg=None):
|
123
|
+
return _NumValidator(val, symbol=">=", func=operator.ge,
|
124
|
+
exc_type=exc_type, err_msg=err_msg)
|
94
125
|
|
95
126
|
|
96
|
-
def gt(val: Number, /, *, exc_type=ValidationError,
|
97
|
-
|
98
|
-
|
99
|
-
compare_fn=operator.gt,
|
100
|
-
exc_type=exc_type,
|
101
|
-
err_msg=err_msg)
|
127
|
+
def gt(val: Number, /, *, exc_type=ValidationError, err_msg=None):
|
128
|
+
return _NumValidator(val, symbol=">", func=operator.gt,
|
129
|
+
exc_type=exc_type, err_msg=err_msg)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: geolysis
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.8.0
|
4
4
|
Summary: geolysis is an opensource software for geotechnical engineering analysis and modeling.
|
5
5
|
Author-email: Patrick Boateng <boatengpato.pb@gmail.com>
|
6
6
|
License: MIT License
|
@@ -134,7 +134,6 @@ Here are brief descriptions of the `geolysis` projects:
|
|
134
134
|
|
135
135
|
- [Installation](#installation)
|
136
136
|
- [Usage Example](#usage-example)
|
137
|
-
- [Features](#features)
|
138
137
|
- [Documentation](#documentation)
|
139
138
|
- [Contributing](#contributing)
|
140
139
|
- [License](#license)
|
@@ -0,0 +1,24 @@
|
|
1
|
+
geolysis/__init__.py,sha256=bn4Oh6O9s3McKkLWpVE_XT6DYNMWK-aqLHviet6uFoY,122
|
2
|
+
geolysis/foundation.py,sha256=jo6jBP1V4WZRgJOkgR_MI4b3c1AgCeBq246bCZJxTCc,11856
|
3
|
+
geolysis/soil_classifier.py,sha256=4wEZo3E2CvJt7WQh2V3KMjPvbqoyWeFkb_kCgQtR85Q,27018
|
4
|
+
geolysis/spt.py,sha256=ix0kHhOXeaIRhfqxq3CTueDpLRlPCfeSz8KyqQSwF8k,18208
|
5
|
+
geolysis/bearing_capacity/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
6
|
+
geolysis/bearing_capacity/abc/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
7
|
+
geolysis/bearing_capacity/abc/cohl/__init__.py,sha256=En8EQMz8LV0rCy8EZZXHkUOfBe7KBnw2Kz-Q8SpU7HM,5454
|
8
|
+
geolysis/bearing_capacity/abc/cohl/_core.py,sha256=LpXXaIGfq8jafSSi5b6tdTbdy1SMAtV_vm5id9ZeRVI,1653
|
9
|
+
geolysis/bearing_capacity/abc/cohl/bowles_abc.py,sha256=kUAZWR5exvRNoOB6pXoxmyOiQorPNtnZwBoaXCk9z0I,4096
|
10
|
+
geolysis/bearing_capacity/abc/cohl/meyerhof_abc.py,sha256=3iriC_pQCKRf_4QtDm8163lnKNZUvJ9M7c7ZyRRrID8,4056
|
11
|
+
geolysis/bearing_capacity/abc/cohl/terzaghi_abc.py,sha256=EOGfA7_IM0vCa5gLBaBOiEgop4nKBtghoA5EZC7k9dM,5308
|
12
|
+
geolysis/bearing_capacity/ubc/__init__.py,sha256=e87E_V13rZM80mXPzZKCqcftUX2es_222r17uMR7qGc,6039
|
13
|
+
geolysis/bearing_capacity/ubc/_core.py,sha256=xia-ygcbjF3a9eVh6hzp61LPVJfHHCiztb1J8_W2apE,6177
|
14
|
+
geolysis/bearing_capacity/ubc/hansen_ubc.py,sha256=exkYLUG4W8AecJVbYC4lnE58KbssVUsjI0lJ7Mu5pqw,7170
|
15
|
+
geolysis/bearing_capacity/ubc/terzaghi_ubc.py,sha256=TokZUUlP62R9zFtokzZVY57M6cEoKy1-T5wy0hvQxGU,6513
|
16
|
+
geolysis/bearing_capacity/ubc/vesic_ubc.py,sha256=zlFI26tY_L1LCb6T7q4NY4E0pTivdjYyTttp-VcIlvk,7405
|
17
|
+
geolysis/utils/__init__.py,sha256=713rJNWVFLrP4CNon4i-xUf5rF5eA40Ydg-F1UV8o-0,2339
|
18
|
+
geolysis/utils/exceptions.py,sha256=4tsB3e7k_FzYSSqEWd0KungaRviqiBoYkLh4ipAyFeA,1387
|
19
|
+
geolysis/utils/validators.py,sha256=vgQLreUdKXB0mBCZrfto9o2Z8rqgtPXJ8XQPzhjAT3w,4012
|
20
|
+
geolysis-0.8.0.dist-info/licenses/LICENSE.txt,sha256=ap6sMs3lT7ICbEXBhgihwH1BTCVcjmCQkIkwVnil1Ak,1065
|
21
|
+
geolysis-0.8.0.dist-info/METADATA,sha256=vLwq6Zl56dxwYw-ry_dA6XovKHm5-KH1BJgKyFuciNg,7211
|
22
|
+
geolysis-0.8.0.dist-info/WHEEL,sha256=wXxTzcEDnjrTwFYjLPcsW_7_XihufBwmpiBeiXNBGEA,91
|
23
|
+
geolysis-0.8.0.dist-info/top_level.txt,sha256=9mnQgOaCRr11dtXff8X-q3FfXjRONd6kHseSy5q2y8g,9
|
24
|
+
geolysis-0.8.0.dist-info/RECORD,,
|
geolysis-0.7.2.dist-info/RECORD
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
geolysis/__init__.py,sha256=AvRgv11HmUiEzG07RQS3vGM6j234EtzUPJKnSGUBePo,122
|
2
|
-
geolysis/foundation.py,sha256=gxI6bLbUrxQNhoKJis5glDysnI6PgqBkMM9m5CQztsg,11695
|
3
|
-
geolysis/soil_classifier.py,sha256=2C-4hpgXNo2DUgXKcokUh3qjAH70qvgOCnxsL_NnmTw,26880
|
4
|
-
geolysis/spt.py,sha256=7C8FPwwUej_YLkLAMMyUVhWYoh9FH4__6g5_G8NSas0,17507
|
5
|
-
geolysis/bearing_capacity/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
6
|
-
geolysis/bearing_capacity/abc/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
7
|
-
geolysis/bearing_capacity/abc/cohl/__init__.py,sha256=sWhQJj5klrenbwgaBAWRM23BQCcudZM4Ztwg8auxNw8,5399
|
8
|
-
geolysis/bearing_capacity/abc/cohl/_core.py,sha256=ZQrjK4d89OMNhLRg9PczRpwkT6xiRRcn2sq603Fsobc,1627
|
9
|
-
geolysis/bearing_capacity/abc/cohl/bowles_abc.py,sha256=kUAZWR5exvRNoOB6pXoxmyOiQorPNtnZwBoaXCk9z0I,4096
|
10
|
-
geolysis/bearing_capacity/abc/cohl/meyerhof_abc.py,sha256=3iriC_pQCKRf_4QtDm8163lnKNZUvJ9M7c7ZyRRrID8,4056
|
11
|
-
geolysis/bearing_capacity/abc/cohl/terzaghi_abc.py,sha256=EOGfA7_IM0vCa5gLBaBOiEgop4nKBtghoA5EZC7k9dM,5308
|
12
|
-
geolysis/bearing_capacity/ubc/__init__.py,sha256=Q9VJhjgcz1heFjj0zgvASUFekNS683_BZBfTJsfxPcE,5983
|
13
|
-
geolysis/bearing_capacity/ubc/_core.py,sha256=xia-ygcbjF3a9eVh6hzp61LPVJfHHCiztb1J8_W2apE,6177
|
14
|
-
geolysis/bearing_capacity/ubc/hansen_ubc.py,sha256=exkYLUG4W8AecJVbYC4lnE58KbssVUsjI0lJ7Mu5pqw,7170
|
15
|
-
geolysis/bearing_capacity/ubc/terzaghi_ubc.py,sha256=zoTf2pVTd1zN_6-yuNK9njo-8rn4o3CSccAEiivc2AE,6514
|
16
|
-
geolysis/bearing_capacity/ubc/vesic_ubc.py,sha256=zlFI26tY_L1LCb6T7q4NY4E0pTivdjYyTttp-VcIlvk,7405
|
17
|
-
geolysis/utils/__init__.py,sha256=713rJNWVFLrP4CNon4i-xUf5rF5eA40Ydg-F1UV8o-0,2339
|
18
|
-
geolysis/utils/exceptions.py,sha256=ivuyxqz0B7nmA5sXMfw4o7KPnQHoaGbLHmJCEiCEaAc,929
|
19
|
-
geolysis/utils/validators.py,sha256=g18NIlLaNSIjlBwRLkUQr68qcYnwzo5qcfY5y_GoO1Y,3205
|
20
|
-
geolysis-0.7.2.dist-info/licenses/LICENSE.txt,sha256=ap6sMs3lT7ICbEXBhgihwH1BTCVcjmCQkIkwVnil1Ak,1065
|
21
|
-
geolysis-0.7.2.dist-info/METADATA,sha256=XjRf0LvX0IAhJgp2mkMk-uNTTsuwgHZ4iovkMwC2oUI,7235
|
22
|
-
geolysis-0.7.2.dist-info/WHEEL,sha256=pxyMxgL8-pra_rKaQ4drOZAegBVuX-G_4nRHjjgWbmo,91
|
23
|
-
geolysis-0.7.2.dist-info/top_level.txt,sha256=9mnQgOaCRr11dtXff8X-q3FfXjRONd6kHseSy5q2y8g,9
|
24
|
-
geolysis-0.7.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|