geolysis 0.4.2__py3-none-any.whl → 0.4.4__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 +4 -2
- geolysis/bearing_capacity/__init__.py +0 -0
- geolysis/bearing_capacity/abc/__init__.py +0 -0
- geolysis/bearing_capacity/abc/cohl/__init__.py +206 -0
- geolysis/bearing_capacity/abc/cohl/bowles_abc.py +107 -0
- geolysis/bearing_capacity/abc/cohl/meyerhof_abc.py +107 -0
- geolysis/bearing_capacity/abc/cohl/terzaghi_abc.py +142 -0
- geolysis/bearing_capacity/ubc/__init__.py +337 -0
- geolysis/bearing_capacity/ubc/hansen_ubc.py +296 -0
- geolysis/bearing_capacity/ubc/terzaghi_ubc.py +258 -0
- geolysis/bearing_capacity/ubc/vesic_ubc.py +302 -0
- geolysis/foundation.py +165 -98
- geolysis/soil_classifier.py +160 -99
- geolysis/spt.py +88 -44
- geolysis/{utils.py → utils/__init__.py} +24 -2
- geolysis/utils/validators.py +80 -0
- {geolysis-0.4.2.dist-info → geolysis-0.4.4.dist-info}/METADATA +68 -76
- geolysis-0.4.4.dist-info/RECORD +21 -0
- {geolysis-0.4.2.dist-info → geolysis-0.4.4.dist-info}/WHEEL +1 -1
- geolysis/validators.py +0 -54
- geolysis-0.4.2.dist-info/RECORD +0 -11
- {geolysis-0.4.2.dist-info → geolysis-0.4.4.dist-info}/LICENSE.txt +0 -0
- {geolysis-0.4.2.dist-info → geolysis-0.4.4.dist-info}/top_level.txt +0 -0
geolysis/validators.py
DELETED
@@ -1,54 +0,0 @@
|
|
1
|
-
import operator
|
2
|
-
from typing import Callable, TypeAlias
|
3
|
-
|
4
|
-
|
5
|
-
class _NumberValidator:
|
6
|
-
def __init__(self, bound: float,
|
7
|
-
compare_op: str,
|
8
|
-
compare_fn: Callable,
|
9
|
-
exc_type=ValueError,
|
10
|
-
err_msg=None) -> None:
|
11
|
-
self.bound = bound
|
12
|
-
self.compare_op = compare_op
|
13
|
-
self.compare_fn = compare_fn
|
14
|
-
self.exc_type = exc_type
|
15
|
-
self.err_msg = err_msg
|
16
|
-
|
17
|
-
def __call__(self, fn):
|
18
|
-
def wrapper(obj, val):
|
19
|
-
if not self.compare_fn(val, self.bound):
|
20
|
-
if self.err_msg:
|
21
|
-
msg = self.err_msg
|
22
|
-
else:
|
23
|
-
msg = f"{fn.__name__} must be {self.compare_op} {self.bound}"
|
24
|
-
raise self.exc_type(msg)
|
25
|
-
return fn(obj, val)
|
26
|
-
|
27
|
-
return wrapper
|
28
|
-
|
29
|
-
|
30
|
-
Number: TypeAlias = int | float
|
31
|
-
|
32
|
-
|
33
|
-
def lt(val: Number, /, *, exc_type=ValueError, err_msg=None):
|
34
|
-
return _NumberValidator(val, "<", operator.lt, exc_type, err_msg)
|
35
|
-
|
36
|
-
|
37
|
-
def le(val: Number, /, *, exc_type=ValueError, err_msg=None):
|
38
|
-
return _NumberValidator(val, "<=", operator.le, exc_type, err_msg)
|
39
|
-
|
40
|
-
|
41
|
-
def eq(val: Number, /, *, exc_type=ValueError, err_msg=None):
|
42
|
-
return _NumberValidator(val, "==", operator.eq, exc_type, err_msg)
|
43
|
-
|
44
|
-
|
45
|
-
def ne(val: Number, /, *, exc_type=ValueError, err_msg=None):
|
46
|
-
return _NumberValidator(val, "!=", operator.ne, exc_type, err_msg)
|
47
|
-
|
48
|
-
|
49
|
-
def ge(val: Number, /, *, exc_type=ValueError, err_msg=None):
|
50
|
-
return _NumberValidator(val, ">=", operator.ge, exc_type, err_msg)
|
51
|
-
|
52
|
-
|
53
|
-
def gt(val: Number, /, *, exc_type=ValueError, err_msg=None):
|
54
|
-
return _NumberValidator(val, ">", operator.gt, exc_type, err_msg)
|
geolysis-0.4.2.dist-info/RECORD
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
geolysis/__init__.py,sha256=XZTtMHzfsLe7mt08DNl_2Qui1xPYU8f504pS-Q8yKzY,77
|
2
|
-
geolysis/foundation.py,sha256=aZVLOrRSx1ALwJwQwrnCQOMc4fQf4gAoBmHjI0tyNLo,9548
|
3
|
-
geolysis/soil_classifier.py,sha256=FhfWYEo5dIQ1QWL83u5lX19AfMCCsnf0Klb67ekOLHc,26133
|
4
|
-
geolysis/spt.py,sha256=jlO2gIGpM-sKhBQRSaCe3iNFZ8xKq9XiZnxVcxzhyBg,13647
|
5
|
-
geolysis/utils.py,sha256=lonWt3VIB-zQjplCTzwUSIBxah4sB4fBh1l92iXE-NY,2313
|
6
|
-
geolysis/validators.py,sha256=j6ek90_si4caeVmPMEPTvSxBh0LnxiqXWKzUjF0Htbc,1662
|
7
|
-
geolysis-0.4.2.dist-info/LICENSE.txt,sha256=ap6sMs3lT7ICbEXBhgihwH1BTCVcjmCQkIkwVnil1Ak,1065
|
8
|
-
geolysis-0.4.2.dist-info/METADATA,sha256=yjsbp0sU4JTVH_S63ncjIyCruTBs1eucjd6ktoUIzNs,7059
|
9
|
-
geolysis-0.4.2.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
10
|
-
geolysis-0.4.2.dist-info/top_level.txt,sha256=9mnQgOaCRr11dtXff8X-q3FfXjRONd6kHseSy5q2y8g,9
|
11
|
-
geolysis-0.4.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|