geolysis 0.21.0__tar.gz → 0.21.1__tar.gz
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-0.21.0 → geolysis-0.21.1}/PKG-INFO +1 -1
- {geolysis-0.21.0 → geolysis-0.21.1}/geolysis/__init__.py +1 -1
- {geolysis-0.21.0 → geolysis-0.21.1}/geolysis/soil_classifier.py +33 -33
- {geolysis-0.21.0 → geolysis-0.21.1}/geolysis.egg-info/PKG-INFO +1 -1
- {geolysis-0.21.0 → geolysis-0.21.1}/tests/test_soil_classifier.py +2 -1
- {geolysis-0.21.0 → geolysis-0.21.1}/LICENSE.txt +0 -0
- {geolysis-0.21.0 → geolysis-0.21.1}/README.md +0 -0
- {geolysis-0.21.0 → geolysis-0.21.1}/geolysis/bearing_capacity/__init__.py +0 -0
- {geolysis-0.21.0 → geolysis-0.21.1}/geolysis/bearing_capacity/abc/__init__.py +0 -0
- {geolysis-0.21.0 → geolysis-0.21.1}/geolysis/bearing_capacity/abc/_cohl/__init__.py +0 -0
- {geolysis-0.21.0 → geolysis-0.21.1}/geolysis/bearing_capacity/abc/_cohl/_core.py +0 -0
- {geolysis-0.21.0 → geolysis-0.21.1}/geolysis/bearing_capacity/abc/_cohl/bowles_abc.py +0 -0
- {geolysis-0.21.0 → geolysis-0.21.1}/geolysis/bearing_capacity/abc/_cohl/meyerhof_abc.py +0 -0
- {geolysis-0.21.0 → geolysis-0.21.1}/geolysis/bearing_capacity/abc/_cohl/terzaghi_abc.py +0 -0
- {geolysis-0.21.0 → geolysis-0.21.1}/geolysis/bearing_capacity/ubc/__init__.py +0 -0
- {geolysis-0.21.0 → geolysis-0.21.1}/geolysis/bearing_capacity/ubc/_core.py +0 -0
- {geolysis-0.21.0 → geolysis-0.21.1}/geolysis/bearing_capacity/ubc/_terzaghi_ubc.py +0 -0
- {geolysis-0.21.0 → geolysis-0.21.1}/geolysis/bearing_capacity/ubc/_vesic_ubc.py +0 -0
- {geolysis-0.21.0 → geolysis-0.21.1}/geolysis/exceptions.py +0 -0
- {geolysis-0.21.0 → geolysis-0.21.1}/geolysis/foundation.py +0 -0
- {geolysis-0.21.0 → geolysis-0.21.1}/geolysis/spt.py +0 -0
- {geolysis-0.21.0 → geolysis-0.21.1}/geolysis/utils/__init__.py +0 -0
- {geolysis-0.21.0 → geolysis-0.21.1}/geolysis/utils/math.py +0 -0
- {geolysis-0.21.0 → geolysis-0.21.1}/geolysis.egg-info/SOURCES.txt +0 -0
- {geolysis-0.21.0 → geolysis-0.21.1}/geolysis.egg-info/dependency_links.txt +0 -0
- {geolysis-0.21.0 → geolysis-0.21.1}/geolysis.egg-info/requires.txt +0 -0
- {geolysis-0.21.0 → geolysis-0.21.1}/geolysis.egg-info/top_level.txt +0 -0
- {geolysis-0.21.0 → geolysis-0.21.1}/pyproject.toml +0 -0
- {geolysis-0.21.0 → geolysis-0.21.1}/setup.cfg +0 -0
- {geolysis-0.21.0 → geolysis-0.21.1}/setup.py +0 -0
- {geolysis-0.21.0 → geolysis-0.21.1}/tests/test_docs.py +0 -0
- {geolysis-0.21.0 → geolysis-0.21.1}/tests/test_foundation.py +0 -0
- {geolysis-0.21.0 → geolysis-0.21.1}/tests/test_spt.py +0 -0
|
@@ -6,6 +6,8 @@ from func_validator import (
|
|
|
6
6
|
validate_params,
|
|
7
7
|
MustBeNonNegative,
|
|
8
8
|
MustBePositive,
|
|
9
|
+
DependsOn,
|
|
10
|
+
MustBeLessThanOrEqual,
|
|
9
11
|
)
|
|
10
12
|
|
|
11
13
|
from .utils import isclose, round_
|
|
@@ -261,8 +263,7 @@ class AtterbergLimits:
|
|
|
261
263
|
|
|
262
264
|
@liquid_limit.setter
|
|
263
265
|
@validate_params
|
|
264
|
-
def liquid_limit(self,
|
|
265
|
-
liquid_limit: Annotated[float, MustBeNonNegative()]):
|
|
266
|
+
def liquid_limit(self, liquid_limit: Annotated[float, MustBeNonNegative()]):
|
|
266
267
|
self._liquid_limit = liquid_limit
|
|
267
268
|
|
|
268
269
|
@property
|
|
@@ -274,15 +275,14 @@ class AtterbergLimits:
|
|
|
274
275
|
|
|
275
276
|
@plastic_limit.setter
|
|
276
277
|
@validate_params
|
|
277
|
-
def plastic_limit(
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
278
|
+
def plastic_limit(
|
|
279
|
+
self,
|
|
280
|
+
plastic_limit: Annotated[
|
|
281
|
+
float,
|
|
282
|
+
MustBeNonNegative(),
|
|
283
|
+
DependsOn("liquid_limit", args_strategy=MustBeLessThanOrEqual),
|
|
284
|
+
],
|
|
285
|
+
):
|
|
286
286
|
self._plastic_limit = plastic_limit
|
|
287
287
|
|
|
288
288
|
@property
|
|
@@ -369,7 +369,7 @@ class _SizeDistribution:
|
|
|
369
369
|
|
|
370
370
|
@property
|
|
371
371
|
def coeff_of_curvature(self) -> float:
|
|
372
|
-
return (self.d_30
|
|
372
|
+
return (self.d_30**2.0) / (self.d_60 * self.d_10)
|
|
373
373
|
|
|
374
374
|
@property
|
|
375
375
|
def coeff_of_uniformity(self) -> float:
|
|
@@ -406,12 +406,12 @@ class PSD:
|
|
|
406
406
|
"""
|
|
407
407
|
|
|
408
408
|
def __init__(
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
409
|
+
self,
|
|
410
|
+
fines: float,
|
|
411
|
+
sand: float,
|
|
412
|
+
d_10: float | None = None,
|
|
413
|
+
d_30: float | None = None,
|
|
414
|
+
d_60: float | None = None,
|
|
415
415
|
):
|
|
416
416
|
"""
|
|
417
417
|
:param fines: Percentage of fines in soil sample (%) i.e. The
|
|
@@ -658,10 +658,10 @@ class USCS:
|
|
|
658
658
|
"""
|
|
659
659
|
|
|
660
660
|
def __init__(
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
661
|
+
self,
|
|
662
|
+
atterberg_limits: AtterbergLimits,
|
|
663
|
+
psd: PSD,
|
|
664
|
+
organic=False,
|
|
665
665
|
):
|
|
666
666
|
"""
|
|
667
667
|
:param atterberg_limits: Atterberg limits of the soil.
|
|
@@ -789,9 +789,9 @@ class USCS:
|
|
|
789
789
|
|
|
790
790
|
|
|
791
791
|
def create_aashto_classifier(
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
792
|
+
liquid_limit: float,
|
|
793
|
+
plastic_limit: float,
|
|
794
|
+
fines: float,
|
|
795
795
|
) -> AASHTO:
|
|
796
796
|
"""A helper function that encapsulates the creation of a AASHTO
|
|
797
797
|
classifier.
|
|
@@ -815,14 +815,14 @@ def create_aashto_classifier(
|
|
|
815
815
|
|
|
816
816
|
@validate_params
|
|
817
817
|
def create_uscs_classifier(
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
818
|
+
liquid_limit: float,
|
|
819
|
+
plastic_limit: float,
|
|
820
|
+
fines: float,
|
|
821
|
+
sand: float,
|
|
822
|
+
d_10: Annotated[Optional[float], MustBePositive()] = None,
|
|
823
|
+
d_30: Annotated[Optional[float], MustBePositive()] = None,
|
|
824
|
+
d_60: Annotated[Optional[float], MustBePositive()] = None,
|
|
825
|
+
organic: bool = False,
|
|
826
826
|
):
|
|
827
827
|
"""A helper function that encapsulates the creation of a USCS
|
|
828
828
|
classifier.
|
|
@@ -6,6 +6,7 @@ from geolysis.soil_classifier import (
|
|
|
6
6
|
create_aashto_classifier,
|
|
7
7
|
create_uscs_classifier,
|
|
8
8
|
)
|
|
9
|
+
from geolysis.exceptions import ValidationError
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
class TestAtterbergLimits:
|
|
@@ -38,7 +39,7 @@ class TestAtterbergLimits:
|
|
|
38
39
|
|
|
39
40
|
def test_errors(self):
|
|
40
41
|
# Plastic limit is greater than liquid limit
|
|
41
|
-
with pytest.raises(
|
|
42
|
+
with pytest.raises(ValidationError):
|
|
42
43
|
AtterbergLimits(liquid_limit=15.0, plastic_limit=25.0)
|
|
43
44
|
|
|
44
45
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|